1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/uriloader/prefetch/nsIOfflineCacheUpdate.idl
3 : */
4 :
5 : #ifndef __gen_nsIOfflineCacheUpdate_h__
6 : #define __gen_nsIOfflineCacheUpdate_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 nsIDOMWindow; /* forward declaration */
20 :
21 : class nsIDOMNode; /* forward declaration */
22 :
23 : class nsIDOMDocument; /* forward declaration */
24 :
25 : class nsIDOMLoadStatus; /* forward declaration */
26 :
27 : class nsIOfflineCacheUpdate; /* forward declaration */
28 :
29 : class nsIPrincipal; /* forward declaration */
30 :
31 : class nsIPrefBranch; /* forward declaration */
32 :
33 : class nsIApplicationCache; /* forward declaration */
34 :
35 :
36 : /* starting interface: nsIOfflineCacheUpdateObserver */
37 : #define NS_IOFFLINECACHEUPDATEOBSERVER_IID_STR "47360d57-8ef4-4a5d-8865-1a27a739ad1a"
38 :
39 : #define NS_IOFFLINECACHEUPDATEOBSERVER_IID \
40 : {0x47360d57, 0x8ef4, 0x4a5d, \
41 : { 0x88, 0x65, 0x1a, 0x27, 0xa7, 0x39, 0xad, 0x1a }}
42 :
43 16 : class NS_NO_VTABLE NS_SCRIPTABLE nsIOfflineCacheUpdateObserver : public nsISupports {
44 : public:
45 :
46 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IOFFLINECACHEUPDATEOBSERVER_IID)
47 :
48 : enum {
49 : STATE_ERROR = 1U,
50 : STATE_CHECKING = 2U,
51 : STATE_NOUPDATE = 3U,
52 : STATE_OBSOLETE = 4U,
53 : STATE_DOWNLOADING = 5U,
54 : STATE_ITEMSTARTED = 6U,
55 : STATE_ITEMCOMPLETED = 7U,
56 : STATE_FINISHED = 10U
57 : };
58 :
59 : /* void updateStateChanged (in nsIOfflineCacheUpdate aUpdate, in PRUint32 state); */
60 : NS_SCRIPTABLE NS_IMETHOD UpdateStateChanged(nsIOfflineCacheUpdate *aUpdate, PRUint32 state) = 0;
61 :
62 : /* void applicationCacheAvailable (in nsIApplicationCache applicationCache); */
63 : NS_SCRIPTABLE NS_IMETHOD ApplicationCacheAvailable(nsIApplicationCache *applicationCache) = 0;
64 :
65 : };
66 :
67 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIOfflineCacheUpdateObserver, NS_IOFFLINECACHEUPDATEOBSERVER_IID)
68 :
69 : /* Use this macro when declaring classes that implement this interface. */
70 : #define NS_DECL_NSIOFFLINECACHEUPDATEOBSERVER \
71 : NS_SCRIPTABLE NS_IMETHOD UpdateStateChanged(nsIOfflineCacheUpdate *aUpdate, PRUint32 state); \
72 : NS_SCRIPTABLE NS_IMETHOD ApplicationCacheAvailable(nsIApplicationCache *applicationCache);
73 :
74 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
75 : #define NS_FORWARD_NSIOFFLINECACHEUPDATEOBSERVER(_to) \
76 : NS_SCRIPTABLE NS_IMETHOD UpdateStateChanged(nsIOfflineCacheUpdate *aUpdate, PRUint32 state) { return _to UpdateStateChanged(aUpdate, state); } \
77 : NS_SCRIPTABLE NS_IMETHOD ApplicationCacheAvailable(nsIApplicationCache *applicationCache) { return _to ApplicationCacheAvailable(applicationCache); }
78 :
79 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
80 : #define NS_FORWARD_SAFE_NSIOFFLINECACHEUPDATEOBSERVER(_to) \
81 : NS_SCRIPTABLE NS_IMETHOD UpdateStateChanged(nsIOfflineCacheUpdate *aUpdate, PRUint32 state) { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateStateChanged(aUpdate, state); } \
82 : NS_SCRIPTABLE NS_IMETHOD ApplicationCacheAvailable(nsIApplicationCache *applicationCache) { return !_to ? NS_ERROR_NULL_POINTER : _to->ApplicationCacheAvailable(applicationCache); }
83 :
84 : #if 0
85 : /* Use the code below as a template for the implementation class for this interface. */
86 :
87 : /* Header file */
88 : class nsOfflineCacheUpdateObserver : public nsIOfflineCacheUpdateObserver
89 : {
90 : public:
91 : NS_DECL_ISUPPORTS
92 : NS_DECL_NSIOFFLINECACHEUPDATEOBSERVER
93 :
94 : nsOfflineCacheUpdateObserver();
95 :
96 : private:
97 : ~nsOfflineCacheUpdateObserver();
98 :
99 : protected:
100 : /* additional members */
101 : };
102 :
103 : /* Implementation file */
104 : NS_IMPL_ISUPPORTS1(nsOfflineCacheUpdateObserver, nsIOfflineCacheUpdateObserver)
105 :
106 : nsOfflineCacheUpdateObserver::nsOfflineCacheUpdateObserver()
107 : {
108 : /* member initializers and constructor code */
109 : }
110 :
111 : nsOfflineCacheUpdateObserver::~nsOfflineCacheUpdateObserver()
112 : {
113 : /* destructor code */
114 : }
115 :
116 : /* void updateStateChanged (in nsIOfflineCacheUpdate aUpdate, in PRUint32 state); */
117 : NS_IMETHODIMP nsOfflineCacheUpdateObserver::UpdateStateChanged(nsIOfflineCacheUpdate *aUpdate, PRUint32 state)
118 : {
119 : return NS_ERROR_NOT_IMPLEMENTED;
120 : }
121 :
122 : /* void applicationCacheAvailable (in nsIApplicationCache applicationCache); */
123 : NS_IMETHODIMP nsOfflineCacheUpdateObserver::ApplicationCacheAvailable(nsIApplicationCache *applicationCache)
124 : {
125 : return NS_ERROR_NOT_IMPLEMENTED;
126 : }
127 :
128 : /* End of implementation class template. */
129 : #endif
130 :
131 :
132 : /* starting interface: nsIOfflineCacheUpdate */
133 : #define NS_IOFFLINECACHEUPDATE_IID_STR "24605d81-8cf9-4021-8575-7f39aacbf31a"
134 :
135 : #define NS_IOFFLINECACHEUPDATE_IID \
136 : {0x24605d81, 0x8cf9, 0x4021, \
137 : { 0x85, 0x75, 0x7f, 0x39, 0xaa, 0xcb, 0xf3, 0x1a }}
138 :
139 16 : class NS_NO_VTABLE NS_SCRIPTABLE nsIOfflineCacheUpdate : public nsISupports {
140 : public:
141 :
142 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IOFFLINECACHEUPDATE_IID)
143 :
144 : /* readonly attribute unsigned short status; */
145 : NS_SCRIPTABLE NS_IMETHOD GetStatus(PRUint16 *aStatus) = 0;
146 :
147 : /* readonly attribute boolean partial; */
148 : NS_SCRIPTABLE NS_IMETHOD GetPartial(bool *aPartial) = 0;
149 :
150 : /* readonly attribute boolean isUpgrade; */
151 : NS_SCRIPTABLE NS_IMETHOD GetIsUpgrade(bool *aIsUpgrade) = 0;
152 :
153 : /* readonly attribute ACString updateDomain; */
154 : NS_SCRIPTABLE NS_IMETHOD GetUpdateDomain(nsACString & aUpdateDomain) = 0;
155 :
156 : /* readonly attribute nsIURI manifestURI; */
157 : NS_SCRIPTABLE NS_IMETHOD GetManifestURI(nsIURI * *aManifestURI) = 0;
158 :
159 : /* readonly attribute boolean succeeded; */
160 : NS_SCRIPTABLE NS_IMETHOD GetSucceeded(bool *aSucceeded) = 0;
161 :
162 : /* void init (in nsIURI aManifestURI, in nsIURI aDocumentURI, in nsIDOMDocument aDocument); */
163 : NS_SCRIPTABLE NS_IMETHOD Init(nsIURI *aManifestURI, nsIURI *aDocumentURI, nsIDOMDocument *aDocument) = 0;
164 :
165 : /* void initPartial (in nsIURI aManifestURI, in ACString aClientID, in nsIURI aDocumentURI); */
166 : NS_SCRIPTABLE NS_IMETHOD InitPartial(nsIURI *aManifestURI, const nsACString & aClientID, nsIURI *aDocumentURI) = 0;
167 :
168 : /* void addDynamicURI (in nsIURI aURI); */
169 : NS_SCRIPTABLE NS_IMETHOD AddDynamicURI(nsIURI *aURI) = 0;
170 :
171 : /* void schedule (); */
172 : NS_SCRIPTABLE NS_IMETHOD Schedule(void) = 0;
173 :
174 : /* void addObserver (in nsIOfflineCacheUpdateObserver aObserver, in boolean aHoldWeak); */
175 : NS_SCRIPTABLE NS_IMETHOD AddObserver(nsIOfflineCacheUpdateObserver *aObserver, bool aHoldWeak) = 0;
176 :
177 : /* void removeObserver (in nsIOfflineCacheUpdateObserver aObserver); */
178 : NS_SCRIPTABLE NS_IMETHOD RemoveObserver(nsIOfflineCacheUpdateObserver *aObserver) = 0;
179 :
180 : };
181 :
182 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIOfflineCacheUpdate, NS_IOFFLINECACHEUPDATE_IID)
183 :
184 : /* Use this macro when declaring classes that implement this interface. */
185 : #define NS_DECL_NSIOFFLINECACHEUPDATE \
186 : NS_SCRIPTABLE NS_IMETHOD GetStatus(PRUint16 *aStatus); \
187 : NS_SCRIPTABLE NS_IMETHOD GetPartial(bool *aPartial); \
188 : NS_SCRIPTABLE NS_IMETHOD GetIsUpgrade(bool *aIsUpgrade); \
189 : NS_SCRIPTABLE NS_IMETHOD GetUpdateDomain(nsACString & aUpdateDomain); \
190 : NS_SCRIPTABLE NS_IMETHOD GetManifestURI(nsIURI * *aManifestURI); \
191 : NS_SCRIPTABLE NS_IMETHOD GetSucceeded(bool *aSucceeded); \
192 : NS_SCRIPTABLE NS_IMETHOD Init(nsIURI *aManifestURI, nsIURI *aDocumentURI, nsIDOMDocument *aDocument); \
193 : NS_SCRIPTABLE NS_IMETHOD InitPartial(nsIURI *aManifestURI, const nsACString & aClientID, nsIURI *aDocumentURI); \
194 : NS_SCRIPTABLE NS_IMETHOD AddDynamicURI(nsIURI *aURI); \
195 : NS_SCRIPTABLE NS_IMETHOD Schedule(void); \
196 : NS_SCRIPTABLE NS_IMETHOD AddObserver(nsIOfflineCacheUpdateObserver *aObserver, bool aHoldWeak); \
197 : NS_SCRIPTABLE NS_IMETHOD RemoveObserver(nsIOfflineCacheUpdateObserver *aObserver);
198 :
199 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
200 : #define NS_FORWARD_NSIOFFLINECACHEUPDATE(_to) \
201 : NS_SCRIPTABLE NS_IMETHOD GetStatus(PRUint16 *aStatus) { return _to GetStatus(aStatus); } \
202 : NS_SCRIPTABLE NS_IMETHOD GetPartial(bool *aPartial) { return _to GetPartial(aPartial); } \
203 : NS_SCRIPTABLE NS_IMETHOD GetIsUpgrade(bool *aIsUpgrade) { return _to GetIsUpgrade(aIsUpgrade); } \
204 : NS_SCRIPTABLE NS_IMETHOD GetUpdateDomain(nsACString & aUpdateDomain) { return _to GetUpdateDomain(aUpdateDomain); } \
205 : NS_SCRIPTABLE NS_IMETHOD GetManifestURI(nsIURI * *aManifestURI) { return _to GetManifestURI(aManifestURI); } \
206 : NS_SCRIPTABLE NS_IMETHOD GetSucceeded(bool *aSucceeded) { return _to GetSucceeded(aSucceeded); } \
207 : NS_SCRIPTABLE NS_IMETHOD Init(nsIURI *aManifestURI, nsIURI *aDocumentURI, nsIDOMDocument *aDocument) { return _to Init(aManifestURI, aDocumentURI, aDocument); } \
208 : NS_SCRIPTABLE NS_IMETHOD InitPartial(nsIURI *aManifestURI, const nsACString & aClientID, nsIURI *aDocumentURI) { return _to InitPartial(aManifestURI, aClientID, aDocumentURI); } \
209 : NS_SCRIPTABLE NS_IMETHOD AddDynamicURI(nsIURI *aURI) { return _to AddDynamicURI(aURI); } \
210 : NS_SCRIPTABLE NS_IMETHOD Schedule(void) { return _to Schedule(); } \
211 : NS_SCRIPTABLE NS_IMETHOD AddObserver(nsIOfflineCacheUpdateObserver *aObserver, bool aHoldWeak) { return _to AddObserver(aObserver, aHoldWeak); } \
212 : NS_SCRIPTABLE NS_IMETHOD RemoveObserver(nsIOfflineCacheUpdateObserver *aObserver) { return _to RemoveObserver(aObserver); }
213 :
214 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
215 : #define NS_FORWARD_SAFE_NSIOFFLINECACHEUPDATE(_to) \
216 : NS_SCRIPTABLE NS_IMETHOD GetStatus(PRUint16 *aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStatus(aStatus); } \
217 : NS_SCRIPTABLE NS_IMETHOD GetPartial(bool *aPartial) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPartial(aPartial); } \
218 : NS_SCRIPTABLE NS_IMETHOD GetIsUpgrade(bool *aIsUpgrade) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsUpgrade(aIsUpgrade); } \
219 : NS_SCRIPTABLE NS_IMETHOD GetUpdateDomain(nsACString & aUpdateDomain) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUpdateDomain(aUpdateDomain); } \
220 : NS_SCRIPTABLE NS_IMETHOD GetManifestURI(nsIURI * *aManifestURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetManifestURI(aManifestURI); } \
221 : NS_SCRIPTABLE NS_IMETHOD GetSucceeded(bool *aSucceeded) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSucceeded(aSucceeded); } \
222 : NS_SCRIPTABLE NS_IMETHOD Init(nsIURI *aManifestURI, nsIURI *aDocumentURI, nsIDOMDocument *aDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aManifestURI, aDocumentURI, aDocument); } \
223 : NS_SCRIPTABLE NS_IMETHOD InitPartial(nsIURI *aManifestURI, const nsACString & aClientID, nsIURI *aDocumentURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->InitPartial(aManifestURI, aClientID, aDocumentURI); } \
224 : NS_SCRIPTABLE NS_IMETHOD AddDynamicURI(nsIURI *aURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddDynamicURI(aURI); } \
225 : NS_SCRIPTABLE NS_IMETHOD Schedule(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Schedule(); } \
226 : NS_SCRIPTABLE NS_IMETHOD AddObserver(nsIOfflineCacheUpdateObserver *aObserver, bool aHoldWeak) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddObserver(aObserver, aHoldWeak); } \
227 : NS_SCRIPTABLE NS_IMETHOD RemoveObserver(nsIOfflineCacheUpdateObserver *aObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveObserver(aObserver); }
228 :
229 : #if 0
230 : /* Use the code below as a template for the implementation class for this interface. */
231 :
232 : /* Header file */
233 : class nsOfflineCacheUpdate : public nsIOfflineCacheUpdate
234 : {
235 : public:
236 : NS_DECL_ISUPPORTS
237 : NS_DECL_NSIOFFLINECACHEUPDATE
238 :
239 : nsOfflineCacheUpdate();
240 :
241 : private:
242 : ~nsOfflineCacheUpdate();
243 :
244 : protected:
245 : /* additional members */
246 : };
247 :
248 : /* Implementation file */
249 : NS_IMPL_ISUPPORTS1(nsOfflineCacheUpdate, nsIOfflineCacheUpdate)
250 :
251 : nsOfflineCacheUpdate::nsOfflineCacheUpdate()
252 : {
253 : /* member initializers and constructor code */
254 : }
255 :
256 : nsOfflineCacheUpdate::~nsOfflineCacheUpdate()
257 : {
258 : /* destructor code */
259 : }
260 :
261 : /* readonly attribute unsigned short status; */
262 : NS_IMETHODIMP nsOfflineCacheUpdate::GetStatus(PRUint16 *aStatus)
263 : {
264 : return NS_ERROR_NOT_IMPLEMENTED;
265 : }
266 :
267 : /* readonly attribute boolean partial; */
268 : NS_IMETHODIMP nsOfflineCacheUpdate::GetPartial(bool *aPartial)
269 : {
270 : return NS_ERROR_NOT_IMPLEMENTED;
271 : }
272 :
273 : /* readonly attribute boolean isUpgrade; */
274 : NS_IMETHODIMP nsOfflineCacheUpdate::GetIsUpgrade(bool *aIsUpgrade)
275 : {
276 : return NS_ERROR_NOT_IMPLEMENTED;
277 : }
278 :
279 : /* readonly attribute ACString updateDomain; */
280 : NS_IMETHODIMP nsOfflineCacheUpdate::GetUpdateDomain(nsACString & aUpdateDomain)
281 : {
282 : return NS_ERROR_NOT_IMPLEMENTED;
283 : }
284 :
285 : /* readonly attribute nsIURI manifestURI; */
286 : NS_IMETHODIMP nsOfflineCacheUpdate::GetManifestURI(nsIURI * *aManifestURI)
287 : {
288 : return NS_ERROR_NOT_IMPLEMENTED;
289 : }
290 :
291 : /* readonly attribute boolean succeeded; */
292 : NS_IMETHODIMP nsOfflineCacheUpdate::GetSucceeded(bool *aSucceeded)
293 : {
294 : return NS_ERROR_NOT_IMPLEMENTED;
295 : }
296 :
297 : /* void init (in nsIURI aManifestURI, in nsIURI aDocumentURI, in nsIDOMDocument aDocument); */
298 : NS_IMETHODIMP nsOfflineCacheUpdate::Init(nsIURI *aManifestURI, nsIURI *aDocumentURI, nsIDOMDocument *aDocument)
299 : {
300 : return NS_ERROR_NOT_IMPLEMENTED;
301 : }
302 :
303 : /* void initPartial (in nsIURI aManifestURI, in ACString aClientID, in nsIURI aDocumentURI); */
304 : NS_IMETHODIMP nsOfflineCacheUpdate::InitPartial(nsIURI *aManifestURI, const nsACString & aClientID, nsIURI *aDocumentURI)
305 : {
306 : return NS_ERROR_NOT_IMPLEMENTED;
307 : }
308 :
309 : /* void addDynamicURI (in nsIURI aURI); */
310 : NS_IMETHODIMP nsOfflineCacheUpdate::AddDynamicURI(nsIURI *aURI)
311 : {
312 : return NS_ERROR_NOT_IMPLEMENTED;
313 : }
314 :
315 : /* void schedule (); */
316 : NS_IMETHODIMP nsOfflineCacheUpdate::Schedule()
317 : {
318 : return NS_ERROR_NOT_IMPLEMENTED;
319 : }
320 :
321 : /* void addObserver (in nsIOfflineCacheUpdateObserver aObserver, in boolean aHoldWeak); */
322 : NS_IMETHODIMP nsOfflineCacheUpdate::AddObserver(nsIOfflineCacheUpdateObserver *aObserver, bool aHoldWeak)
323 : {
324 : return NS_ERROR_NOT_IMPLEMENTED;
325 : }
326 :
327 : /* void removeObserver (in nsIOfflineCacheUpdateObserver aObserver); */
328 : NS_IMETHODIMP nsOfflineCacheUpdate::RemoveObserver(nsIOfflineCacheUpdateObserver *aObserver)
329 : {
330 : return NS_ERROR_NOT_IMPLEMENTED;
331 : }
332 :
333 : /* End of implementation class template. */
334 : #endif
335 :
336 :
337 : /* starting interface: nsIOfflineCacheUpdateService */
338 : #define NS_IOFFLINECACHEUPDATESERVICE_IID_STR "6fd2030f-7b00-4102-a0e3-d73078821eb1"
339 :
340 : #define NS_IOFFLINECACHEUPDATESERVICE_IID \
341 : {0x6fd2030f, 0x7b00, 0x4102, \
342 : { 0xa0, 0xe3, 0xd7, 0x30, 0x78, 0x82, 0x1e, 0xb1 }}
343 :
344 8 : class NS_NO_VTABLE NS_SCRIPTABLE nsIOfflineCacheUpdateService : public nsISupports {
345 : public:
346 :
347 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IOFFLINECACHEUPDATESERVICE_IID)
348 :
349 : enum {
350 : ALLOW_NO_WARN = 3U
351 : };
352 :
353 : /* readonly attribute unsigned long numUpdates; */
354 : NS_SCRIPTABLE NS_IMETHOD GetNumUpdates(PRUint32 *aNumUpdates) = 0;
355 :
356 : /* nsIOfflineCacheUpdate getUpdate (in unsigned long index); */
357 : NS_SCRIPTABLE NS_IMETHOD GetUpdate(PRUint32 index, nsIOfflineCacheUpdate * *_retval NS_OUTPARAM) = 0;
358 :
359 : /* nsIOfflineCacheUpdate scheduleUpdate (in nsIURI aManifestURI, in nsIURI aDocumentURI, in nsIDOMWindow aWindow); */
360 : NS_SCRIPTABLE NS_IMETHOD ScheduleUpdate(nsIURI *aManifestURI, nsIURI *aDocumentURI, nsIDOMWindow *aWindow, nsIOfflineCacheUpdate * *_retval NS_OUTPARAM) = 0;
361 :
362 : /* void scheduleOnDocumentStop (in nsIURI aManifestURI, in nsIURI aDocumentURI, in nsIDOMDocument aDocument); */
363 : NS_SCRIPTABLE NS_IMETHOD ScheduleOnDocumentStop(nsIURI *aManifestURI, nsIURI *aDocumentURI, nsIDOMDocument *aDocument) = 0;
364 :
365 : /* boolean offlineAppAllowed (in nsIPrincipal aPrincipal, in nsIPrefBranch aPrefBranch); */
366 : NS_SCRIPTABLE NS_IMETHOD OfflineAppAllowed(nsIPrincipal *aPrincipal, nsIPrefBranch *aPrefBranch, bool *_retval NS_OUTPARAM) = 0;
367 :
368 : /* boolean offlineAppAllowedForURI (in nsIURI aURI, in nsIPrefBranch aPrefBranch); */
369 : NS_SCRIPTABLE NS_IMETHOD OfflineAppAllowedForURI(nsIURI *aURI, nsIPrefBranch *aPrefBranch, bool *_retval NS_OUTPARAM) = 0;
370 :
371 : };
372 :
373 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIOfflineCacheUpdateService, NS_IOFFLINECACHEUPDATESERVICE_IID)
374 :
375 : /* Use this macro when declaring classes that implement this interface. */
376 : #define NS_DECL_NSIOFFLINECACHEUPDATESERVICE \
377 : NS_SCRIPTABLE NS_IMETHOD GetNumUpdates(PRUint32 *aNumUpdates); \
378 : NS_SCRIPTABLE NS_IMETHOD GetUpdate(PRUint32 index, nsIOfflineCacheUpdate * *_retval NS_OUTPARAM); \
379 : NS_SCRIPTABLE NS_IMETHOD ScheduleUpdate(nsIURI *aManifestURI, nsIURI *aDocumentURI, nsIDOMWindow *aWindow, nsIOfflineCacheUpdate * *_retval NS_OUTPARAM); \
380 : NS_SCRIPTABLE NS_IMETHOD ScheduleOnDocumentStop(nsIURI *aManifestURI, nsIURI *aDocumentURI, nsIDOMDocument *aDocument); \
381 : NS_SCRIPTABLE NS_IMETHOD OfflineAppAllowed(nsIPrincipal *aPrincipal, nsIPrefBranch *aPrefBranch, bool *_retval NS_OUTPARAM); \
382 : NS_SCRIPTABLE NS_IMETHOD OfflineAppAllowedForURI(nsIURI *aURI, nsIPrefBranch *aPrefBranch, bool *_retval NS_OUTPARAM);
383 :
384 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
385 : #define NS_FORWARD_NSIOFFLINECACHEUPDATESERVICE(_to) \
386 : NS_SCRIPTABLE NS_IMETHOD GetNumUpdates(PRUint32 *aNumUpdates) { return _to GetNumUpdates(aNumUpdates); } \
387 : NS_SCRIPTABLE NS_IMETHOD GetUpdate(PRUint32 index, nsIOfflineCacheUpdate * *_retval NS_OUTPARAM) { return _to GetUpdate(index, _retval); } \
388 : NS_SCRIPTABLE NS_IMETHOD ScheduleUpdate(nsIURI *aManifestURI, nsIURI *aDocumentURI, nsIDOMWindow *aWindow, nsIOfflineCacheUpdate * *_retval NS_OUTPARAM) { return _to ScheduleUpdate(aManifestURI, aDocumentURI, aWindow, _retval); } \
389 : NS_SCRIPTABLE NS_IMETHOD ScheduleOnDocumentStop(nsIURI *aManifestURI, nsIURI *aDocumentURI, nsIDOMDocument *aDocument) { return _to ScheduleOnDocumentStop(aManifestURI, aDocumentURI, aDocument); } \
390 : NS_SCRIPTABLE NS_IMETHOD OfflineAppAllowed(nsIPrincipal *aPrincipal, nsIPrefBranch *aPrefBranch, bool *_retval NS_OUTPARAM) { return _to OfflineAppAllowed(aPrincipal, aPrefBranch, _retval); } \
391 : NS_SCRIPTABLE NS_IMETHOD OfflineAppAllowedForURI(nsIURI *aURI, nsIPrefBranch *aPrefBranch, bool *_retval NS_OUTPARAM) { return _to OfflineAppAllowedForURI(aURI, aPrefBranch, _retval); }
392 :
393 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
394 : #define NS_FORWARD_SAFE_NSIOFFLINECACHEUPDATESERVICE(_to) \
395 : NS_SCRIPTABLE NS_IMETHOD GetNumUpdates(PRUint32 *aNumUpdates) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNumUpdates(aNumUpdates); } \
396 : NS_SCRIPTABLE NS_IMETHOD GetUpdate(PRUint32 index, nsIOfflineCacheUpdate * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUpdate(index, _retval); } \
397 : NS_SCRIPTABLE NS_IMETHOD ScheduleUpdate(nsIURI *aManifestURI, nsIURI *aDocumentURI, nsIDOMWindow *aWindow, nsIOfflineCacheUpdate * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScheduleUpdate(aManifestURI, aDocumentURI, aWindow, _retval); } \
398 : NS_SCRIPTABLE NS_IMETHOD ScheduleOnDocumentStop(nsIURI *aManifestURI, nsIURI *aDocumentURI, nsIDOMDocument *aDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScheduleOnDocumentStop(aManifestURI, aDocumentURI, aDocument); } \
399 : NS_SCRIPTABLE NS_IMETHOD OfflineAppAllowed(nsIPrincipal *aPrincipal, nsIPrefBranch *aPrefBranch, bool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->OfflineAppAllowed(aPrincipal, aPrefBranch, _retval); } \
400 : NS_SCRIPTABLE NS_IMETHOD OfflineAppAllowedForURI(nsIURI *aURI, nsIPrefBranch *aPrefBranch, bool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->OfflineAppAllowedForURI(aURI, aPrefBranch, _retval); }
401 :
402 : #if 0
403 : /* Use the code below as a template for the implementation class for this interface. */
404 :
405 : /* Header file */
406 : class nsOfflineCacheUpdateService : public nsIOfflineCacheUpdateService
407 : {
408 : public:
409 : NS_DECL_ISUPPORTS
410 : NS_DECL_NSIOFFLINECACHEUPDATESERVICE
411 :
412 : nsOfflineCacheUpdateService();
413 :
414 : private:
415 : ~nsOfflineCacheUpdateService();
416 :
417 : protected:
418 : /* additional members */
419 : };
420 :
421 : /* Implementation file */
422 : NS_IMPL_ISUPPORTS1(nsOfflineCacheUpdateService, nsIOfflineCacheUpdateService)
423 :
424 : nsOfflineCacheUpdateService::nsOfflineCacheUpdateService()
425 : {
426 : /* member initializers and constructor code */
427 : }
428 :
429 : nsOfflineCacheUpdateService::~nsOfflineCacheUpdateService()
430 : {
431 : /* destructor code */
432 : }
433 :
434 : /* readonly attribute unsigned long numUpdates; */
435 : NS_IMETHODIMP nsOfflineCacheUpdateService::GetNumUpdates(PRUint32 *aNumUpdates)
436 : {
437 : return NS_ERROR_NOT_IMPLEMENTED;
438 : }
439 :
440 : /* nsIOfflineCacheUpdate getUpdate (in unsigned long index); */
441 : NS_IMETHODIMP nsOfflineCacheUpdateService::GetUpdate(PRUint32 index, nsIOfflineCacheUpdate * *_retval NS_OUTPARAM)
442 : {
443 : return NS_ERROR_NOT_IMPLEMENTED;
444 : }
445 :
446 : /* nsIOfflineCacheUpdate scheduleUpdate (in nsIURI aManifestURI, in nsIURI aDocumentURI, in nsIDOMWindow aWindow); */
447 : NS_IMETHODIMP nsOfflineCacheUpdateService::ScheduleUpdate(nsIURI *aManifestURI, nsIURI *aDocumentURI, nsIDOMWindow *aWindow, nsIOfflineCacheUpdate * *_retval NS_OUTPARAM)
448 : {
449 : return NS_ERROR_NOT_IMPLEMENTED;
450 : }
451 :
452 : /* void scheduleOnDocumentStop (in nsIURI aManifestURI, in nsIURI aDocumentURI, in nsIDOMDocument aDocument); */
453 : NS_IMETHODIMP nsOfflineCacheUpdateService::ScheduleOnDocumentStop(nsIURI *aManifestURI, nsIURI *aDocumentURI, nsIDOMDocument *aDocument)
454 : {
455 : return NS_ERROR_NOT_IMPLEMENTED;
456 : }
457 :
458 : /* boolean offlineAppAllowed (in nsIPrincipal aPrincipal, in nsIPrefBranch aPrefBranch); */
459 : NS_IMETHODIMP nsOfflineCacheUpdateService::OfflineAppAllowed(nsIPrincipal *aPrincipal, nsIPrefBranch *aPrefBranch, bool *_retval NS_OUTPARAM)
460 : {
461 : return NS_ERROR_NOT_IMPLEMENTED;
462 : }
463 :
464 : /* boolean offlineAppAllowedForURI (in nsIURI aURI, in nsIPrefBranch aPrefBranch); */
465 : NS_IMETHODIMP nsOfflineCacheUpdateService::OfflineAppAllowedForURI(nsIURI *aURI, nsIPrefBranch *aPrefBranch, bool *_retval NS_OUTPARAM)
466 : {
467 : return NS_ERROR_NOT_IMPLEMENTED;
468 : }
469 :
470 : /* End of implementation class template. */
471 : #endif
472 :
473 :
474 : #endif /* __gen_nsIOfflineCacheUpdate_h__ */
|