Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsICacheStorageService.idl
3 : */
4 :
5 : #ifndef __gen_nsICacheStorageService_h__
6 : #define __gen_nsICacheStorageService_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 nsICacheStorage; /* forward declaration */
18 :
19 : class nsILoadContextInfo; /* forward declaration */
20 :
21 : class nsIApplicationCache; /* forward declaration */
22 :
23 : class nsIEventTarget; /* forward declaration */
24 :
25 : class nsICacheStorageConsumptionObserver; /* forward declaration */
26 :
27 : class nsICacheStorageVisitor; /* forward declaration */
28 :
29 :
30 : /* starting interface: nsICacheStorageService */
31 : #define NS_ICACHESTORAGESERVICE_IID_STR "ae29c44b-fbc3-4552-afaf-0a157ce771e7"
32 :
33 : #define NS_ICACHESTORAGESERVICE_IID \
34 : {0xae29c44b, 0xfbc3, 0x4552, \
35 : { 0xaf, 0xaf, 0x0a, 0x15, 0x7c, 0xe7, 0x71, 0xe7 }}
36 :
37 1 : class NS_NO_VTABLE nsICacheStorageService : public nsISupports {
38 : public:
39 :
40 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICACHESTORAGESERVICE_IID)
41 :
42 : /* nsICacheStorage memoryCacheStorage (in nsILoadContextInfo aLoadContextInfo); */
43 : NS_IMETHOD MemoryCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval) = 0;
44 :
45 : /* nsICacheStorage diskCacheStorage (in nsILoadContextInfo aLoadContextInfo, in bool aLookupAppCache); */
46 : NS_IMETHOD DiskCacheStorage(nsILoadContextInfo *aLoadContextInfo, bool aLookupAppCache, nsICacheStorage * *_retval) = 0;
47 :
48 : /* nsICacheStorage pinningCacheStorage (in nsILoadContextInfo aLoadContextInfo); */
49 : NS_IMETHOD PinningCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval) = 0;
50 :
51 : /* nsICacheStorage appCacheStorage (in nsILoadContextInfo aLoadContextInfo, in nsIApplicationCache aApplicationCache); */
52 : NS_IMETHOD AppCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsIApplicationCache *aApplicationCache, nsICacheStorage * *_retval) = 0;
53 :
54 : /* nsICacheStorage synthesizedCacheStorage (in nsILoadContextInfo aLoadContextInfo); */
55 : NS_IMETHOD SynthesizedCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval) = 0;
56 :
57 : /* void clear (); */
58 : NS_IMETHOD Clear(void) = 0;
59 :
60 : enum {
61 : PURGE_DISK_DATA_ONLY = 1U,
62 : PURGE_DISK_ALL = 2U,
63 : PURGE_EVERYTHING = 3U
64 : };
65 :
66 : /* void purgeFromMemory (in uint32_t aWhat); */
67 : NS_IMETHOD PurgeFromMemory(uint32_t aWhat) = 0;
68 :
69 : /* readonly attribute nsIEventTarget ioTarget; */
70 : NS_IMETHOD GetIoTarget(nsIEventTarget * *aIoTarget) = 0;
71 :
72 : /* void asyncGetDiskConsumption (in nsICacheStorageConsumptionObserver aObserver); */
73 : NS_IMETHOD AsyncGetDiskConsumption(nsICacheStorageConsumptionObserver *aObserver) = 0;
74 :
75 : /* void asyncVisitAllStorages (in nsICacheStorageVisitor aVisitor, in boolean aVisitEntries); */
76 : NS_IMETHOD AsyncVisitAllStorages(nsICacheStorageVisitor *aVisitor, bool aVisitEntries) = 0;
77 :
78 : };
79 :
80 : NS_DEFINE_STATIC_IID_ACCESSOR(nsICacheStorageService, NS_ICACHESTORAGESERVICE_IID)
81 :
82 : /* Use this macro when declaring classes that implement this interface. */
83 : #define NS_DECL_NSICACHESTORAGESERVICE \
84 : NS_IMETHOD MemoryCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval) override; \
85 : NS_IMETHOD DiskCacheStorage(nsILoadContextInfo *aLoadContextInfo, bool aLookupAppCache, nsICacheStorage * *_retval) override; \
86 : NS_IMETHOD PinningCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval) override; \
87 : NS_IMETHOD AppCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsIApplicationCache *aApplicationCache, nsICacheStorage * *_retval) override; \
88 : NS_IMETHOD SynthesizedCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval) override; \
89 : NS_IMETHOD Clear(void) override; \
90 : NS_IMETHOD PurgeFromMemory(uint32_t aWhat) override; \
91 : NS_IMETHOD GetIoTarget(nsIEventTarget * *aIoTarget) override; \
92 : NS_IMETHOD AsyncGetDiskConsumption(nsICacheStorageConsumptionObserver *aObserver) override; \
93 : NS_IMETHOD AsyncVisitAllStorages(nsICacheStorageVisitor *aVisitor, bool aVisitEntries) override;
94 :
95 : /* Use this macro when declaring the members of this interface when the
96 : class doesn't implement the interface. This is useful for forwarding. */
97 : #define NS_DECL_NON_VIRTUAL_NSICACHESTORAGESERVICE \
98 : nsresult MemoryCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval); \
99 : nsresult DiskCacheStorage(nsILoadContextInfo *aLoadContextInfo, bool aLookupAppCache, nsICacheStorage * *_retval); \
100 : nsresult PinningCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval); \
101 : nsresult AppCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsIApplicationCache *aApplicationCache, nsICacheStorage * *_retval); \
102 : nsresult SynthesizedCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval); \
103 : nsresult Clear(void); \
104 : nsresult PurgeFromMemory(uint32_t aWhat); \
105 : nsresult GetIoTarget(nsIEventTarget * *aIoTarget); \
106 : nsresult AsyncGetDiskConsumption(nsICacheStorageConsumptionObserver *aObserver); \
107 : nsresult AsyncVisitAllStorages(nsICacheStorageVisitor *aVisitor, bool aVisitEntries);
108 :
109 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
110 : #define NS_FORWARD_NSICACHESTORAGESERVICE(_to) \
111 : NS_IMETHOD MemoryCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval) override { return _to MemoryCacheStorage(aLoadContextInfo, _retval); } \
112 : NS_IMETHOD DiskCacheStorage(nsILoadContextInfo *aLoadContextInfo, bool aLookupAppCache, nsICacheStorage * *_retval) override { return _to DiskCacheStorage(aLoadContextInfo, aLookupAppCache, _retval); } \
113 : NS_IMETHOD PinningCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval) override { return _to PinningCacheStorage(aLoadContextInfo, _retval); } \
114 : NS_IMETHOD AppCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsIApplicationCache *aApplicationCache, nsICacheStorage * *_retval) override { return _to AppCacheStorage(aLoadContextInfo, aApplicationCache, _retval); } \
115 : NS_IMETHOD SynthesizedCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval) override { return _to SynthesizedCacheStorage(aLoadContextInfo, _retval); } \
116 : NS_IMETHOD Clear(void) override { return _to Clear(); } \
117 : NS_IMETHOD PurgeFromMemory(uint32_t aWhat) override { return _to PurgeFromMemory(aWhat); } \
118 : NS_IMETHOD GetIoTarget(nsIEventTarget * *aIoTarget) override { return _to GetIoTarget(aIoTarget); } \
119 : NS_IMETHOD AsyncGetDiskConsumption(nsICacheStorageConsumptionObserver *aObserver) override { return _to AsyncGetDiskConsumption(aObserver); } \
120 : NS_IMETHOD AsyncVisitAllStorages(nsICacheStorageVisitor *aVisitor, bool aVisitEntries) override { return _to AsyncVisitAllStorages(aVisitor, aVisitEntries); }
121 :
122 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
123 : #define NS_FORWARD_SAFE_NSICACHESTORAGESERVICE(_to) \
124 : NS_IMETHOD MemoryCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MemoryCacheStorage(aLoadContextInfo, _retval); } \
125 : NS_IMETHOD DiskCacheStorage(nsILoadContextInfo *aLoadContextInfo, bool aLookupAppCache, nsICacheStorage * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DiskCacheStorage(aLoadContextInfo, aLookupAppCache, _retval); } \
126 : NS_IMETHOD PinningCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PinningCacheStorage(aLoadContextInfo, _retval); } \
127 : NS_IMETHOD AppCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsIApplicationCache *aApplicationCache, nsICacheStorage * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AppCacheStorage(aLoadContextInfo, aApplicationCache, _retval); } \
128 : NS_IMETHOD SynthesizedCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SynthesizedCacheStorage(aLoadContextInfo, _retval); } \
129 : NS_IMETHOD Clear(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Clear(); } \
130 : NS_IMETHOD PurgeFromMemory(uint32_t aWhat) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PurgeFromMemory(aWhat); } \
131 : NS_IMETHOD GetIoTarget(nsIEventTarget * *aIoTarget) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIoTarget(aIoTarget); } \
132 : NS_IMETHOD AsyncGetDiskConsumption(nsICacheStorageConsumptionObserver *aObserver) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncGetDiskConsumption(aObserver); } \
133 : NS_IMETHOD AsyncVisitAllStorages(nsICacheStorageVisitor *aVisitor, bool aVisitEntries) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncVisitAllStorages(aVisitor, aVisitEntries); }
134 :
135 : #if 0
136 : /* Use the code below as a template for the implementation class for this interface. */
137 :
138 : /* Header file */
139 : class nsCacheStorageService : public nsICacheStorageService
140 : {
141 : public:
142 : NS_DECL_ISUPPORTS
143 : NS_DECL_NSICACHESTORAGESERVICE
144 :
145 : nsCacheStorageService();
146 :
147 : private:
148 : ~nsCacheStorageService();
149 :
150 : protected:
151 : /* additional members */
152 : };
153 :
154 : /* Implementation file */
155 : NS_IMPL_ISUPPORTS(nsCacheStorageService, nsICacheStorageService)
156 :
157 : nsCacheStorageService::nsCacheStorageService()
158 : {
159 : /* member initializers and constructor code */
160 : }
161 :
162 : nsCacheStorageService::~nsCacheStorageService()
163 : {
164 : /* destructor code */
165 : }
166 :
167 : /* nsICacheStorage memoryCacheStorage (in nsILoadContextInfo aLoadContextInfo); */
168 : NS_IMETHODIMP nsCacheStorageService::MemoryCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval)
169 : {
170 : return NS_ERROR_NOT_IMPLEMENTED;
171 : }
172 :
173 : /* nsICacheStorage diskCacheStorage (in nsILoadContextInfo aLoadContextInfo, in bool aLookupAppCache); */
174 : NS_IMETHODIMP nsCacheStorageService::DiskCacheStorage(nsILoadContextInfo *aLoadContextInfo, bool aLookupAppCache, nsICacheStorage * *_retval)
175 : {
176 : return NS_ERROR_NOT_IMPLEMENTED;
177 : }
178 :
179 : /* nsICacheStorage pinningCacheStorage (in nsILoadContextInfo aLoadContextInfo); */
180 : NS_IMETHODIMP nsCacheStorageService::PinningCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval)
181 : {
182 : return NS_ERROR_NOT_IMPLEMENTED;
183 : }
184 :
185 : /* nsICacheStorage appCacheStorage (in nsILoadContextInfo aLoadContextInfo, in nsIApplicationCache aApplicationCache); */
186 : NS_IMETHODIMP nsCacheStorageService::AppCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsIApplicationCache *aApplicationCache, nsICacheStorage * *_retval)
187 : {
188 : return NS_ERROR_NOT_IMPLEMENTED;
189 : }
190 :
191 : /* nsICacheStorage synthesizedCacheStorage (in nsILoadContextInfo aLoadContextInfo); */
192 : NS_IMETHODIMP nsCacheStorageService::SynthesizedCacheStorage(nsILoadContextInfo *aLoadContextInfo, nsICacheStorage * *_retval)
193 : {
194 : return NS_ERROR_NOT_IMPLEMENTED;
195 : }
196 :
197 : /* void clear (); */
198 : NS_IMETHODIMP nsCacheStorageService::Clear()
199 : {
200 : return NS_ERROR_NOT_IMPLEMENTED;
201 : }
202 :
203 : /* void purgeFromMemory (in uint32_t aWhat); */
204 : NS_IMETHODIMP nsCacheStorageService::PurgeFromMemory(uint32_t aWhat)
205 : {
206 : return NS_ERROR_NOT_IMPLEMENTED;
207 : }
208 :
209 : /* readonly attribute nsIEventTarget ioTarget; */
210 : NS_IMETHODIMP nsCacheStorageService::GetIoTarget(nsIEventTarget * *aIoTarget)
211 : {
212 : return NS_ERROR_NOT_IMPLEMENTED;
213 : }
214 :
215 : /* void asyncGetDiskConsumption (in nsICacheStorageConsumptionObserver aObserver); */
216 : NS_IMETHODIMP nsCacheStorageService::AsyncGetDiskConsumption(nsICacheStorageConsumptionObserver *aObserver)
217 : {
218 : return NS_ERROR_NOT_IMPLEMENTED;
219 : }
220 :
221 : /* void asyncVisitAllStorages (in nsICacheStorageVisitor aVisitor, in boolean aVisitEntries); */
222 : NS_IMETHODIMP nsCacheStorageService::AsyncVisitAllStorages(nsICacheStorageVisitor *aVisitor, bool aVisitEntries)
223 : {
224 : return NS_ERROR_NOT_IMPLEMENTED;
225 : }
226 :
227 : /* End of implementation class template. */
228 : #endif
229 :
230 :
231 : /* starting interface: nsICacheStorageConsumptionObserver */
232 : #define NS_ICACHESTORAGECONSUMPTIONOBSERVER_IID_STR "7728ab5b-4c01-4483-a606-32bf5b8136cb"
233 :
234 : #define NS_ICACHESTORAGECONSUMPTIONOBSERVER_IID \
235 : {0x7728ab5b, 0x4c01, 0x4483, \
236 : { 0xa6, 0x06, 0x32, 0xbf, 0x5b, 0x81, 0x36, 0xcb }}
237 :
238 : class NS_NO_VTABLE nsICacheStorageConsumptionObserver : public nsISupports {
239 : public:
240 :
241 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICACHESTORAGECONSUMPTIONOBSERVER_IID)
242 :
243 : /* void onNetworkCacheDiskConsumption (in int64_t aDiskSize); */
244 : NS_IMETHOD OnNetworkCacheDiskConsumption(int64_t aDiskSize) = 0;
245 :
246 : };
247 :
248 : NS_DEFINE_STATIC_IID_ACCESSOR(nsICacheStorageConsumptionObserver, NS_ICACHESTORAGECONSUMPTIONOBSERVER_IID)
249 :
250 : /* Use this macro when declaring classes that implement this interface. */
251 : #define NS_DECL_NSICACHESTORAGECONSUMPTIONOBSERVER \
252 : NS_IMETHOD OnNetworkCacheDiskConsumption(int64_t aDiskSize) override;
253 :
254 : /* Use this macro when declaring the members of this interface when the
255 : class doesn't implement the interface. This is useful for forwarding. */
256 : #define NS_DECL_NON_VIRTUAL_NSICACHESTORAGECONSUMPTIONOBSERVER \
257 : nsresult OnNetworkCacheDiskConsumption(int64_t aDiskSize);
258 :
259 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
260 : #define NS_FORWARD_NSICACHESTORAGECONSUMPTIONOBSERVER(_to) \
261 : NS_IMETHOD OnNetworkCacheDiskConsumption(int64_t aDiskSize) override { return _to OnNetworkCacheDiskConsumption(aDiskSize); }
262 :
263 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
264 : #define NS_FORWARD_SAFE_NSICACHESTORAGECONSUMPTIONOBSERVER(_to) \
265 : NS_IMETHOD OnNetworkCacheDiskConsumption(int64_t aDiskSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnNetworkCacheDiskConsumption(aDiskSize); }
266 :
267 : #if 0
268 : /* Use the code below as a template for the implementation class for this interface. */
269 :
270 : /* Header file */
271 : class nsCacheStorageConsumptionObserver : public nsICacheStorageConsumptionObserver
272 : {
273 : public:
274 : NS_DECL_ISUPPORTS
275 : NS_DECL_NSICACHESTORAGECONSUMPTIONOBSERVER
276 :
277 : nsCacheStorageConsumptionObserver();
278 :
279 : private:
280 : ~nsCacheStorageConsumptionObserver();
281 :
282 : protected:
283 : /* additional members */
284 : };
285 :
286 : /* Implementation file */
287 : NS_IMPL_ISUPPORTS(nsCacheStorageConsumptionObserver, nsICacheStorageConsumptionObserver)
288 :
289 : nsCacheStorageConsumptionObserver::nsCacheStorageConsumptionObserver()
290 : {
291 : /* member initializers and constructor code */
292 : }
293 :
294 : nsCacheStorageConsumptionObserver::~nsCacheStorageConsumptionObserver()
295 : {
296 : /* destructor code */
297 : }
298 :
299 : /* void onNetworkCacheDiskConsumption (in int64_t aDiskSize); */
300 : NS_IMETHODIMP nsCacheStorageConsumptionObserver::OnNetworkCacheDiskConsumption(int64_t aDiskSize)
301 : {
302 : return NS_ERROR_NOT_IMPLEMENTED;
303 : }
304 :
305 : /* End of implementation class template. */
306 : #endif
307 :
308 :
309 : #endif /* __gen_nsICacheStorageService_h__ */
|