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 ("bddeda3f-9020-4d12-8c70-984ee9f7935e")] 36 [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)] 37 [ComImport ()] 38 internal interface nsIIOService { 39 40 #region nsIIOService 41 [PreserveSigAttribute] 42 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] getProtocolHandler( [MarshalAs (UnmanagedType.LPStr)] string aScheme,[MarshalAs (UnmanagedType.Interface)] out nsIProtocolHandler ret)43 int getProtocolHandler ( 44 [MarshalAs (UnmanagedType.LPStr)] string aScheme,[MarshalAs (UnmanagedType.Interface)] out nsIProtocolHandler ret); 45 46 [PreserveSigAttribute] 47 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] getProtocolFlags( [MarshalAs (UnmanagedType.LPStr)] string aScheme, out uint ret)48 int getProtocolFlags ( 49 [MarshalAs (UnmanagedType.LPStr)] string aScheme, out uint ret); 50 51 [PreserveSigAttribute] 52 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] newURI( HandleRef aSpec, [MarshalAs (UnmanagedType.LPStr)] string aOriginCharset, [MarshalAs (UnmanagedType.Interface)] nsIURI aBaseURI,[MarshalAs (UnmanagedType.Interface)] out nsIURI ret)53 int newURI ( 54 /*AUTF8String*/ HandleRef aSpec, 55 [MarshalAs (UnmanagedType.LPStr)] string aOriginCharset, 56 [MarshalAs (UnmanagedType.Interface)] nsIURI aBaseURI,[MarshalAs (UnmanagedType.Interface)] out nsIURI ret); 57 58 [PreserveSigAttribute] 59 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] newFileURI( [MarshalAs (UnmanagedType.Interface)] nsIFile aFile,[MarshalAs (UnmanagedType.Interface)] out nsIURI ret)60 int newFileURI ( 61 [MarshalAs (UnmanagedType.Interface)] nsIFile aFile,[MarshalAs (UnmanagedType.Interface)] out nsIURI ret); 62 63 [PreserveSigAttribute] 64 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] newChannelFromURI( [MarshalAs (UnmanagedType.Interface)] nsIURI aURI,[MarshalAs (UnmanagedType.Interface)] out nsIChannel ret)65 int newChannelFromURI ( 66 [MarshalAs (UnmanagedType.Interface)] nsIURI aURI,[MarshalAs (UnmanagedType.Interface)] out nsIChannel ret); 67 68 [PreserveSigAttribute] 69 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] newChannel( HandleRef aSpec, [MarshalAs (UnmanagedType.LPStr)] string aOriginCharset, [MarshalAs (UnmanagedType.Interface)] nsIURI aBaseURI,[MarshalAs (UnmanagedType.Interface)] out nsIChannel ret)70 int newChannel ( 71 /*AUTF8String*/ HandleRef aSpec, 72 [MarshalAs (UnmanagedType.LPStr)] string aOriginCharset, 73 [MarshalAs (UnmanagedType.Interface)] nsIURI aBaseURI,[MarshalAs (UnmanagedType.Interface)] out nsIChannel ret); 74 75 [PreserveSigAttribute] 76 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] getOffline( out bool ret)77 int getOffline ( out bool ret); 78 79 [PreserveSigAttribute] 80 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] setOffline( bool value)81 int setOffline ( bool value); 82 83 [PreserveSigAttribute] 84 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] allowPort( int aPort, [MarshalAs (UnmanagedType.LPStr)] string aScheme, out bool ret)85 int allowPort ( 86 int aPort, 87 [MarshalAs (UnmanagedType.LPStr)] string aScheme, out bool ret); 88 89 [PreserveSigAttribute] 90 [MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] extractScheme( HandleRef urlString, HandleRef ret)91 int extractScheme ( 92 /*AUTF8String*/ HandleRef urlString, /*ACString*/ HandleRef ret); 93 94 #endregion 95 } 96 97 98 internal class nsIOService { GetProxy(Mono.WebBrowser.IWebBrowser control, nsIIOService obj)99 public static nsIIOService GetProxy (Mono.WebBrowser.IWebBrowser control, nsIIOService obj) 100 { 101 object o = Base.GetProxyForObject (control, typeof(nsIIOService).GUID, obj); 102 return o as nsIIOService; 103 } 104 } 105 } 106