Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsICacheService.idl
3 : */
4 :
5 : #ifndef __gen_nsICacheService_h__
6 : #define __gen_nsICacheService_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : #ifndef __gen_nsICache_h__
14 : #include "nsICache.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 : class nsISimpleEnumerator; /* forward declaration */
22 :
23 : class nsICacheListener; /* forward declaration */
24 :
25 : class nsICacheSession; /* forward declaration */
26 :
27 : class nsICacheVisitor; /* forward declaration */
28 :
29 : class nsIEventTarget; /* forward declaration */
30 :
31 :
32 : /* starting interface: nsICacheService */
33 : #define NS_ICACHESERVICE_IID_STR "14dbe1e9-f3bc-45af-92f4-2c574fcd4e39"
34 :
35 : #define NS_ICACHESERVICE_IID \
36 : {0x14dbe1e9, 0xf3bc, 0x45af, \
37 : { 0x92, 0xf4, 0x2c, 0x57, 0x4f, 0xcd, 0x4e, 0x39 }}
38 :
39 1 : class NS_NO_VTABLE nsICacheService : public nsISupports {
40 : public:
41 :
42 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICACHESERVICE_IID)
43 :
44 : /* nsICacheSession createSession (in string clientID, in nsCacheStoragePolicy storagePolicy, in boolean streamBased); */
45 : NS_IMETHOD CreateSession(const char * clientID, nsCacheStoragePolicy storagePolicy, bool streamBased, nsICacheSession * *_retval) = 0;
46 :
47 : /* void visitEntries (in nsICacheVisitor visitor); */
48 : NS_IMETHOD VisitEntries(nsICacheVisitor *visitor) = 0;
49 :
50 : /* void evictEntries (in nsCacheStoragePolicy storagePolicy); */
51 : NS_IMETHOD EvictEntries(nsCacheStoragePolicy storagePolicy) = 0;
52 :
53 : /* readonly attribute nsIEventTarget cacheIOTarget; */
54 : NS_IMETHOD GetCacheIOTarget(nsIEventTarget * *aCacheIOTarget) = 0;
55 :
56 : };
57 :
58 : NS_DEFINE_STATIC_IID_ACCESSOR(nsICacheService, NS_ICACHESERVICE_IID)
59 :
60 : /* Use this macro when declaring classes that implement this interface. */
61 : #define NS_DECL_NSICACHESERVICE \
62 : NS_IMETHOD CreateSession(const char * clientID, nsCacheStoragePolicy storagePolicy, bool streamBased, nsICacheSession * *_retval) override; \
63 : NS_IMETHOD VisitEntries(nsICacheVisitor *visitor) override; \
64 : NS_IMETHOD EvictEntries(nsCacheStoragePolicy storagePolicy) override; \
65 : NS_IMETHOD GetCacheIOTarget(nsIEventTarget * *aCacheIOTarget) override;
66 :
67 : /* Use this macro when declaring the members of this interface when the
68 : class doesn't implement the interface. This is useful for forwarding. */
69 : #define NS_DECL_NON_VIRTUAL_NSICACHESERVICE \
70 : nsresult CreateSession(const char * clientID, nsCacheStoragePolicy storagePolicy, bool streamBased, nsICacheSession * *_retval); \
71 : nsresult VisitEntries(nsICacheVisitor *visitor); \
72 : nsresult EvictEntries(nsCacheStoragePolicy storagePolicy); \
73 : nsresult GetCacheIOTarget(nsIEventTarget * *aCacheIOTarget);
74 :
75 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
76 : #define NS_FORWARD_NSICACHESERVICE(_to) \
77 : NS_IMETHOD CreateSession(const char * clientID, nsCacheStoragePolicy storagePolicy, bool streamBased, nsICacheSession * *_retval) override { return _to CreateSession(clientID, storagePolicy, streamBased, _retval); } \
78 : NS_IMETHOD VisitEntries(nsICacheVisitor *visitor) override { return _to VisitEntries(visitor); } \
79 : NS_IMETHOD EvictEntries(nsCacheStoragePolicy storagePolicy) override { return _to EvictEntries(storagePolicy); } \
80 : NS_IMETHOD GetCacheIOTarget(nsIEventTarget * *aCacheIOTarget) override { return _to GetCacheIOTarget(aCacheIOTarget); }
81 :
82 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
83 : #define NS_FORWARD_SAFE_NSICACHESERVICE(_to) \
84 : NS_IMETHOD CreateSession(const char * clientID, nsCacheStoragePolicy storagePolicy, bool streamBased, nsICacheSession * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateSession(clientID, storagePolicy, streamBased, _retval); } \
85 : NS_IMETHOD VisitEntries(nsICacheVisitor *visitor) override { return !_to ? NS_ERROR_NULL_POINTER : _to->VisitEntries(visitor); } \
86 : NS_IMETHOD EvictEntries(nsCacheStoragePolicy storagePolicy) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EvictEntries(storagePolicy); } \
87 : NS_IMETHOD GetCacheIOTarget(nsIEventTarget * *aCacheIOTarget) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCacheIOTarget(aCacheIOTarget); }
88 :
89 : #if 0
90 : /* Use the code below as a template for the implementation class for this interface. */
91 :
92 : /* Header file */
93 : class nsCacheService : public nsICacheService
94 : {
95 : public:
96 : NS_DECL_ISUPPORTS
97 : NS_DECL_NSICACHESERVICE
98 :
99 : nsCacheService();
100 :
101 : private:
102 : ~nsCacheService();
103 :
104 : protected:
105 : /* additional members */
106 : };
107 :
108 : /* Implementation file */
109 : NS_IMPL_ISUPPORTS(nsCacheService, nsICacheService)
110 :
111 : nsCacheService::nsCacheService()
112 : {
113 : /* member initializers and constructor code */
114 : }
115 :
116 : nsCacheService::~nsCacheService()
117 : {
118 : /* destructor code */
119 : }
120 :
121 : /* nsICacheSession createSession (in string clientID, in nsCacheStoragePolicy storagePolicy, in boolean streamBased); */
122 : NS_IMETHODIMP nsCacheService::CreateSession(const char * clientID, nsCacheStoragePolicy storagePolicy, bool streamBased, nsICacheSession * *_retval)
123 : {
124 : return NS_ERROR_NOT_IMPLEMENTED;
125 : }
126 :
127 : /* void visitEntries (in nsICacheVisitor visitor); */
128 : NS_IMETHODIMP nsCacheService::VisitEntries(nsICacheVisitor *visitor)
129 : {
130 : return NS_ERROR_NOT_IMPLEMENTED;
131 : }
132 :
133 : /* void evictEntries (in nsCacheStoragePolicy storagePolicy); */
134 : NS_IMETHODIMP nsCacheService::EvictEntries(nsCacheStoragePolicy storagePolicy)
135 : {
136 : return NS_ERROR_NOT_IMPLEMENTED;
137 : }
138 :
139 : /* readonly attribute nsIEventTarget cacheIOTarget; */
140 : NS_IMETHODIMP nsCacheService::GetCacheIOTarget(nsIEventTarget * *aCacheIOTarget)
141 : {
142 : return NS_ERROR_NOT_IMPLEMENTED;
143 : }
144 :
145 : /* End of implementation class template. */
146 : #endif
147 :
148 : /**
149 : * Observer service notification that is sent when
150 : * nsICacheService::evictEntries() or nsICacheSession::evictEntries()
151 : * is called.
152 : */
153 : #define NS_CACHESERVICE_EMPTYCACHE_TOPIC_ID "cacheservice:empty-cache"
154 :
155 : /* starting interface: nsICacheServiceInternal */
156 : #define NS_ICACHESERVICEINTERNAL_IID_STR "d0fc8d38-db80-4928-bf1c-b0085ddfa9dc"
157 :
158 : #define NS_ICACHESERVICEINTERNAL_IID \
159 : {0xd0fc8d38, 0xdb80, 0x4928, \
160 : { 0xbf, 0x1c, 0xb0, 0x08, 0x5d, 0xdf, 0xa9, 0xdc }}
161 :
162 1 : class NS_NO_VTABLE nsICacheServiceInternal : public nsICacheService {
163 : public:
164 :
165 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICACHESERVICEINTERNAL_IID)
166 :
167 : /* readonly attribute double lockHeldTime; */
168 : NS_IMETHOD GetLockHeldTime(double *aLockHeldTime) = 0;
169 :
170 : };
171 :
172 : NS_DEFINE_STATIC_IID_ACCESSOR(nsICacheServiceInternal, NS_ICACHESERVICEINTERNAL_IID)
173 :
174 : /* Use this macro when declaring classes that implement this interface. */
175 : #define NS_DECL_NSICACHESERVICEINTERNAL \
176 : NS_IMETHOD GetLockHeldTime(double *aLockHeldTime) override;
177 :
178 : /* Use this macro when declaring the members of this interface when the
179 : class doesn't implement the interface. This is useful for forwarding. */
180 : #define NS_DECL_NON_VIRTUAL_NSICACHESERVICEINTERNAL \
181 : nsresult GetLockHeldTime(double *aLockHeldTime);
182 :
183 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
184 : #define NS_FORWARD_NSICACHESERVICEINTERNAL(_to) \
185 : NS_IMETHOD GetLockHeldTime(double *aLockHeldTime) override { return _to GetLockHeldTime(aLockHeldTime); }
186 :
187 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
188 : #define NS_FORWARD_SAFE_NSICACHESERVICEINTERNAL(_to) \
189 : NS_IMETHOD GetLockHeldTime(double *aLockHeldTime) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLockHeldTime(aLockHeldTime); }
190 :
191 : #if 0
192 : /* Use the code below as a template for the implementation class for this interface. */
193 :
194 : /* Header file */
195 : class nsCacheServiceInternal : public nsICacheServiceInternal
196 : {
197 : public:
198 : NS_DECL_ISUPPORTS
199 : NS_DECL_NSICACHESERVICEINTERNAL
200 :
201 : nsCacheServiceInternal();
202 :
203 : private:
204 : ~nsCacheServiceInternal();
205 :
206 : protected:
207 : /* additional members */
208 : };
209 :
210 : /* Implementation file */
211 : NS_IMPL_ISUPPORTS(nsCacheServiceInternal, nsICacheServiceInternal)
212 :
213 : nsCacheServiceInternal::nsCacheServiceInternal()
214 : {
215 : /* member initializers and constructor code */
216 : }
217 :
218 : nsCacheServiceInternal::~nsCacheServiceInternal()
219 : {
220 : /* destructor code */
221 : }
222 :
223 : /* readonly attribute double lockHeldTime; */
224 : NS_IMETHODIMP nsCacheServiceInternal::GetLockHeldTime(double *aLockHeldTime)
225 : {
226 : return NS_ERROR_NOT_IMPLEMENTED;
227 : }
228 :
229 : /* End of implementation class template. */
230 : #endif
231 :
232 :
233 : #endif /* __gen_nsICacheService_h__ */
|