1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/netwerk/cache/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 269 : class NS_NO_VTABLE NS_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD CreateSession(const char * clientID, nsCacheStoragePolicy storagePolicy, bool streamBased, nsICacheSession * *_retval NS_OUTPARAM) = 0;
46 :
47 : /* void visitEntries (in nsICacheVisitor visitor); */
48 : NS_SCRIPTABLE NS_IMETHOD VisitEntries(nsICacheVisitor *visitor) = 0;
49 :
50 : /* void evictEntries (in nsCacheStoragePolicy storagePolicy); */
51 : NS_SCRIPTABLE NS_IMETHOD EvictEntries(nsCacheStoragePolicy storagePolicy) = 0;
52 :
53 : /* readonly attribute nsIEventTarget cacheIOTarget; */
54 : NS_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD CreateSession(const char * clientID, nsCacheStoragePolicy storagePolicy, bool streamBased, nsICacheSession * *_retval NS_OUTPARAM); \
63 : NS_SCRIPTABLE NS_IMETHOD VisitEntries(nsICacheVisitor *visitor); \
64 : NS_SCRIPTABLE NS_IMETHOD EvictEntries(nsCacheStoragePolicy storagePolicy); \
65 : NS_SCRIPTABLE NS_IMETHOD GetCacheIOTarget(nsIEventTarget * *aCacheIOTarget);
66 :
67 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
68 : #define NS_FORWARD_NSICACHESERVICE(_to) \
69 : NS_SCRIPTABLE NS_IMETHOD CreateSession(const char * clientID, nsCacheStoragePolicy storagePolicy, bool streamBased, nsICacheSession * *_retval NS_OUTPARAM) { return _to CreateSession(clientID, storagePolicy, streamBased, _retval); } \
70 : NS_SCRIPTABLE NS_IMETHOD VisitEntries(nsICacheVisitor *visitor) { return _to VisitEntries(visitor); } \
71 : NS_SCRIPTABLE NS_IMETHOD EvictEntries(nsCacheStoragePolicy storagePolicy) { return _to EvictEntries(storagePolicy); } \
72 : NS_SCRIPTABLE NS_IMETHOD GetCacheIOTarget(nsIEventTarget * *aCacheIOTarget) { return _to GetCacheIOTarget(aCacheIOTarget); }
73 :
74 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
75 : #define NS_FORWARD_SAFE_NSICACHESERVICE(_to) \
76 : NS_SCRIPTABLE NS_IMETHOD CreateSession(const char * clientID, nsCacheStoragePolicy storagePolicy, bool streamBased, nsICacheSession * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateSession(clientID, storagePolicy, streamBased, _retval); } \
77 : NS_SCRIPTABLE NS_IMETHOD VisitEntries(nsICacheVisitor *visitor) { return !_to ? NS_ERROR_NULL_POINTER : _to->VisitEntries(visitor); } \
78 : NS_SCRIPTABLE NS_IMETHOD EvictEntries(nsCacheStoragePolicy storagePolicy) { return !_to ? NS_ERROR_NULL_POINTER : _to->EvictEntries(storagePolicy); } \
79 : NS_SCRIPTABLE NS_IMETHOD GetCacheIOTarget(nsIEventTarget * *aCacheIOTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCacheIOTarget(aCacheIOTarget); }
80 :
81 : #if 0
82 : /* Use the code below as a template for the implementation class for this interface. */
83 :
84 : /* Header file */
85 : class nsCacheService : public nsICacheService
86 : {
87 : public:
88 : NS_DECL_ISUPPORTS
89 : NS_DECL_NSICACHESERVICE
90 :
91 : nsCacheService();
92 :
93 : private:
94 : ~nsCacheService();
95 :
96 : protected:
97 : /* additional members */
98 : };
99 :
100 : /* Implementation file */
101 : NS_IMPL_ISUPPORTS1(nsCacheService, nsICacheService)
102 :
103 : nsCacheService::nsCacheService()
104 : {
105 : /* member initializers and constructor code */
106 : }
107 :
108 : nsCacheService::~nsCacheService()
109 : {
110 : /* destructor code */
111 : }
112 :
113 : /* nsICacheSession createSession (in string clientID, in nsCacheStoragePolicy storagePolicy, in boolean streamBased); */
114 : NS_IMETHODIMP nsCacheService::CreateSession(const char * clientID, nsCacheStoragePolicy storagePolicy, bool streamBased, nsICacheSession * *_retval NS_OUTPARAM)
115 : {
116 : return NS_ERROR_NOT_IMPLEMENTED;
117 : }
118 :
119 : /* void visitEntries (in nsICacheVisitor visitor); */
120 : NS_IMETHODIMP nsCacheService::VisitEntries(nsICacheVisitor *visitor)
121 : {
122 : return NS_ERROR_NOT_IMPLEMENTED;
123 : }
124 :
125 : /* void evictEntries (in nsCacheStoragePolicy storagePolicy); */
126 : NS_IMETHODIMP nsCacheService::EvictEntries(nsCacheStoragePolicy storagePolicy)
127 : {
128 : return NS_ERROR_NOT_IMPLEMENTED;
129 : }
130 :
131 : /* readonly attribute nsIEventTarget cacheIOTarget; */
132 : NS_IMETHODIMP nsCacheService::GetCacheIOTarget(nsIEventTarget * *aCacheIOTarget)
133 : {
134 : return NS_ERROR_NOT_IMPLEMENTED;
135 : }
136 :
137 : /* End of implementation class template. */
138 : #endif
139 :
140 : /**
141 : * Observer service notification that is sent when
142 : * nsICacheService::evictEntries() or nsICacheSession::evictEntries()
143 : * is called.
144 : */
145 : #define NS_CACHESERVICE_EMPTYCACHE_TOPIC_ID "cacheservice:empty-cache"
146 :
147 : #endif /* __gen_nsICacheService_h__ */
|