1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/netwerk/base/public/nsIProtocolHandler.idl
3 : */
4 :
5 : #ifndef __gen_nsIProtocolHandler_h__
6 : #define __gen_nsIProtocolHandler_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : /* For IDL files that don't want to include root IDL files. */
14 : #ifndef NS_NO_VTABLE
15 : #define NS_NO_VTABLE
16 : #endif
17 : class nsIURI; /* forward declaration */
18 :
19 : class nsIChannel; /* forward declaration */
20 :
21 :
22 : /* starting interface: nsIProtocolHandler */
23 : #define NS_IPROTOCOLHANDLER_IID_STR "15fd6940-8ea7-11d3-93ad-00104ba0fd40"
24 :
25 : #define NS_IPROTOCOLHANDLER_IID \
26 : {0x15fd6940, 0x8ea7, 0x11d3, \
27 : { 0x93, 0xad, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40 }}
28 :
29 8151 : class NS_NO_VTABLE NS_SCRIPTABLE nsIProtocolHandler : public nsISupports {
30 : public:
31 :
32 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPROTOCOLHANDLER_IID)
33 :
34 : /* readonly attribute ACString scheme; */
35 : NS_SCRIPTABLE NS_IMETHOD GetScheme(nsACString & aScheme) = 0;
36 :
37 : /* readonly attribute long defaultPort; */
38 : NS_SCRIPTABLE NS_IMETHOD GetDefaultPort(PRInt32 *aDefaultPort) = 0;
39 :
40 : /* readonly attribute unsigned long protocolFlags; */
41 : NS_SCRIPTABLE NS_IMETHOD GetProtocolFlags(PRUint32 *aProtocolFlags) = 0;
42 :
43 : /* nsIURI newURI (in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI); */
44 : NS_SCRIPTABLE NS_IMETHOD NewURI(const nsACString & aSpec, const char * aOriginCharset, nsIURI *aBaseURI, nsIURI * *_retval NS_OUTPARAM) = 0;
45 :
46 : /* nsIChannel newChannel (in nsIURI aURI); */
47 : NS_SCRIPTABLE NS_IMETHOD NewChannel(nsIURI *aURI, nsIChannel * *_retval NS_OUTPARAM) = 0;
48 :
49 : /* boolean allowPort (in long port, in string scheme); */
50 : NS_SCRIPTABLE NS_IMETHOD AllowPort(PRInt32 port, const char * scheme, bool *_retval NS_OUTPARAM) = 0;
51 :
52 : enum {
53 : URI_STD = 0U,
54 : URI_NORELATIVE = 1U,
55 : URI_NOAUTH = 2U,
56 : URI_INHERITS_SECURITY_CONTEXT = 16U,
57 : URI_FORBIDS_AUTOMATIC_DOCUMENT_REPLACEMENT = 32U,
58 : URI_LOADABLE_BY_ANYONE = 64U,
59 : URI_DANGEROUS_TO_LOAD = 128U,
60 : URI_IS_UI_RESOURCE = 256U,
61 : URI_IS_LOCAL_FILE = 512U,
62 : URI_LOADABLE_BY_SUBSUMERS = 16384U,
63 : URI_NON_PERSISTABLE = 1024U,
64 : URI_DOES_NOT_RETURN_DATA = 2048U,
65 : URI_IS_LOCAL_RESOURCE = 4096U,
66 : URI_OPENING_EXECUTES_SCRIPT = 8192U,
67 : ALLOWS_PROXY = 4U,
68 : ALLOWS_PROXY_HTTP = 8U,
69 : URI_FORBIDS_COOKIE_ACCESS = 32768U
70 : };
71 :
72 : };
73 :
74 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIProtocolHandler, NS_IPROTOCOLHANDLER_IID)
75 :
76 : /* Use this macro when declaring classes that implement this interface. */
77 : #define NS_DECL_NSIPROTOCOLHANDLER \
78 : NS_SCRIPTABLE NS_IMETHOD GetScheme(nsACString & aScheme); \
79 : NS_SCRIPTABLE NS_IMETHOD GetDefaultPort(PRInt32 *aDefaultPort); \
80 : NS_SCRIPTABLE NS_IMETHOD GetProtocolFlags(PRUint32 *aProtocolFlags); \
81 : NS_SCRIPTABLE NS_IMETHOD NewURI(const nsACString & aSpec, const char * aOriginCharset, nsIURI *aBaseURI, nsIURI * *_retval NS_OUTPARAM); \
82 : NS_SCRIPTABLE NS_IMETHOD NewChannel(nsIURI *aURI, nsIChannel * *_retval NS_OUTPARAM); \
83 : NS_SCRIPTABLE NS_IMETHOD AllowPort(PRInt32 port, const char * scheme, bool *_retval NS_OUTPARAM); \
84 :
85 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
86 : #define NS_FORWARD_NSIPROTOCOLHANDLER(_to) \
87 : NS_SCRIPTABLE NS_IMETHOD GetScheme(nsACString & aScheme) { return _to GetScheme(aScheme); } \
88 : NS_SCRIPTABLE NS_IMETHOD GetDefaultPort(PRInt32 *aDefaultPort) { return _to GetDefaultPort(aDefaultPort); } \
89 : NS_SCRIPTABLE NS_IMETHOD GetProtocolFlags(PRUint32 *aProtocolFlags) { return _to GetProtocolFlags(aProtocolFlags); } \
90 : NS_SCRIPTABLE NS_IMETHOD NewURI(const nsACString & aSpec, const char * aOriginCharset, nsIURI *aBaseURI, nsIURI * *_retval NS_OUTPARAM) { return _to NewURI(aSpec, aOriginCharset, aBaseURI, _retval); } \
91 : NS_SCRIPTABLE NS_IMETHOD NewChannel(nsIURI *aURI, nsIChannel * *_retval NS_OUTPARAM) { return _to NewChannel(aURI, _retval); } \
92 : NS_SCRIPTABLE NS_IMETHOD AllowPort(PRInt32 port, const char * scheme, bool *_retval NS_OUTPARAM) { return _to AllowPort(port, scheme, _retval); } \
93 :
94 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
95 : #define NS_FORWARD_SAFE_NSIPROTOCOLHANDLER(_to) \
96 : NS_SCRIPTABLE NS_IMETHOD GetScheme(nsACString & aScheme) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScheme(aScheme); } \
97 : NS_SCRIPTABLE NS_IMETHOD GetDefaultPort(PRInt32 *aDefaultPort) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultPort(aDefaultPort); } \
98 : NS_SCRIPTABLE NS_IMETHOD GetProtocolFlags(PRUint32 *aProtocolFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProtocolFlags(aProtocolFlags); } \
99 : NS_SCRIPTABLE NS_IMETHOD NewURI(const nsACString & aSpec, const char * aOriginCharset, nsIURI *aBaseURI, nsIURI * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewURI(aSpec, aOriginCharset, aBaseURI, _retval); } \
100 : NS_SCRIPTABLE NS_IMETHOD NewChannel(nsIURI *aURI, nsIChannel * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewChannel(aURI, _retval); } \
101 : NS_SCRIPTABLE NS_IMETHOD AllowPort(PRInt32 port, const char * scheme, bool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->AllowPort(port, scheme, _retval); } \
102 :
103 : #if 0
104 : /* Use the code below as a template for the implementation class for this interface. */
105 :
106 : /* Header file */
107 : class nsProtocolHandler : public nsIProtocolHandler
108 : {
109 : public:
110 : NS_DECL_ISUPPORTS
111 : NS_DECL_NSIPROTOCOLHANDLER
112 :
113 : nsProtocolHandler();
114 :
115 : private:
116 : ~nsProtocolHandler();
117 :
118 : protected:
119 : /* additional members */
120 : };
121 :
122 : /* Implementation file */
123 : NS_IMPL_ISUPPORTS1(nsProtocolHandler, nsIProtocolHandler)
124 :
125 : nsProtocolHandler::nsProtocolHandler()
126 : {
127 : /* member initializers and constructor code */
128 : }
129 :
130 : nsProtocolHandler::~nsProtocolHandler()
131 : {
132 : /* destructor code */
133 : }
134 :
135 : /* readonly attribute ACString scheme; */
136 : NS_IMETHODIMP nsProtocolHandler::GetScheme(nsACString & aScheme)
137 : {
138 : return NS_ERROR_NOT_IMPLEMENTED;
139 : }
140 :
141 : /* readonly attribute long defaultPort; */
142 : NS_IMETHODIMP nsProtocolHandler::GetDefaultPort(PRInt32 *aDefaultPort)
143 : {
144 : return NS_ERROR_NOT_IMPLEMENTED;
145 : }
146 :
147 : /* readonly attribute unsigned long protocolFlags; */
148 : NS_IMETHODIMP nsProtocolHandler::GetProtocolFlags(PRUint32 *aProtocolFlags)
149 : {
150 : return NS_ERROR_NOT_IMPLEMENTED;
151 : }
152 :
153 : /* nsIURI newURI (in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI); */
154 : NS_IMETHODIMP nsProtocolHandler::NewURI(const nsACString & aSpec, const char * aOriginCharset, nsIURI *aBaseURI, nsIURI * *_retval NS_OUTPARAM)
155 : {
156 : return NS_ERROR_NOT_IMPLEMENTED;
157 : }
158 :
159 : /* nsIChannel newChannel (in nsIURI aURI); */
160 : NS_IMETHODIMP nsProtocolHandler::NewChannel(nsIURI *aURI, nsIChannel * *_retval NS_OUTPARAM)
161 : {
162 : return NS_ERROR_NOT_IMPLEMENTED;
163 : }
164 :
165 : /* boolean allowPort (in long port, in string scheme); */
166 : NS_IMETHODIMP nsProtocolHandler::AllowPort(PRInt32 port, const char * scheme, bool *_retval NS_OUTPARAM)
167 : {
168 : return NS_ERROR_NOT_IMPLEMENTED;
169 : }
170 :
171 : /* End of implementation class template. */
172 : #endif
173 :
174 : /**
175 : * Protocol handlers are registered with XPCOM under the following CONTRACTID prefix:
176 : */
177 : #define NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "@mozilla.org/network/protocol;1?name="
178 : /**
179 : * For example, "@mozilla.org/network/protocol;1?name=http"
180 : */
181 :
182 : #endif /* __gen_nsIProtocolHandler_h__ */
|