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: 10 // 11 // The above copyright notice and this permission notice shall be 12 // included in all copies or substantial portions of the Software. 13 // 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. 21 // 22 // Copyright (c) 2007, 2008 Novell, Inc. 23 // 24 // Authors: 25 // Andreia Gaita (avidigal@novell.com) 26 // 27 28 using System; 29 using System.Runtime.InteropServices; 30 using System.Runtime.CompilerServices; 31 using System.Text; 32 33 namespace Mono.Mozilla { 34 35 [Guid ("1A180F60-93B2-11d2-9B8B-00805F8A16D9")] 36 [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] 37 [ComImport ()] 38 internal interface nsIPersistentProperties : nsIProperties { 39 #region nsIProperties 40 [PreserveSigAttribute] 41 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] get([MarshalAs (UnmanagedType.LPStr) ] string prop, [MarshalAs (UnmanagedType.LPStruct) ] Guid iid, out IntPtr result)42 int get ([MarshalAs (UnmanagedType.LPStr) ] string prop, 43 [MarshalAs (UnmanagedType.LPStruct) ] Guid iid, 44 out IntPtr result); 45 46 [PreserveSigAttribute] 47 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] set([MarshalAs (UnmanagedType.LPStr) ] string prop, [MarshalAs (UnmanagedType.Interface) ] IntPtr value)48 int set ([MarshalAs (UnmanagedType.LPStr) ] string prop, 49 [MarshalAs (UnmanagedType.Interface) ] IntPtr value); 50 51 [PreserveSigAttribute] 52 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] has([MarshalAs (UnmanagedType.LPStr) ] string prop, out bool ret)53 int has ([MarshalAs (UnmanagedType.LPStr) ] string prop, 54 out bool ret); 55 56 [PreserveSigAttribute] 57 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] undefine([MarshalAs (UnmanagedType.LPStr) ] string prop)58 int undefine ([MarshalAs (UnmanagedType.LPStr) ] string prop); 59 60 [PreserveSigAttribute] 61 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] getKeys(out UInt32 count, [MarshalAs (UnmanagedType.LPStr) ] out string[] keys)62 int getKeys (out UInt32 count, 63 [MarshalAs (UnmanagedType.LPStr) ] out string[] keys); 64 65 #endregion 66 67 #region nsIPersistentProperties 68 [PreserveSigAttribute] 69 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] load([MarshalAs (UnmanagedType.Interface) ] nsIInputStream input)70 int load ([MarshalAs (UnmanagedType.Interface) ] nsIInputStream input); 71 72 [PreserveSigAttribute] 73 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] save([MarshalAs (UnmanagedType.Interface) ] nsIOutputStream output, HandleRef header)74 int save ([MarshalAs (UnmanagedType.Interface) ] nsIOutputStream output, 75 /*AUTF8String*/ HandleRef header); 76 77 [PreserveSigAttribute] 78 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] subclass([MarshalAs (UnmanagedType.Interface) ] nsIPersistentProperties superclass)79 int subclass ([MarshalAs (UnmanagedType.Interface) ] nsIPersistentProperties superclass); 80 81 [PreserveSigAttribute] 82 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] enumerate([MarshalAs (UnmanagedType.Interface) ] out nsISimpleEnumerator ret)83 int enumerate ([MarshalAs (UnmanagedType.Interface) ] out nsISimpleEnumerator ret); 84 85 [PreserveSigAttribute] 86 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] getStringProperty( HandleRef key, HandleRef ret)87 int getStringProperty ( /*AUTF8String*/ HandleRef key, 88 /*AString*/ HandleRef ret); 89 90 [PreserveSigAttribute] 91 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] setStringProperty( HandleRef key, HandleRef value, HandleRef ret)92 int setStringProperty ( /*AUTF8String*/ HandleRef key, 93 /*AString*/ HandleRef value, 94 /*AString*/ HandleRef ret); 95 96 #endregion 97 } 98 99 100 internal class nsPersistentProperties { GetProxy(Mono.WebBrowser.IWebBrowser control, nsIPersistentProperties obj)101 public static nsIPersistentProperties GetProxy (Mono.WebBrowser.IWebBrowser control, nsIPersistentProperties obj) 102 { 103 object o = Base.GetProxyForObject (control, typeof(nsIPersistentProperties).GUID, obj); 104 return o as nsIPersistentProperties; 105 } 106 } 107 } 108 #if example 109 110 using System; 111 using System.Runtime.InteropServices; 112 using System.Runtime.CompilerServices; 113 using System.Text; 114 115 internal class PersistentProperties : nsIPersistentProperties { 116 117 #region nsIPersistentProperties nsIPersistentProperties.load([MarshalAs (UnmanagedType.Interface) ] nsIInputStream input)118 int nsIPersistentProperties.load ([MarshalAs (UnmanagedType.Interface) ] nsIInputStream input) 119 { 120 return ; 121 } 122 123 124 nsIPersistentProperties.save([MarshalAs (UnmanagedType.Interface) ] nsIOutputStream output, HandleRef header)125 int nsIPersistentProperties.save ([MarshalAs (UnmanagedType.Interface) ] nsIOutputStream output, 126 /*AUTF8String*/ HandleRef header) 127 { 128 return ; 129 } 130 131 132 nsIPersistentProperties.subclass([MarshalAs (UnmanagedType.Interface) ] nsIPersistentProperties superclass)133 int nsIPersistentProperties.subclass ([MarshalAs (UnmanagedType.Interface) ] nsIPersistentProperties superclass) 134 { 135 return ; 136 } 137 138 139 nsIPersistentProperties.enumerate([MarshalAs (UnmanagedType.Interface) ] out nsISimpleEnumerator ret)140 int nsIPersistentProperties.enumerate ([MarshalAs (UnmanagedType.Interface) ] out nsISimpleEnumerator ret) 141 { 142 return ; 143 } 144 145 146 nsIPersistentProperties.getStringProperty( HandleRef key, HandleRef ret)147 int nsIPersistentProperties.getStringProperty ( /*AUTF8String*/ HandleRef key, 148 /*AString*/ HandleRef ret) 149 { 150 return ; 151 } 152 153 154 nsIPersistentProperties.setStringProperty( HandleRef key, HandleRef value, HandleRef ret)155 int nsIPersistentProperties.setStringProperty ( /*AUTF8String*/ HandleRef key, 156 /*AString*/ HandleRef value, 157 /*AString*/ HandleRef ret) 158 { 159 return ; 160 } 161 162 163 164 #endregion 165 } 166 #endif 167