Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsILoadContextInfo.idl
3 : */
4 :
5 : #ifndef __gen_nsILoadContextInfo_h__
6 : #define __gen_nsILoadContextInfo_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : #include "js/Value.h"
14 :
15 : /* For IDL files that don't want to include root IDL files. */
16 : #ifndef NS_NO_VTABLE
17 : #define NS_NO_VTABLE
18 : #endif
19 : #include "mozilla/BasePrincipal.h"
20 : class nsILoadContext; /* forward declaration */
21 :
22 : class nsIDOMWindow; /* forward declaration */
23 :
24 :
25 : /* starting interface: nsILoadContextInfo */
26 : #define NS_ILOADCONTEXTINFO_IID_STR "555e2f8a-a1f6-41dd-88ca-ed4ed6b98a22"
27 :
28 : #define NS_ILOADCONTEXTINFO_IID \
29 : {0x555e2f8a, 0xa1f6, 0x41dd, \
30 : { 0x88, 0xca, 0xed, 0x4e, 0xd6, 0xb9, 0x8a, 0x22 }}
31 :
32 28 : class nsILoadContextInfo : public nsISupports {
33 : public:
34 :
35 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ILOADCONTEXTINFO_IID)
36 :
37 : enum {
38 : NO_APP_ID = 0U,
39 : UNKNOWN_APP_ID = 4294967295U
40 : };
41 :
42 : /* readonly attribute boolean isPrivate; */
43 : NS_IMETHOD GetIsPrivate(bool *aIsPrivate) = 0;
44 :
45 : /* readonly attribute boolean isAnonymous; */
46 : NS_IMETHOD GetIsAnonymous(bool *aIsAnonymous) = 0;
47 :
48 : /* [implicit_jscontext] readonly attribute jsval originAttributes; */
49 : NS_IMETHOD GetOriginAttributes(JSContext* cx, JS::MutableHandleValue aOriginAttributes) = 0;
50 :
51 : /* [binaryname(OriginAttributesPtr),noscript,nostdcall,notxpcom] OriginAttributesNativePtr binaryOriginAttributesPtr (); */
52 : virtual const mozilla::OriginAttributes* OriginAttributesPtr(void) = 0;
53 :
54 : /**
55 : * De-XPCOMed getters
56 : */
57 34 : bool IsPrivate()
58 : {
59 : bool pb;
60 34 : GetIsPrivate(&pb);
61 34 : return pb;
62 : }
63 35 : bool IsAnonymous()
64 : {
65 : bool anon;
66 35 : GetIsAnonymous(&anon);
67 35 : return anon;
68 : }
69 0 : bool Equals(nsILoadContextInfo *aOther)
70 : {
71 0 : return IsAnonymous() == aOther->IsAnonymous() &&
72 0 : *OriginAttributesPtr() == *aOther->OriginAttributesPtr();
73 : }
74 : };
75 :
76 : NS_DEFINE_STATIC_IID_ACCESSOR(nsILoadContextInfo, NS_ILOADCONTEXTINFO_IID)
77 :
78 : /* Use this macro when declaring classes that implement this interface. */
79 : #define NS_DECL_NSILOADCONTEXTINFO \
80 : NS_IMETHOD GetIsPrivate(bool *aIsPrivate) override; \
81 : NS_IMETHOD GetIsAnonymous(bool *aIsAnonymous) override; \
82 : NS_IMETHOD GetOriginAttributes(JSContext* cx, JS::MutableHandleValue aOriginAttributes) override; \
83 : virtual const mozilla::OriginAttributes* OriginAttributesPtr(void) override; \
84 :
85 : /* Use this macro when declaring the members of this interface when the
86 : class doesn't implement the interface. This is useful for forwarding. */
87 : #define NS_DECL_NON_VIRTUAL_NSILOADCONTEXTINFO \
88 : nsresult GetIsPrivate(bool *aIsPrivate); \
89 : nsresult GetIsAnonymous(bool *aIsAnonymous); \
90 : nsresult GetOriginAttributes(JSContext* cx, JS::MutableHandleValue aOriginAttributes); \
91 : const mozilla::OriginAttributes* OriginAttributesPtr(void); \
92 :
93 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
94 : #define NS_FORWARD_NSILOADCONTEXTINFO(_to) \
95 : NS_IMETHOD GetIsPrivate(bool *aIsPrivate) override { return _to GetIsPrivate(aIsPrivate); } \
96 : NS_IMETHOD GetIsAnonymous(bool *aIsAnonymous) override { return _to GetIsAnonymous(aIsAnonymous); } \
97 : NS_IMETHOD GetOriginAttributes(JSContext* cx, JS::MutableHandleValue aOriginAttributes) override { return _to GetOriginAttributes(cx, aOriginAttributes); } \
98 : virtual const mozilla::OriginAttributes* OriginAttributesPtr(void) override { return _to OriginAttributesPtr(); } \
99 :
100 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
101 : #define NS_FORWARD_SAFE_NSILOADCONTEXTINFO(_to) \
102 : NS_IMETHOD GetIsPrivate(bool *aIsPrivate) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsPrivate(aIsPrivate); } \
103 : NS_IMETHOD GetIsAnonymous(bool *aIsAnonymous) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsAnonymous(aIsAnonymous); } \
104 : NS_IMETHOD GetOriginAttributes(JSContext* cx, JS::MutableHandleValue aOriginAttributes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOriginAttributes(cx, aOriginAttributes); } \
105 : virtual const mozilla::OriginAttributes* OriginAttributesPtr(void) override; \
106 :
107 : #if 0
108 : /* Use the code below as a template for the implementation class for this interface. */
109 :
110 : /* Header file */
111 : class nsLoadContextInfo : public nsILoadContextInfo
112 : {
113 : public:
114 : NS_DECL_ISUPPORTS
115 : NS_DECL_NSILOADCONTEXTINFO
116 :
117 : nsLoadContextInfo();
118 :
119 : private:
120 : ~nsLoadContextInfo();
121 :
122 : protected:
123 : /* additional members */
124 : };
125 :
126 : /* Implementation file */
127 : NS_IMPL_ISUPPORTS(nsLoadContextInfo, nsILoadContextInfo)
128 :
129 : nsLoadContextInfo::nsLoadContextInfo()
130 : {
131 : /* member initializers and constructor code */
132 : }
133 :
134 : nsLoadContextInfo::~nsLoadContextInfo()
135 : {
136 : /* destructor code */
137 : }
138 :
139 : /* readonly attribute boolean isPrivate; */
140 : NS_IMETHODIMP nsLoadContextInfo::GetIsPrivate(bool *aIsPrivate)
141 : {
142 : return NS_ERROR_NOT_IMPLEMENTED;
143 : }
144 :
145 : /* readonly attribute boolean isAnonymous; */
146 : NS_IMETHODIMP nsLoadContextInfo::GetIsAnonymous(bool *aIsAnonymous)
147 : {
148 : return NS_ERROR_NOT_IMPLEMENTED;
149 : }
150 :
151 : /* [implicit_jscontext] readonly attribute jsval originAttributes; */
152 : NS_IMETHODIMP nsLoadContextInfo::GetOriginAttributes(JSContext* cx, JS::MutableHandleValue aOriginAttributes)
153 : {
154 : return NS_ERROR_NOT_IMPLEMENTED;
155 : }
156 :
157 : /* [binaryname(OriginAttributesPtr),noscript,nostdcall,notxpcom] OriginAttributesNativePtr binaryOriginAttributesPtr (); */
158 : const mozilla::OriginAttributes* nsLoadContextInfo::OriginAttributesPtr()
159 : {
160 : return NS_ERROR_NOT_IMPLEMENTED;
161 : }
162 :
163 : /* End of implementation class template. */
164 : #endif
165 :
166 :
167 : /* starting interface: nsILoadContextInfoFactory */
168 : #define NS_ILOADCONTEXTINFOFACTORY_IID_STR "c1c7023d-4318-4f99-8307-b5ccf0558793"
169 :
170 : #define NS_ILOADCONTEXTINFOFACTORY_IID \
171 : {0xc1c7023d, 0x4318, 0x4f99, \
172 : { 0x83, 0x07, 0xb5, 0xcc, 0xf0, 0x55, 0x87, 0x93 }}
173 :
174 0 : class NS_NO_VTABLE nsILoadContextInfoFactory : public nsISupports {
175 : public:
176 :
177 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ILOADCONTEXTINFOFACTORY_IID)
178 :
179 : /* readonly attribute nsILoadContextInfo default; */
180 : NS_IMETHOD GetDefault(nsILoadContextInfo * *aDefault) = 0;
181 :
182 : /* readonly attribute nsILoadContextInfo private; */
183 : NS_IMETHOD GetPrivate(nsILoadContextInfo * *aPrivate) = 0;
184 :
185 : /* readonly attribute nsILoadContextInfo anonymous; */
186 : NS_IMETHOD GetAnonymous(nsILoadContextInfo * *aAnonymous) = 0;
187 :
188 : /* [implicit_jscontext] nsILoadContextInfo custom (in boolean aAnonymous, in jsval aOriginAttributes); */
189 : NS_IMETHOD Custom(bool aAnonymous, JS::HandleValue aOriginAttributes, JSContext* cx, nsILoadContextInfo * *_retval) = 0;
190 :
191 : /* nsILoadContextInfo fromLoadContext (in nsILoadContext aLoadContext, in boolean aAnonymous); */
192 : NS_IMETHOD FromLoadContext(nsILoadContext *aLoadContext, bool aAnonymous, nsILoadContextInfo * *_retval) = 0;
193 :
194 : /* nsILoadContextInfo fromWindow (in nsIDOMWindow aWindow, in boolean aAnonymous); */
195 : NS_IMETHOD FromWindow(nsIDOMWindow *aWindow, bool aAnonymous, nsILoadContextInfo * *_retval) = 0;
196 :
197 : };
198 :
199 : NS_DEFINE_STATIC_IID_ACCESSOR(nsILoadContextInfoFactory, NS_ILOADCONTEXTINFOFACTORY_IID)
200 :
201 : /* Use this macro when declaring classes that implement this interface. */
202 : #define NS_DECL_NSILOADCONTEXTINFOFACTORY \
203 : NS_IMETHOD GetDefault(nsILoadContextInfo * *aDefault) override; \
204 : NS_IMETHOD GetPrivate(nsILoadContextInfo * *aPrivate) override; \
205 : NS_IMETHOD GetAnonymous(nsILoadContextInfo * *aAnonymous) override; \
206 : NS_IMETHOD Custom(bool aAnonymous, JS::HandleValue aOriginAttributes, JSContext* cx, nsILoadContextInfo * *_retval) override; \
207 : NS_IMETHOD FromLoadContext(nsILoadContext *aLoadContext, bool aAnonymous, nsILoadContextInfo * *_retval) override; \
208 : NS_IMETHOD FromWindow(nsIDOMWindow *aWindow, bool aAnonymous, nsILoadContextInfo * *_retval) override;
209 :
210 : /* Use this macro when declaring the members of this interface when the
211 : class doesn't implement the interface. This is useful for forwarding. */
212 : #define NS_DECL_NON_VIRTUAL_NSILOADCONTEXTINFOFACTORY \
213 : nsresult GetDefault(nsILoadContextInfo * *aDefault); \
214 : nsresult GetPrivate(nsILoadContextInfo * *aPrivate); \
215 : nsresult GetAnonymous(nsILoadContextInfo * *aAnonymous); \
216 : nsresult Custom(bool aAnonymous, JS::HandleValue aOriginAttributes, JSContext* cx, nsILoadContextInfo * *_retval); \
217 : nsresult FromLoadContext(nsILoadContext *aLoadContext, bool aAnonymous, nsILoadContextInfo * *_retval); \
218 : nsresult FromWindow(nsIDOMWindow *aWindow, bool aAnonymous, nsILoadContextInfo * *_retval);
219 :
220 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
221 : #define NS_FORWARD_NSILOADCONTEXTINFOFACTORY(_to) \
222 : NS_IMETHOD GetDefault(nsILoadContextInfo * *aDefault) override { return _to GetDefault(aDefault); } \
223 : NS_IMETHOD GetPrivate(nsILoadContextInfo * *aPrivate) override { return _to GetPrivate(aPrivate); } \
224 : NS_IMETHOD GetAnonymous(nsILoadContextInfo * *aAnonymous) override { return _to GetAnonymous(aAnonymous); } \
225 : NS_IMETHOD Custom(bool aAnonymous, JS::HandleValue aOriginAttributes, JSContext* cx, nsILoadContextInfo * *_retval) override { return _to Custom(aAnonymous, aOriginAttributes, cx, _retval); } \
226 : NS_IMETHOD FromLoadContext(nsILoadContext *aLoadContext, bool aAnonymous, nsILoadContextInfo * *_retval) override { return _to FromLoadContext(aLoadContext, aAnonymous, _retval); } \
227 : NS_IMETHOD FromWindow(nsIDOMWindow *aWindow, bool aAnonymous, nsILoadContextInfo * *_retval) override { return _to FromWindow(aWindow, aAnonymous, _retval); }
228 :
229 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
230 : #define NS_FORWARD_SAFE_NSILOADCONTEXTINFOFACTORY(_to) \
231 : NS_IMETHOD GetDefault(nsILoadContextInfo * *aDefault) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefault(aDefault); } \
232 : NS_IMETHOD GetPrivate(nsILoadContextInfo * *aPrivate) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrivate(aPrivate); } \
233 : NS_IMETHOD GetAnonymous(nsILoadContextInfo * *aAnonymous) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAnonymous(aAnonymous); } \
234 : NS_IMETHOD Custom(bool aAnonymous, JS::HandleValue aOriginAttributes, JSContext* cx, nsILoadContextInfo * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Custom(aAnonymous, aOriginAttributes, cx, _retval); } \
235 : NS_IMETHOD FromLoadContext(nsILoadContext *aLoadContext, bool aAnonymous, nsILoadContextInfo * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FromLoadContext(aLoadContext, aAnonymous, _retval); } \
236 : NS_IMETHOD FromWindow(nsIDOMWindow *aWindow, bool aAnonymous, nsILoadContextInfo * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FromWindow(aWindow, aAnonymous, _retval); }
237 :
238 : #if 0
239 : /* Use the code below as a template for the implementation class for this interface. */
240 :
241 : /* Header file */
242 : class nsLoadContextInfoFactory : public nsILoadContextInfoFactory
243 : {
244 : public:
245 : NS_DECL_ISUPPORTS
246 : NS_DECL_NSILOADCONTEXTINFOFACTORY
247 :
248 : nsLoadContextInfoFactory();
249 :
250 : private:
251 : ~nsLoadContextInfoFactory();
252 :
253 : protected:
254 : /* additional members */
255 : };
256 :
257 : /* Implementation file */
258 : NS_IMPL_ISUPPORTS(nsLoadContextInfoFactory, nsILoadContextInfoFactory)
259 :
260 : nsLoadContextInfoFactory::nsLoadContextInfoFactory()
261 : {
262 : /* member initializers and constructor code */
263 : }
264 :
265 : nsLoadContextInfoFactory::~nsLoadContextInfoFactory()
266 : {
267 : /* destructor code */
268 : }
269 :
270 : /* readonly attribute nsILoadContextInfo default; */
271 : NS_IMETHODIMP nsLoadContextInfoFactory::GetDefault(nsILoadContextInfo * *aDefault)
272 : {
273 : return NS_ERROR_NOT_IMPLEMENTED;
274 : }
275 :
276 : /* readonly attribute nsILoadContextInfo private; */
277 : NS_IMETHODIMP nsLoadContextInfoFactory::GetPrivate(nsILoadContextInfo * *aPrivate)
278 : {
279 : return NS_ERROR_NOT_IMPLEMENTED;
280 : }
281 :
282 : /* readonly attribute nsILoadContextInfo anonymous; */
283 : NS_IMETHODIMP nsLoadContextInfoFactory::GetAnonymous(nsILoadContextInfo * *aAnonymous)
284 : {
285 : return NS_ERROR_NOT_IMPLEMENTED;
286 : }
287 :
288 : /* [implicit_jscontext] nsILoadContextInfo custom (in boolean aAnonymous, in jsval aOriginAttributes); */
289 : NS_IMETHODIMP nsLoadContextInfoFactory::Custom(bool aAnonymous, JS::HandleValue aOriginAttributes, JSContext* cx, nsILoadContextInfo * *_retval)
290 : {
291 : return NS_ERROR_NOT_IMPLEMENTED;
292 : }
293 :
294 : /* nsILoadContextInfo fromLoadContext (in nsILoadContext aLoadContext, in boolean aAnonymous); */
295 : NS_IMETHODIMP nsLoadContextInfoFactory::FromLoadContext(nsILoadContext *aLoadContext, bool aAnonymous, nsILoadContextInfo * *_retval)
296 : {
297 : return NS_ERROR_NOT_IMPLEMENTED;
298 : }
299 :
300 : /* nsILoadContextInfo fromWindow (in nsIDOMWindow aWindow, in boolean aAnonymous); */
301 : NS_IMETHODIMP nsLoadContextInfoFactory::FromWindow(nsIDOMWindow *aWindow, bool aAnonymous, nsILoadContextInfo * *_retval)
302 : {
303 : return NS_ERROR_NOT_IMPLEMENTED;
304 : }
305 :
306 : /* End of implementation class template. */
307 : #endif
308 :
309 :
310 : #endif /* __gen_nsILoadContextInfo_h__ */
|