Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIXPCScriptable.idl
3 : */
4 :
5 : #ifndef __gen_nsIXPCScriptable_h__
6 : #define __gen_nsIXPCScriptable_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : #ifndef __gen_nsIClassInfo_h__
14 : #include "nsIClassInfo.h"
15 : #endif
16 :
17 : #include "js/Value.h"
18 :
19 : /* For IDL files that don't want to include root IDL files. */
20 : #ifndef NS_NO_VTABLE
21 : #define NS_NO_VTABLE
22 : #endif
23 : #ifdef XP_WIN
24 : #undef GetClassName
25 : #endif
26 : #include "js/TypeDecls.h"
27 : struct JSFreeOp;
28 : namespace js {
29 : struct Class;
30 : }
31 : class nsIXPConnectWrappedNative; /* forward declaration */
32 :
33 : // nsIXPCScriptable flags (only 32 bits available!). They are defined via
34 : // #defines so they can be used in #ifndef guards in xpc_map_end.h.
35 : #define XPC_SCRIPTABLE_WANT_PRECREATE (1 << 0)
36 : #define XPC_SCRIPTABLE_WANT_GETPROPERTY (1 << 1)
37 : #define XPC_SCRIPTABLE_WANT_SETPROPERTY (1 << 2)
38 : #define XPC_SCRIPTABLE_WANT_ENUMERATE (1 << 3)
39 : #define XPC_SCRIPTABLE_WANT_NEWENUMERATE (1 << 4)
40 : #define XPC_SCRIPTABLE_WANT_RESOLVE (1 << 5)
41 : #define XPC_SCRIPTABLE_WANT_FINALIZE (1 << 6)
42 : #define XPC_SCRIPTABLE_WANT_CALL (1 << 7)
43 : #define XPC_SCRIPTABLE_WANT_CONSTRUCT (1 << 8)
44 : #define XPC_SCRIPTABLE_WANT_HASINSTANCE (1 << 9)
45 : #define XPC_SCRIPTABLE_USE_JSSTUB_FOR_ADDPROPERTY (1 << 10)
46 : #define XPC_SCRIPTABLE_USE_JSSTUB_FOR_DELPROPERTY (1 << 11)
47 : #define XPC_SCRIPTABLE_USE_JSSTUB_FOR_SETPROPERTY (1 << 12)
48 : #define XPC_SCRIPTABLE_DONT_ENUM_QUERY_INTERFACE (1 << 13)
49 : #define XPC_SCRIPTABLE_DONT_ASK_INSTANCE_FOR_SCRIPTABLE (1 << 14)
50 : #define XPC_SCRIPTABLE_CLASSINFO_INTERFACES_ONLY (1 << 15)
51 : #define XPC_SCRIPTABLE_ALLOW_PROP_MODS_DURING_RESOLVE (1 << 16)
52 : #define XPC_SCRIPTABLE_ALLOW_PROP_MODS_TO_PROTOTYPE (1 << 17)
53 : #define XPC_SCRIPTABLE_IS_GLOBAL_OBJECT (1 << 18)
54 : #define XPC_SCRIPTABLE_DONT_REFLECT_INTERFACE_NAMES (1 << 19)
55 :
56 : /* starting interface: nsIXPCScriptable */
57 : #define NS_IXPCSCRIPTABLE_IID_STR "19b70b26-7c3f-437f-a04a-2a8f9e28b617"
58 :
59 : #define NS_IXPCSCRIPTABLE_IID \
60 : {0x19b70b26, 0x7c3f, 0x437f, \
61 : { 0xa0, 0x4a, 0x2a, 0x8f, 0x9e, 0x28, 0xb6, 0x17 }}
62 :
63 2153 : class nsIXPCScriptable : public nsISupports {
64 : public:
65 :
66 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCSCRIPTABLE_IID)
67 :
68 : /* readonly attribute string className; */
69 : NS_IMETHOD GetClassName(char * *aClassName) = 0;
70 :
71 : /* [nostdcall,notxpcom] uint32_t getScriptableFlags (); */
72 : virtual uint32_t GetScriptableFlags(void) = 0;
73 :
74 : /* [nostdcall,notxpcom] jsClassPtr getClass (); */
75 : virtual const js::Class * GetClass(void) = 0;
76 :
77 : /* [nostdcall,notxpcom] JSClassPtr getJSClass (); */
78 : virtual const JSClass * GetJSClass(void) = 0;
79 :
80 : /* void preCreate (in nsISupports nativeObj, in JSContextPtr cx, in JSObjectPtr globalObj, out JSObjectPtr parentObj); */
81 : NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx, JSObject *globalObj, JSObject **parentObj) = 0;
82 :
83 : /* boolean getProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsid id, in JSValPtr vp); */
84 : NS_IMETHOD GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, JS::Value *vp, bool *_retval) = 0;
85 :
86 : /* boolean setProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsid id, in JSValPtr vp); */
87 : NS_IMETHOD SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, JS::Value *vp, bool *_retval) = 0;
88 :
89 : /* boolean enumerate (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj); */
90 : NS_IMETHOD Enumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, bool *_retval) = 0;
91 :
92 : /* boolean newEnumerate (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSAutoIdVector properties); */
93 : NS_IMETHOD NewEnumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, JS::AutoIdVector & properties, bool *_retval) = 0;
94 :
95 : /* boolean resolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsid id, out boolean resolvedp); */
96 : NS_IMETHOD Resolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, bool *resolvedp, bool *_retval) = 0;
97 :
98 : /* void finalize (in nsIXPConnectWrappedNative wrapper, in JSFreeOpPtr fop, in JSObjectPtr obj); */
99 : NS_IMETHOD Finalize(nsIXPConnectWrappedNative *wrapper, JSFreeOp *fop, JSObject *obj) = 0;
100 :
101 : /* boolean call (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSCallArgsRef args); */
102 : NS_IMETHOD Call(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, const JS::CallArgs & args, bool *_retval) = 0;
103 :
104 : /* boolean construct (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSCallArgsRef args); */
105 : NS_IMETHOD Construct(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, const JS::CallArgs & args, bool *_retval) = 0;
106 :
107 : /* boolean hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out boolean bp); */
108 : NS_IMETHOD HasInstance(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, JS::HandleValue val, bool *bp, bool *_retval) = 0;
109 :
110 : /* void postCreatePrototype (in JSContextPtr cx, in JSObjectPtr proto); */
111 : NS_IMETHOD PostCreatePrototype(JSContext *cx, JSObject *proto) = 0;
112 :
113 : #define GET_IT(f_, c_) \
114 : bool f_() { \
115 : return 0 != (GetScriptableFlags() & XPC_SCRIPTABLE_##c_); \
116 : }
117 5592 : GET_IT(WantPreCreate, WANT_PRECREATE)
118 : GET_IT(WantGetProperty, WANT_GETPROPERTY)
119 : GET_IT(WantSetProperty, WANT_SETPROPERTY)
120 1 : GET_IT(WantEnumerate, WANT_ENUMERATE)
121 3 : GET_IT(WantNewEnumerate, WANT_NEWENUMERATE)
122 19330 : GET_IT(WantResolve, WANT_RESOLVE)
123 : GET_IT(WantFinalize, WANT_FINALIZE)
124 0 : GET_IT(WantCall, WANT_CALL)
125 0 : GET_IT(WantConstruct, WANT_CONSTRUCT)
126 : GET_IT(WantHasInstance, WANT_HASINSTANCE)
127 : GET_IT(UseJSStubForAddProperty, USE_JSSTUB_FOR_ADDPROPERTY)
128 : GET_IT(UseJSStubForDelProperty, USE_JSSTUB_FOR_DELPROPERTY)
129 : GET_IT(UseJSStubForSetProperty, USE_JSSTUB_FOR_SETPROPERTY)
130 3981 : GET_IT(DontEnumQueryInterface, DONT_ENUM_QUERY_INTERFACE)
131 3995 : GET_IT(DontAskInstanceForScriptable, DONT_ASK_INSTANCE_FOR_SCRIPTABLE)
132 5837 : GET_IT(ClassInfoInterfacesOnly, CLASSINFO_INTERFACES_ONLY)
133 20609 : GET_IT(AllowPropModsDuringResolve, ALLOW_PROP_MODS_DURING_RESOLVE)
134 3149 : GET_IT(AllowPropModsToPrototype, ALLOW_PROP_MODS_TO_PROTOTYPE)
135 2480 : GET_IT(IsGlobalObject, IS_GLOBAL_OBJECT)
136 298 : GET_IT(DontReflectInterfaceNames, DONT_REFLECT_INTERFACE_NAMES)
137 : #undef GET_IT
138 : };
139 :
140 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPCScriptable, NS_IXPCSCRIPTABLE_IID)
141 :
142 : /* Use this macro when declaring classes that implement this interface. */
143 : #define NS_DECL_NSIXPCSCRIPTABLE \
144 : NS_IMETHOD GetClassName(char * *aClassName) override; \
145 : virtual uint32_t GetScriptableFlags(void) override; \
146 : virtual const js::Class * GetClass(void) override; \
147 : virtual const JSClass * GetJSClass(void) override; \
148 : NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx, JSObject *globalObj, JSObject **parentObj) override; \
149 : NS_IMETHOD GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, JS::Value *vp, bool *_retval) override; \
150 : NS_IMETHOD SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, JS::Value *vp, bool *_retval) override; \
151 : NS_IMETHOD Enumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, bool *_retval) override; \
152 : NS_IMETHOD NewEnumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, JS::AutoIdVector & properties, bool *_retval) override; \
153 : NS_IMETHOD Resolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, bool *resolvedp, bool *_retval) override; \
154 : NS_IMETHOD Finalize(nsIXPConnectWrappedNative *wrapper, JSFreeOp *fop, JSObject *obj) override; \
155 : NS_IMETHOD Call(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, const JS::CallArgs & args, bool *_retval) override; \
156 : NS_IMETHOD Construct(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, const JS::CallArgs & args, bool *_retval) override; \
157 : NS_IMETHOD HasInstance(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, JS::HandleValue val, bool *bp, bool *_retval) override; \
158 : NS_IMETHOD PostCreatePrototype(JSContext *cx, JSObject *proto) override; \
159 :
160 : /* Use this macro when declaring the members of this interface when the
161 : class doesn't implement the interface. This is useful for forwarding. */
162 : #define NS_DECL_NON_VIRTUAL_NSIXPCSCRIPTABLE \
163 : nsresult GetClassName(char * *aClassName); \
164 : uint32_t GetScriptableFlags(void); \
165 : const js::Class * GetClass(void); \
166 : const JSClass * GetJSClass(void); \
167 : nsresult PreCreate(nsISupports *nativeObj, JSContext *cx, JSObject *globalObj, JSObject **parentObj); \
168 : nsresult GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, JS::Value *vp, bool *_retval); \
169 : nsresult SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, JS::Value *vp, bool *_retval); \
170 : nsresult Enumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, bool *_retval); \
171 : nsresult NewEnumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, JS::AutoIdVector & properties, bool *_retval); \
172 : nsresult Resolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, bool *resolvedp, bool *_retval); \
173 : nsresult Finalize(nsIXPConnectWrappedNative *wrapper, JSFreeOp *fop, JSObject *obj); \
174 : nsresult Call(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, const JS::CallArgs & args, bool *_retval); \
175 : nsresult Construct(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, const JS::CallArgs & args, bool *_retval); \
176 : nsresult HasInstance(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, JS::HandleValue val, bool *bp, bool *_retval); \
177 : nsresult PostCreatePrototype(JSContext *cx, JSObject *proto); \
178 :
179 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
180 : #define NS_FORWARD_NSIXPCSCRIPTABLE(_to) \
181 : NS_IMETHOD GetClassName(char * *aClassName) override { return _to GetClassName(aClassName); } \
182 : virtual uint32_t GetScriptableFlags(void) override { return _to GetScriptableFlags(); } \
183 : virtual const js::Class * GetClass(void) override { return _to GetClass(); } \
184 : virtual const JSClass * GetJSClass(void) override { return _to GetJSClass(); } \
185 : NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx, JSObject *globalObj, JSObject **parentObj) override { return _to PreCreate(nativeObj, cx, globalObj, parentObj); } \
186 : NS_IMETHOD GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, JS::Value *vp, bool *_retval) override { return _to GetProperty(wrapper, cx, obj, id, vp, _retval); } \
187 : NS_IMETHOD SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, JS::Value *vp, bool *_retval) override { return _to SetProperty(wrapper, cx, obj, id, vp, _retval); } \
188 : NS_IMETHOD Enumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, bool *_retval) override { return _to Enumerate(wrapper, cx, obj, _retval); } \
189 : NS_IMETHOD NewEnumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, JS::AutoIdVector & properties, bool *_retval) override { return _to NewEnumerate(wrapper, cx, obj, properties, _retval); } \
190 : NS_IMETHOD Resolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, bool *resolvedp, bool *_retval) override { return _to Resolve(wrapper, cx, obj, id, resolvedp, _retval); } \
191 : NS_IMETHOD Finalize(nsIXPConnectWrappedNative *wrapper, JSFreeOp *fop, JSObject *obj) override { return _to Finalize(wrapper, fop, obj); } \
192 : NS_IMETHOD Call(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, const JS::CallArgs & args, bool *_retval) override { return _to Call(wrapper, cx, obj, args, _retval); } \
193 : NS_IMETHOD Construct(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, const JS::CallArgs & args, bool *_retval) override { return _to Construct(wrapper, cx, obj, args, _retval); } \
194 : NS_IMETHOD HasInstance(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, JS::HandleValue val, bool *bp, bool *_retval) override { return _to HasInstance(wrapper, cx, obj, val, bp, _retval); } \
195 : NS_IMETHOD PostCreatePrototype(JSContext *cx, JSObject *proto) override { return _to PostCreatePrototype(cx, proto); } \
196 :
197 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
198 : #define NS_FORWARD_SAFE_NSIXPCSCRIPTABLE(_to) \
199 : NS_IMETHOD GetClassName(char * *aClassName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassName(aClassName); } \
200 : virtual uint32_t GetScriptableFlags(void) override; \
201 : virtual const js::Class * GetClass(void) override; \
202 : virtual const JSClass * GetJSClass(void) override; \
203 : NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx, JSObject *globalObj, JSObject **parentObj) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PreCreate(nativeObj, cx, globalObj, parentObj); } \
204 : NS_IMETHOD GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, JS::Value *vp, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProperty(wrapper, cx, obj, id, vp, _retval); } \
205 : NS_IMETHOD SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, JS::Value *vp, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetProperty(wrapper, cx, obj, id, vp, _retval); } \
206 : NS_IMETHOD Enumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Enumerate(wrapper, cx, obj, _retval); } \
207 : NS_IMETHOD NewEnumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, JS::AutoIdVector & properties, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NewEnumerate(wrapper, cx, obj, properties, _retval); } \
208 : NS_IMETHOD Resolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, bool *resolvedp, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Resolve(wrapper, cx, obj, id, resolvedp, _retval); } \
209 : NS_IMETHOD Finalize(nsIXPConnectWrappedNative *wrapper, JSFreeOp *fop, JSObject *obj) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Finalize(wrapper, fop, obj); } \
210 : NS_IMETHOD Call(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, const JS::CallArgs & args, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Call(wrapper, cx, obj, args, _retval); } \
211 : NS_IMETHOD Construct(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, const JS::CallArgs & args, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Construct(wrapper, cx, obj, args, _retval); } \
212 : NS_IMETHOD HasInstance(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, JS::HandleValue val, bool *bp, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasInstance(wrapper, cx, obj, val, bp, _retval); } \
213 : NS_IMETHOD PostCreatePrototype(JSContext *cx, JSObject *proto) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PostCreatePrototype(cx, proto); } \
214 :
215 : #if 0
216 : /* Use the code below as a template for the implementation class for this interface. */
217 :
218 : /* Header file */
219 : class nsXPCScriptable : public nsIXPCScriptable
220 : {
221 : public:
222 : NS_DECL_ISUPPORTS
223 : NS_DECL_NSIXPCSCRIPTABLE
224 :
225 : nsXPCScriptable();
226 :
227 : private:
228 : ~nsXPCScriptable();
229 :
230 : protected:
231 : /* additional members */
232 : };
233 :
234 : /* Implementation file */
235 : NS_IMPL_ISUPPORTS(nsXPCScriptable, nsIXPCScriptable)
236 :
237 : nsXPCScriptable::nsXPCScriptable()
238 : {
239 : /* member initializers and constructor code */
240 : }
241 :
242 : nsXPCScriptable::~nsXPCScriptable()
243 : {
244 : /* destructor code */
245 : }
246 :
247 : /* readonly attribute string className; */
248 : NS_IMETHODIMP nsXPCScriptable::GetClassName(char * *aClassName)
249 : {
250 : return NS_ERROR_NOT_IMPLEMENTED;
251 : }
252 :
253 : /* [nostdcall,notxpcom] uint32_t getScriptableFlags (); */
254 : uint32_t nsXPCScriptable::GetScriptableFlags()
255 : {
256 : return NS_ERROR_NOT_IMPLEMENTED;
257 : }
258 :
259 : /* [nostdcall,notxpcom] jsClassPtr getClass (); */
260 : const js::Class * nsXPCScriptable::GetClass()
261 : {
262 : return NS_ERROR_NOT_IMPLEMENTED;
263 : }
264 :
265 : /* [nostdcall,notxpcom] JSClassPtr getJSClass (); */
266 : const JSClass * nsXPCScriptable::GetJSClass()
267 : {
268 : return NS_ERROR_NOT_IMPLEMENTED;
269 : }
270 :
271 : /* void preCreate (in nsISupports nativeObj, in JSContextPtr cx, in JSObjectPtr globalObj, out JSObjectPtr parentObj); */
272 : NS_IMETHODIMP nsXPCScriptable::PreCreate(nsISupports *nativeObj, JSContext *cx, JSObject *globalObj, JSObject **parentObj)
273 : {
274 : return NS_ERROR_NOT_IMPLEMENTED;
275 : }
276 :
277 : /* boolean getProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsid id, in JSValPtr vp); */
278 : NS_IMETHODIMP nsXPCScriptable::GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, JS::Value *vp, bool *_retval)
279 : {
280 : return NS_ERROR_NOT_IMPLEMENTED;
281 : }
282 :
283 : /* boolean setProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsid id, in JSValPtr vp); */
284 : NS_IMETHODIMP nsXPCScriptable::SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, JS::Value *vp, bool *_retval)
285 : {
286 : return NS_ERROR_NOT_IMPLEMENTED;
287 : }
288 :
289 : /* boolean enumerate (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj); */
290 : NS_IMETHODIMP nsXPCScriptable::Enumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, bool *_retval)
291 : {
292 : return NS_ERROR_NOT_IMPLEMENTED;
293 : }
294 :
295 : /* boolean newEnumerate (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSAutoIdVector properties); */
296 : NS_IMETHODIMP nsXPCScriptable::NewEnumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, JS::AutoIdVector & properties, bool *_retval)
297 : {
298 : return NS_ERROR_NOT_IMPLEMENTED;
299 : }
300 :
301 : /* boolean resolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsid id, out boolean resolvedp); */
302 : NS_IMETHODIMP nsXPCScriptable::Resolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsid id, bool *resolvedp, bool *_retval)
303 : {
304 : return NS_ERROR_NOT_IMPLEMENTED;
305 : }
306 :
307 : /* void finalize (in nsIXPConnectWrappedNative wrapper, in JSFreeOpPtr fop, in JSObjectPtr obj); */
308 : NS_IMETHODIMP nsXPCScriptable::Finalize(nsIXPConnectWrappedNative *wrapper, JSFreeOp *fop, JSObject *obj)
309 : {
310 : return NS_ERROR_NOT_IMPLEMENTED;
311 : }
312 :
313 : /* boolean call (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSCallArgsRef args); */
314 : NS_IMETHODIMP nsXPCScriptable::Call(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, const JS::CallArgs & args, bool *_retval)
315 : {
316 : return NS_ERROR_NOT_IMPLEMENTED;
317 : }
318 :
319 : /* boolean construct (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSCallArgsRef args); */
320 : NS_IMETHODIMP nsXPCScriptable::Construct(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, const JS::CallArgs & args, bool *_retval)
321 : {
322 : return NS_ERROR_NOT_IMPLEMENTED;
323 : }
324 :
325 : /* boolean hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out boolean bp); */
326 : NS_IMETHODIMP nsXPCScriptable::HasInstance(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, JS::HandleValue val, bool *bp, bool *_retval)
327 : {
328 : return NS_ERROR_NOT_IMPLEMENTED;
329 : }
330 :
331 : /* void postCreatePrototype (in JSContextPtr cx, in JSObjectPtr proto); */
332 : NS_IMETHODIMP nsXPCScriptable::PostCreatePrototype(JSContext *cx, JSObject *proto)
333 : {
334 : return NS_ERROR_NOT_IMPLEMENTED;
335 : }
336 :
337 : /* End of implementation class template. */
338 : #endif
339 :
340 :
341 : #include "nsAutoPtr.h"
342 : #define NS_XPCCLASSINFO_IID \
343 : { 0x43b67f01, 0xd4ce, 0x4b82, \
344 : { 0xb3, 0xf8, 0xeb, 0xf2, 0x13, 0x60, 0xfb, 0x7e } }
345 8 : class NS_NO_VTABLE nsXPCClassInfo : public nsIClassInfo,
346 : public nsIXPCScriptable
347 : {
348 : public:
349 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_XPCCLASSINFO_IID)
350 : NS_IMETHOD_(MozExternalRefCountType) AddRef() override = 0;
351 : NS_IMETHOD_(MozExternalRefCountType) Release() override = 0;
352 : virtual void PreserveWrapper(nsISupports *aNative) = 0;
353 : };
354 : NS_DEFINE_STATIC_IID_ACCESSOR(nsXPCClassInfo, NS_XPCCLASSINFO_IID)
355 : inline
356 : nsresult
357 515 : CallQueryInterface(nsISupports* aSourcePtr,
358 : RefPtrGetterAddRefs<nsXPCClassInfo> aDestPtr)
359 : {
360 515 : return CallQueryInterface(aSourcePtr,
361 515 : static_cast<nsXPCClassInfo**>(aDestPtr));
362 : }
363 :
364 : #endif /* __gen_nsIXPCScriptable_h__ */
|