Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIAddonPolicyService.idl
3 : */
4 :
5 : #ifndef __gen_nsIAddonPolicyService_h__
6 : #define __gen_nsIAddonPolicyService_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : #ifndef __gen_nsIURI_h__
14 : #include "nsIURI.h"
15 : #endif
16 :
17 : /* For IDL files that don't want to include root IDL files. */
18 : #ifndef NS_NO_VTABLE
19 : #define NS_NO_VTABLE
20 : #endif
21 :
22 : /* starting interface: nsIAddonPolicyService */
23 : #define NS_IADDONPOLICYSERVICE_IID_STR "8a034ef9-9d14-4c5d-8319-06c1ab574baa"
24 :
25 : #define NS_IADDONPOLICYSERVICE_IID \
26 : {0x8a034ef9, 0x9d14, 0x4c5d, \
27 : { 0x83, 0x19, 0x06, 0xc1, 0xab, 0x57, 0x4b, 0xaa }}
28 :
29 0 : class NS_NO_VTABLE nsIAddonPolicyService : public nsISupports {
30 : public:
31 :
32 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IADDONPOLICYSERVICE_IID)
33 :
34 : /* readonly attribute AString baseCSP; */
35 : NS_IMETHOD GetBaseCSP(nsAString & aBaseCSP) = 0;
36 :
37 : /* readonly attribute AString defaultCSP; */
38 : NS_IMETHOD GetDefaultCSP(nsAString & aDefaultCSP) = 0;
39 :
40 : /* AString getAddonCSP (in AString aAddonId); */
41 : NS_IMETHOD GetAddonCSP(const nsAString & aAddonId, nsAString & _retval) = 0;
42 :
43 : /* ACString getGeneratedBackgroundPageUrl (in ACString aAddonId); */
44 : NS_IMETHOD GetGeneratedBackgroundPageUrl(const nsACString & aAddonId, nsACString & _retval) = 0;
45 :
46 : /* boolean addonHasPermission (in AString aAddonId, in AString aPerm); */
47 : NS_IMETHOD AddonHasPermission(const nsAString & aAddonId, const nsAString & aPerm, bool *_retval) = 0;
48 :
49 : /* boolean addonMayLoadURI (in AString aAddonId, in nsIURI aURI, [optional] in boolean aExplicit); */
50 : NS_IMETHOD AddonMayLoadURI(const nsAString & aAddonId, nsIURI *aURI, bool aExplicit, bool *_retval) = 0;
51 :
52 : /* boolean extensionURILoadableByAnyone (in nsIURI aURI); */
53 : NS_IMETHOD ExtensionURILoadableByAnyone(nsIURI *aURI, bool *_retval) = 0;
54 :
55 : /* AString extensionURIToAddonId (in nsIURI aURI); */
56 : NS_IMETHOD ExtensionURIToAddonId(nsIURI *aURI, nsAString & _retval) = 0;
57 :
58 : };
59 :
60 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIAddonPolicyService, NS_IADDONPOLICYSERVICE_IID)
61 :
62 : /* Use this macro when declaring classes that implement this interface. */
63 : #define NS_DECL_NSIADDONPOLICYSERVICE \
64 : NS_IMETHOD GetBaseCSP(nsAString & aBaseCSP) override; \
65 : NS_IMETHOD GetDefaultCSP(nsAString & aDefaultCSP) override; \
66 : NS_IMETHOD GetAddonCSP(const nsAString & aAddonId, nsAString & _retval) override; \
67 : NS_IMETHOD GetGeneratedBackgroundPageUrl(const nsACString & aAddonId, nsACString & _retval) override; \
68 : NS_IMETHOD AddonHasPermission(const nsAString & aAddonId, const nsAString & aPerm, bool *_retval) override; \
69 : NS_IMETHOD AddonMayLoadURI(const nsAString & aAddonId, nsIURI *aURI, bool aExplicit, bool *_retval) override; \
70 : NS_IMETHOD ExtensionURILoadableByAnyone(nsIURI *aURI, bool *_retval) override; \
71 : NS_IMETHOD ExtensionURIToAddonId(nsIURI *aURI, nsAString & _retval) override;
72 :
73 : /* Use this macro when declaring the members of this interface when the
74 : class doesn't implement the interface. This is useful for forwarding. */
75 : #define NS_DECL_NON_VIRTUAL_NSIADDONPOLICYSERVICE \
76 : nsresult GetBaseCSP(nsAString & aBaseCSP); \
77 : nsresult GetDefaultCSP(nsAString & aDefaultCSP); \
78 : nsresult GetAddonCSP(const nsAString & aAddonId, nsAString & _retval); \
79 : nsresult GetGeneratedBackgroundPageUrl(const nsACString & aAddonId, nsACString & _retval); \
80 : nsresult AddonHasPermission(const nsAString & aAddonId, const nsAString & aPerm, bool *_retval); \
81 : nsresult AddonMayLoadURI(const nsAString & aAddonId, nsIURI *aURI, bool aExplicit, bool *_retval); \
82 : nsresult ExtensionURILoadableByAnyone(nsIURI *aURI, bool *_retval); \
83 : nsresult ExtensionURIToAddonId(nsIURI *aURI, nsAString & _retval);
84 :
85 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
86 : #define NS_FORWARD_NSIADDONPOLICYSERVICE(_to) \
87 : NS_IMETHOD GetBaseCSP(nsAString & aBaseCSP) override { return _to GetBaseCSP(aBaseCSP); } \
88 : NS_IMETHOD GetDefaultCSP(nsAString & aDefaultCSP) override { return _to GetDefaultCSP(aDefaultCSP); } \
89 : NS_IMETHOD GetAddonCSP(const nsAString & aAddonId, nsAString & _retval) override { return _to GetAddonCSP(aAddonId, _retval); } \
90 : NS_IMETHOD GetGeneratedBackgroundPageUrl(const nsACString & aAddonId, nsACString & _retval) override { return _to GetGeneratedBackgroundPageUrl(aAddonId, _retval); } \
91 : NS_IMETHOD AddonHasPermission(const nsAString & aAddonId, const nsAString & aPerm, bool *_retval) override { return _to AddonHasPermission(aAddonId, aPerm, _retval); } \
92 : NS_IMETHOD AddonMayLoadURI(const nsAString & aAddonId, nsIURI *aURI, bool aExplicit, bool *_retval) override { return _to AddonMayLoadURI(aAddonId, aURI, aExplicit, _retval); } \
93 : NS_IMETHOD ExtensionURILoadableByAnyone(nsIURI *aURI, bool *_retval) override { return _to ExtensionURILoadableByAnyone(aURI, _retval); } \
94 : NS_IMETHOD ExtensionURIToAddonId(nsIURI *aURI, nsAString & _retval) override { return _to ExtensionURIToAddonId(aURI, _retval); }
95 :
96 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
97 : #define NS_FORWARD_SAFE_NSIADDONPOLICYSERVICE(_to) \
98 : NS_IMETHOD GetBaseCSP(nsAString & aBaseCSP) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBaseCSP(aBaseCSP); } \
99 : NS_IMETHOD GetDefaultCSP(nsAString & aDefaultCSP) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultCSP(aDefaultCSP); } \
100 : NS_IMETHOD GetAddonCSP(const nsAString & aAddonId, nsAString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAddonCSP(aAddonId, _retval); } \
101 : NS_IMETHOD GetGeneratedBackgroundPageUrl(const nsACString & aAddonId, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetGeneratedBackgroundPageUrl(aAddonId, _retval); } \
102 : NS_IMETHOD AddonHasPermission(const nsAString & aAddonId, const nsAString & aPerm, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddonHasPermission(aAddonId, aPerm, _retval); } \
103 : NS_IMETHOD AddonMayLoadURI(const nsAString & aAddonId, nsIURI *aURI, bool aExplicit, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddonMayLoadURI(aAddonId, aURI, aExplicit, _retval); } \
104 : NS_IMETHOD ExtensionURILoadableByAnyone(nsIURI *aURI, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ExtensionURILoadableByAnyone(aURI, _retval); } \
105 : NS_IMETHOD ExtensionURIToAddonId(nsIURI *aURI, nsAString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ExtensionURIToAddonId(aURI, _retval); }
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 nsAddonPolicyService : public nsIAddonPolicyService
112 : {
113 : public:
114 : NS_DECL_ISUPPORTS
115 : NS_DECL_NSIADDONPOLICYSERVICE
116 :
117 : nsAddonPolicyService();
118 :
119 : private:
120 : ~nsAddonPolicyService();
121 :
122 : protected:
123 : /* additional members */
124 : };
125 :
126 : /* Implementation file */
127 : NS_IMPL_ISUPPORTS(nsAddonPolicyService, nsIAddonPolicyService)
128 :
129 : nsAddonPolicyService::nsAddonPolicyService()
130 : {
131 : /* member initializers and constructor code */
132 : }
133 :
134 : nsAddonPolicyService::~nsAddonPolicyService()
135 : {
136 : /* destructor code */
137 : }
138 :
139 : /* readonly attribute AString baseCSP; */
140 : NS_IMETHODIMP nsAddonPolicyService::GetBaseCSP(nsAString & aBaseCSP)
141 : {
142 : return NS_ERROR_NOT_IMPLEMENTED;
143 : }
144 :
145 : /* readonly attribute AString defaultCSP; */
146 : NS_IMETHODIMP nsAddonPolicyService::GetDefaultCSP(nsAString & aDefaultCSP)
147 : {
148 : return NS_ERROR_NOT_IMPLEMENTED;
149 : }
150 :
151 : /* AString getAddonCSP (in AString aAddonId); */
152 : NS_IMETHODIMP nsAddonPolicyService::GetAddonCSP(const nsAString & aAddonId, nsAString & _retval)
153 : {
154 : return NS_ERROR_NOT_IMPLEMENTED;
155 : }
156 :
157 : /* ACString getGeneratedBackgroundPageUrl (in ACString aAddonId); */
158 : NS_IMETHODIMP nsAddonPolicyService::GetGeneratedBackgroundPageUrl(const nsACString & aAddonId, nsACString & _retval)
159 : {
160 : return NS_ERROR_NOT_IMPLEMENTED;
161 : }
162 :
163 : /* boolean addonHasPermission (in AString aAddonId, in AString aPerm); */
164 : NS_IMETHODIMP nsAddonPolicyService::AddonHasPermission(const nsAString & aAddonId, const nsAString & aPerm, bool *_retval)
165 : {
166 : return NS_ERROR_NOT_IMPLEMENTED;
167 : }
168 :
169 : /* boolean addonMayLoadURI (in AString aAddonId, in nsIURI aURI, [optional] in boolean aExplicit); */
170 : NS_IMETHODIMP nsAddonPolicyService::AddonMayLoadURI(const nsAString & aAddonId, nsIURI *aURI, bool aExplicit, bool *_retval)
171 : {
172 : return NS_ERROR_NOT_IMPLEMENTED;
173 : }
174 :
175 : /* boolean extensionURILoadableByAnyone (in nsIURI aURI); */
176 : NS_IMETHODIMP nsAddonPolicyService::ExtensionURILoadableByAnyone(nsIURI *aURI, bool *_retval)
177 : {
178 : return NS_ERROR_NOT_IMPLEMENTED;
179 : }
180 :
181 : /* AString extensionURIToAddonId (in nsIURI aURI); */
182 : NS_IMETHODIMP nsAddonPolicyService::ExtensionURIToAddonId(nsIURI *aURI, nsAString & _retval)
183 : {
184 : return NS_ERROR_NOT_IMPLEMENTED;
185 : }
186 :
187 : /* End of implementation class template. */
188 : #endif
189 :
190 :
191 : /* starting interface: nsIAddonContentPolicy */
192 : #define NS_IADDONCONTENTPOLICY_IID_STR "7a4fe60b-9131-45f5-83f3-dc63b5d71a5d"
193 :
194 : #define NS_IADDONCONTENTPOLICY_IID \
195 : {0x7a4fe60b, 0x9131, 0x45f5, \
196 : { 0x83, 0xf3, 0xdc, 0x63, 0xb5, 0xd7, 0x1a, 0x5d }}
197 :
198 2 : class NS_NO_VTABLE nsIAddonContentPolicy : public nsISupports {
199 : public:
200 :
201 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IADDONCONTENTPOLICY_IID)
202 :
203 : /* AString validateAddonCSP (in AString aPolicyString); */
204 : NS_IMETHOD ValidateAddonCSP(const nsAString & aPolicyString, nsAString & _retval) = 0;
205 :
206 : };
207 :
208 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIAddonContentPolicy, NS_IADDONCONTENTPOLICY_IID)
209 :
210 : /* Use this macro when declaring classes that implement this interface. */
211 : #define NS_DECL_NSIADDONCONTENTPOLICY \
212 : NS_IMETHOD ValidateAddonCSP(const nsAString & aPolicyString, nsAString & _retval) override;
213 :
214 : /* Use this macro when declaring the members of this interface when the
215 : class doesn't implement the interface. This is useful for forwarding. */
216 : #define NS_DECL_NON_VIRTUAL_NSIADDONCONTENTPOLICY \
217 : nsresult ValidateAddonCSP(const nsAString & aPolicyString, nsAString & _retval);
218 :
219 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
220 : #define NS_FORWARD_NSIADDONCONTENTPOLICY(_to) \
221 : NS_IMETHOD ValidateAddonCSP(const nsAString & aPolicyString, nsAString & _retval) override { return _to ValidateAddonCSP(aPolicyString, _retval); }
222 :
223 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
224 : #define NS_FORWARD_SAFE_NSIADDONCONTENTPOLICY(_to) \
225 : NS_IMETHOD ValidateAddonCSP(const nsAString & aPolicyString, nsAString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ValidateAddonCSP(aPolicyString, _retval); }
226 :
227 : #if 0
228 : /* Use the code below as a template for the implementation class for this interface. */
229 :
230 : /* Header file */
231 : class nsAddonContentPolicy : public nsIAddonContentPolicy
232 : {
233 : public:
234 : NS_DECL_ISUPPORTS
235 : NS_DECL_NSIADDONCONTENTPOLICY
236 :
237 : nsAddonContentPolicy();
238 :
239 : private:
240 : ~nsAddonContentPolicy();
241 :
242 : protected:
243 : /* additional members */
244 : };
245 :
246 : /* Implementation file */
247 : NS_IMPL_ISUPPORTS(nsAddonContentPolicy, nsIAddonContentPolicy)
248 :
249 : nsAddonContentPolicy::nsAddonContentPolicy()
250 : {
251 : /* member initializers and constructor code */
252 : }
253 :
254 : nsAddonContentPolicy::~nsAddonContentPolicy()
255 : {
256 : /* destructor code */
257 : }
258 :
259 : /* AString validateAddonCSP (in AString aPolicyString); */
260 : NS_IMETHODIMP nsAddonContentPolicy::ValidateAddonCSP(const nsAString & aPolicyString, nsAString & _retval)
261 : {
262 : return NS_ERROR_NOT_IMPLEMENTED;
263 : }
264 :
265 : /* End of implementation class template. */
266 : #endif
267 :
268 :
269 : #endif /* __gen_nsIAddonPolicyService_h__ */
|