Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/mozIJSSubScriptLoader.idl
3 : */
4 :
5 : #ifndef __gen_mozIJSSubScriptLoader_h__
6 : #define __gen_mozIJSSubScriptLoader_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 : class nsIURI; /* forward declaration */
20 :
21 : class nsIPrincipal; /* forward declaration */
22 :
23 : class nsIObserver; /* forward declaration */
24 :
25 :
26 : /* starting interface: mozIJSSubScriptLoader */
27 : #define MOZIJSSUBSCRIPTLOADER_IID_STR "19533e7b-f321-4ef1-bc59-6e812dc2a733"
28 :
29 : #define MOZIJSSUBSCRIPTLOADER_IID \
30 : {0x19533e7b, 0xf321, 0x4ef1, \
31 : { 0xbc, 0x59, 0x6e, 0x81, 0x2d, 0xc2, 0xa7, 0x33 }}
32 :
33 2 : class NS_NO_VTABLE mozIJSSubScriptLoader : public nsISupports {
34 : public:
35 :
36 : NS_DECLARE_STATIC_IID_ACCESSOR(MOZIJSSUBSCRIPTLOADER_IID)
37 :
38 : /* [implicit_jscontext] jsval loadSubScript (in AString url, [optional] in jsval obj, [optional] in AString charset); */
39 : NS_IMETHOD LoadSubScript(const nsAString & url, JS::HandleValue obj, const nsAString & charset, JSContext* cx, JS::MutableHandleValue _retval) = 0;
40 :
41 : /* [implicit_jscontext] jsval loadSubScriptWithOptions (in AString url, in jsval options); */
42 : NS_IMETHOD LoadSubScriptWithOptions(const nsAString & url, JS::HandleValue options, JSContext* cx, JS::MutableHandleValue _retval) = 0;
43 :
44 : /* void precompileScript (in nsIURI uri, in nsIPrincipal principal, in nsIObserver observer); */
45 : NS_IMETHOD PrecompileScript(nsIURI *uri, nsIPrincipal *principal, nsIObserver *observer) = 0;
46 :
47 : };
48 :
49 : NS_DEFINE_STATIC_IID_ACCESSOR(mozIJSSubScriptLoader, MOZIJSSUBSCRIPTLOADER_IID)
50 :
51 : /* Use this macro when declaring classes that implement this interface. */
52 : #define NS_DECL_MOZIJSSUBSCRIPTLOADER \
53 : NS_IMETHOD LoadSubScript(const nsAString & url, JS::HandleValue obj, const nsAString & charset, JSContext* cx, JS::MutableHandleValue _retval) override; \
54 : NS_IMETHOD LoadSubScriptWithOptions(const nsAString & url, JS::HandleValue options, JSContext* cx, JS::MutableHandleValue _retval) override; \
55 : NS_IMETHOD PrecompileScript(nsIURI *uri, nsIPrincipal *principal, nsIObserver *observer) override;
56 :
57 : /* Use this macro when declaring the members of this interface when the
58 : class doesn't implement the interface. This is useful for forwarding. */
59 : #define NS_DECL_NON_VIRTUAL_MOZIJSSUBSCRIPTLOADER \
60 : nsresult LoadSubScript(const nsAString & url, JS::HandleValue obj, const nsAString & charset, JSContext* cx, JS::MutableHandleValue _retval); \
61 : nsresult LoadSubScriptWithOptions(const nsAString & url, JS::HandleValue options, JSContext* cx, JS::MutableHandleValue _retval); \
62 : nsresult PrecompileScript(nsIURI *uri, nsIPrincipal *principal, nsIObserver *observer);
63 :
64 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
65 : #define NS_FORWARD_MOZIJSSUBSCRIPTLOADER(_to) \
66 : NS_IMETHOD LoadSubScript(const nsAString & url, JS::HandleValue obj, const nsAString & charset, JSContext* cx, JS::MutableHandleValue _retval) override { return _to LoadSubScript(url, obj, charset, cx, _retval); } \
67 : NS_IMETHOD LoadSubScriptWithOptions(const nsAString & url, JS::HandleValue options, JSContext* cx, JS::MutableHandleValue _retval) override { return _to LoadSubScriptWithOptions(url, options, cx, _retval); } \
68 : NS_IMETHOD PrecompileScript(nsIURI *uri, nsIPrincipal *principal, nsIObserver *observer) override { return _to PrecompileScript(uri, principal, observer); }
69 :
70 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
71 : #define NS_FORWARD_SAFE_MOZIJSSUBSCRIPTLOADER(_to) \
72 : NS_IMETHOD LoadSubScript(const nsAString & url, JS::HandleValue obj, const nsAString & charset, JSContext* cx, JS::MutableHandleValue _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadSubScript(url, obj, charset, cx, _retval); } \
73 : NS_IMETHOD LoadSubScriptWithOptions(const nsAString & url, JS::HandleValue options, JSContext* cx, JS::MutableHandleValue _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadSubScriptWithOptions(url, options, cx, _retval); } \
74 : NS_IMETHOD PrecompileScript(nsIURI *uri, nsIPrincipal *principal, nsIObserver *observer) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PrecompileScript(uri, principal, observer); }
75 :
76 : #if 0
77 : /* Use the code below as a template for the implementation class for this interface. */
78 :
79 : /* Header file */
80 : class _MYCLASS_ : public mozIJSSubScriptLoader
81 : {
82 : public:
83 : NS_DECL_ISUPPORTS
84 : NS_DECL_MOZIJSSUBSCRIPTLOADER
85 :
86 : _MYCLASS_();
87 :
88 : private:
89 : ~_MYCLASS_();
90 :
91 : protected:
92 : /* additional members */
93 : };
94 :
95 : /* Implementation file */
96 : NS_IMPL_ISUPPORTS(_MYCLASS_, mozIJSSubScriptLoader)
97 :
98 : _MYCLASS_::_MYCLASS_()
99 : {
100 : /* member initializers and constructor code */
101 : }
102 :
103 : _MYCLASS_::~_MYCLASS_()
104 : {
105 : /* destructor code */
106 : }
107 :
108 : /* [implicit_jscontext] jsval loadSubScript (in AString url, [optional] in jsval obj, [optional] in AString charset); */
109 : NS_IMETHODIMP _MYCLASS_::LoadSubScript(const nsAString & url, JS::HandleValue obj, const nsAString & charset, JSContext* cx, JS::MutableHandleValue _retval)
110 : {
111 : return NS_ERROR_NOT_IMPLEMENTED;
112 : }
113 :
114 : /* [implicit_jscontext] jsval loadSubScriptWithOptions (in AString url, in jsval options); */
115 : NS_IMETHODIMP _MYCLASS_::LoadSubScriptWithOptions(const nsAString & url, JS::HandleValue options, JSContext* cx, JS::MutableHandleValue _retval)
116 : {
117 : return NS_ERROR_NOT_IMPLEMENTED;
118 : }
119 :
120 : /* void precompileScript (in nsIURI uri, in nsIPrincipal principal, in nsIObserver observer); */
121 : NS_IMETHODIMP _MYCLASS_::PrecompileScript(nsIURI *uri, nsIPrincipal *principal, nsIObserver *observer)
122 : {
123 : return NS_ERROR_NOT_IMPLEMENTED;
124 : }
125 :
126 : /* End of implementation class template. */
127 : #endif
128 :
129 :
130 : #endif /* __gen_mozIJSSubScriptLoader_h__ */
|