1 // THIS FILE AUTOMATICALLY GENERATED BY xpidl2cs.pl
2 // EDITING IS PROBABLY UNWISE
3 // Permission is hereby granted, free of charge, to any person obtaining
4 // a copy of this software and associated documentation files (the
5 // "Software"), to deal in the Software without restriction, including
6 // without limitation the rights to use, copy, modify, merge, publish,
7 // distribute, sublicense, and/or sell copies of the Software, and to
8 // permit persons to whom the Software is furnished to do so, subject to
9 // the following conditions:
11 // The above copyright notice and this permission notice shall be
12 // included in all copies or substantial portions of the Software.
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 // Copyright (c) 2007, 2008 Novell, Inc.
25 // Andreia Gaita (avidigal@novell.com)
29 using System
.Runtime
.InteropServices
;
30 using System
.Runtime
.CompilerServices
;
33 namespace Mono
.Mozilla
{
35 [Guid ("1A180F60-93B2-11d2-9B8B-00805F8A16D9")]
36 [InterfaceType (ComInterfaceType
.InterfaceIsIUnknown
)]
38 internal interface nsIPersistentProperties
: nsIProperties
{
40 [PreserveSigAttribute
]
41 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
42 int get ([MarshalAs (UnmanagedType
.LPStr
) ] string prop
,
43 [MarshalAs (UnmanagedType
.LPStruct
) ] Guid iid
,
46 [PreserveSigAttribute
]
47 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
48 int set ([MarshalAs (UnmanagedType
.LPStr
) ] string prop
,
49 [MarshalAs (UnmanagedType
.Interface
) ] IntPtr
value);
51 [PreserveSigAttribute
]
52 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
53 int has ([MarshalAs (UnmanagedType
.LPStr
) ] string prop
,
56 [PreserveSigAttribute
]
57 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
58 int undefine ([MarshalAs (UnmanagedType
.LPStr
) ] string prop
);
60 [PreserveSigAttribute
]
61 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
62 int getKeys (out UInt32 count
,
63 [MarshalAs (UnmanagedType
.LPStr
) ] out string[] keys
);
67 #region nsIPersistentProperties
68 [PreserveSigAttribute
]
69 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
70 int load ([MarshalAs (UnmanagedType
.Interface
) ] nsIInputStream input
);
72 [PreserveSigAttribute
]
73 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
74 int save ([MarshalAs (UnmanagedType
.Interface
) ] nsIOutputStream output
,
75 /*AUTF8String*/ HandleRef header
);
77 [PreserveSigAttribute
]
78 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
79 int subclass ([MarshalAs (UnmanagedType
.Interface
) ] nsIPersistentProperties superclass
);
81 [PreserveSigAttribute
]
82 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
83 int enumerate ([MarshalAs (UnmanagedType
.Interface
) ] out nsISimpleEnumerator ret
);
85 [PreserveSigAttribute
]
86 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
87 int getStringProperty ( /*AUTF8String*/ HandleRef key
,
88 /*AString*/ HandleRef ret
);
90 [PreserveSigAttribute
]
91 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
92 int setStringProperty ( /*AUTF8String*/ HandleRef key
,
93 /*AString*/ HandleRef
value,
94 /*AString*/ HandleRef ret
);
100 internal class nsPersistentProperties
{
101 public static nsIPersistentProperties
GetProxy (Mono
.WebBrowser
.IWebBrowser control
, nsIPersistentProperties obj
)
103 object o
= Base
.GetProxyForObject (control
, typeof(nsIPersistentProperties
).GUID
, obj
);
104 return o
as nsIPersistentProperties
;
111 using System
.Runtime
.InteropServices
;
112 using System
.Runtime
.CompilerServices
;
115 internal class PersistentProperties
: nsIPersistentProperties
{
117 #region nsIPersistentProperties
118 int nsIPersistentProperties
.load ([MarshalAs (UnmanagedType
.Interface
) ] nsIInputStream input
)
125 int nsIPersistentProperties
.save ([MarshalAs (UnmanagedType
.Interface
) ] nsIOutputStream output
,
126 /*AUTF8String*/ HandleRef header
)
133 int nsIPersistentProperties
.subclass ([MarshalAs (UnmanagedType
.Interface
) ] nsIPersistentProperties superclass
)
140 int nsIPersistentProperties
.enumerate ([MarshalAs (UnmanagedType
.Interface
) ] out nsISimpleEnumerator ret
)
147 int nsIPersistentProperties
.getStringProperty ( /*AUTF8String*/ HandleRef key
,
148 /*AString*/ HandleRef ret
)
155 int nsIPersistentProperties
.setStringProperty ( /*AUTF8String*/ HandleRef key
,
156 /*AString*/ HandleRef
value,
157 /*AString*/ HandleRef ret
)