Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIZipReader.idl
3 : */
4 :
5 : #ifndef __gen_nsIZipReader_h__
6 : #define __gen_nsIZipReader_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 : struct PRFileDesc;
18 : class nsIUTF8StringEnumerator; /* forward declaration */
19 :
20 : class nsIInputStream; /* forward declaration */
21 :
22 : class nsIFile; /* forward declaration */
23 :
24 : class nsIX509Cert; /* forward declaration */
25 :
26 :
27 : /* starting interface: nsIZipEntry */
28 : #define NS_IZIPENTRY_IID_STR "fad6f72f-13d8-4e26-9173-53007a4afe71"
29 :
30 : #define NS_IZIPENTRY_IID \
31 : {0xfad6f72f, 0x13d8, 0x4e26, \
32 : { 0x91, 0x73, 0x53, 0x00, 0x7a, 0x4a, 0xfe, 0x71 }}
33 :
34 0 : class NS_NO_VTABLE nsIZipEntry : public nsISupports {
35 : public:
36 :
37 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IZIPENTRY_IID)
38 :
39 : /* readonly attribute unsigned short compression; */
40 : NS_IMETHOD GetCompression(uint16_t *aCompression) = 0;
41 :
42 : /* readonly attribute unsigned long size; */
43 : NS_IMETHOD GetSize(uint32_t *aSize) = 0;
44 :
45 : /* readonly attribute unsigned long realSize; */
46 : NS_IMETHOD GetRealSize(uint32_t *aRealSize) = 0;
47 :
48 : /* readonly attribute unsigned long CRC32; */
49 : NS_IMETHOD GetCRC32(uint32_t *aCRC32) = 0;
50 :
51 : /* readonly attribute boolean isDirectory; */
52 : NS_IMETHOD GetIsDirectory(bool *aIsDirectory) = 0;
53 :
54 : /* readonly attribute PRTime lastModifiedTime; */
55 : NS_IMETHOD GetLastModifiedTime(PRTime *aLastModifiedTime) = 0;
56 :
57 : /* readonly attribute boolean isSynthetic; */
58 : NS_IMETHOD GetIsSynthetic(bool *aIsSynthetic) = 0;
59 :
60 : /* readonly attribute unsigned long permissions; */
61 : NS_IMETHOD GetPermissions(uint32_t *aPermissions) = 0;
62 :
63 : };
64 :
65 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIZipEntry, NS_IZIPENTRY_IID)
66 :
67 : /* Use this macro when declaring classes that implement this interface. */
68 : #define NS_DECL_NSIZIPENTRY \
69 : NS_IMETHOD GetCompression(uint16_t *aCompression) override; \
70 : NS_IMETHOD GetSize(uint32_t *aSize) override; \
71 : NS_IMETHOD GetRealSize(uint32_t *aRealSize) override; \
72 : NS_IMETHOD GetCRC32(uint32_t *aCRC32) override; \
73 : NS_IMETHOD GetIsDirectory(bool *aIsDirectory) override; \
74 : NS_IMETHOD GetLastModifiedTime(PRTime *aLastModifiedTime) override; \
75 : NS_IMETHOD GetIsSynthetic(bool *aIsSynthetic) override; \
76 : NS_IMETHOD GetPermissions(uint32_t *aPermissions) override;
77 :
78 : /* Use this macro when declaring the members of this interface when the
79 : class doesn't implement the interface. This is useful for forwarding. */
80 : #define NS_DECL_NON_VIRTUAL_NSIZIPENTRY \
81 : nsresult GetCompression(uint16_t *aCompression); \
82 : nsresult GetSize(uint32_t *aSize); \
83 : nsresult GetRealSize(uint32_t *aRealSize); \
84 : nsresult GetCRC32(uint32_t *aCRC32); \
85 : nsresult GetIsDirectory(bool *aIsDirectory); \
86 : nsresult GetLastModifiedTime(PRTime *aLastModifiedTime); \
87 : nsresult GetIsSynthetic(bool *aIsSynthetic); \
88 : nsresult GetPermissions(uint32_t *aPermissions);
89 :
90 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
91 : #define NS_FORWARD_NSIZIPENTRY(_to) \
92 : NS_IMETHOD GetCompression(uint16_t *aCompression) override { return _to GetCompression(aCompression); } \
93 : NS_IMETHOD GetSize(uint32_t *aSize) override { return _to GetSize(aSize); } \
94 : NS_IMETHOD GetRealSize(uint32_t *aRealSize) override { return _to GetRealSize(aRealSize); } \
95 : NS_IMETHOD GetCRC32(uint32_t *aCRC32) override { return _to GetCRC32(aCRC32); } \
96 : NS_IMETHOD GetIsDirectory(bool *aIsDirectory) override { return _to GetIsDirectory(aIsDirectory); } \
97 : NS_IMETHOD GetLastModifiedTime(PRTime *aLastModifiedTime) override { return _to GetLastModifiedTime(aLastModifiedTime); } \
98 : NS_IMETHOD GetIsSynthetic(bool *aIsSynthetic) override { return _to GetIsSynthetic(aIsSynthetic); } \
99 : NS_IMETHOD GetPermissions(uint32_t *aPermissions) override { return _to GetPermissions(aPermissions); }
100 :
101 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
102 : #define NS_FORWARD_SAFE_NSIZIPENTRY(_to) \
103 : NS_IMETHOD GetCompression(uint16_t *aCompression) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCompression(aCompression); } \
104 : NS_IMETHOD GetSize(uint32_t *aSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSize(aSize); } \
105 : NS_IMETHOD GetRealSize(uint32_t *aRealSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRealSize(aRealSize); } \
106 : NS_IMETHOD GetCRC32(uint32_t *aCRC32) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCRC32(aCRC32); } \
107 : NS_IMETHOD GetIsDirectory(bool *aIsDirectory) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsDirectory(aIsDirectory); } \
108 : NS_IMETHOD GetLastModifiedTime(PRTime *aLastModifiedTime) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastModifiedTime(aLastModifiedTime); } \
109 : NS_IMETHOD GetIsSynthetic(bool *aIsSynthetic) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsSynthetic(aIsSynthetic); } \
110 : NS_IMETHOD GetPermissions(uint32_t *aPermissions) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPermissions(aPermissions); }
111 :
112 : #if 0
113 : /* Use the code below as a template for the implementation class for this interface. */
114 :
115 : /* Header file */
116 : class nsZipEntry : public nsIZipEntry
117 : {
118 : public:
119 : NS_DECL_ISUPPORTS
120 : NS_DECL_NSIZIPENTRY
121 :
122 : nsZipEntry();
123 :
124 : private:
125 : ~nsZipEntry();
126 :
127 : protected:
128 : /* additional members */
129 : };
130 :
131 : /* Implementation file */
132 : NS_IMPL_ISUPPORTS(nsZipEntry, nsIZipEntry)
133 :
134 : nsZipEntry::nsZipEntry()
135 : {
136 : /* member initializers and constructor code */
137 : }
138 :
139 : nsZipEntry::~nsZipEntry()
140 : {
141 : /* destructor code */
142 : }
143 :
144 : /* readonly attribute unsigned short compression; */
145 : NS_IMETHODIMP nsZipEntry::GetCompression(uint16_t *aCompression)
146 : {
147 : return NS_ERROR_NOT_IMPLEMENTED;
148 : }
149 :
150 : /* readonly attribute unsigned long size; */
151 : NS_IMETHODIMP nsZipEntry::GetSize(uint32_t *aSize)
152 : {
153 : return NS_ERROR_NOT_IMPLEMENTED;
154 : }
155 :
156 : /* readonly attribute unsigned long realSize; */
157 : NS_IMETHODIMP nsZipEntry::GetRealSize(uint32_t *aRealSize)
158 : {
159 : return NS_ERROR_NOT_IMPLEMENTED;
160 : }
161 :
162 : /* readonly attribute unsigned long CRC32; */
163 : NS_IMETHODIMP nsZipEntry::GetCRC32(uint32_t *aCRC32)
164 : {
165 : return NS_ERROR_NOT_IMPLEMENTED;
166 : }
167 :
168 : /* readonly attribute boolean isDirectory; */
169 : NS_IMETHODIMP nsZipEntry::GetIsDirectory(bool *aIsDirectory)
170 : {
171 : return NS_ERROR_NOT_IMPLEMENTED;
172 : }
173 :
174 : /* readonly attribute PRTime lastModifiedTime; */
175 : NS_IMETHODIMP nsZipEntry::GetLastModifiedTime(PRTime *aLastModifiedTime)
176 : {
177 : return NS_ERROR_NOT_IMPLEMENTED;
178 : }
179 :
180 : /* readonly attribute boolean isSynthetic; */
181 : NS_IMETHODIMP nsZipEntry::GetIsSynthetic(bool *aIsSynthetic)
182 : {
183 : return NS_ERROR_NOT_IMPLEMENTED;
184 : }
185 :
186 : /* readonly attribute unsigned long permissions; */
187 : NS_IMETHODIMP nsZipEntry::GetPermissions(uint32_t *aPermissions)
188 : {
189 : return NS_ERROR_NOT_IMPLEMENTED;
190 : }
191 :
192 : /* End of implementation class template. */
193 : #endif
194 :
195 :
196 : /* starting interface: nsIZipReader */
197 : #define NS_IZIPREADER_IID_STR "9ba4ef54-e0a0-4f65-9d23-128482448885"
198 :
199 : #define NS_IZIPREADER_IID \
200 : {0x9ba4ef54, 0xe0a0, 0x4f65, \
201 : { 0x9d, 0x23, 0x12, 0x84, 0x82, 0x44, 0x88, 0x85 }}
202 :
203 0 : class NS_NO_VTABLE nsIZipReader : public nsISupports {
204 : public:
205 :
206 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IZIPREADER_IID)
207 :
208 : /* void open (in nsIFile zipFile); */
209 : NS_IMETHOD Open(nsIFile *zipFile) = 0;
210 :
211 : /* void openInner (in nsIZipReader zipReader, in AUTF8String zipEntry); */
212 : NS_IMETHOD OpenInner(nsIZipReader *zipReader, const nsACString & zipEntry) = 0;
213 :
214 : /* void openMemory (in voidPtr aData, in unsigned long aLength); */
215 : NS_IMETHOD OpenMemory(void *aData, uint32_t aLength) = 0;
216 :
217 : /* readonly attribute nsIFile file; */
218 : NS_IMETHOD GetFile(nsIFile * *aFile) = 0;
219 :
220 : /* void close (); */
221 : NS_IMETHOD Close(void) = 0;
222 :
223 : /* void test (in AUTF8String aEntryName); */
224 : NS_IMETHOD Test(const nsACString & aEntryName) = 0;
225 :
226 : /* void extract (in AUTF8String zipEntry, in nsIFile outFile); */
227 : NS_IMETHOD Extract(const nsACString & zipEntry, nsIFile *outFile) = 0;
228 :
229 : /* nsIZipEntry getEntry (in AUTF8String zipEntry); */
230 : NS_IMETHOD GetEntry(const nsACString & zipEntry, nsIZipEntry * *_retval) = 0;
231 :
232 : /* boolean hasEntry (in AUTF8String zipEntry); */
233 : NS_IMETHOD HasEntry(const nsACString & zipEntry, bool *_retval) = 0;
234 :
235 : /* nsIUTF8StringEnumerator findEntries (in AUTF8String aPattern); */
236 : NS_IMETHOD FindEntries(const nsACString & aPattern, nsIUTF8StringEnumerator * *_retval) = 0;
237 :
238 : /* nsIInputStream getInputStream (in AUTF8String zipEntry); */
239 : NS_IMETHOD GetInputStream(const nsACString & zipEntry, nsIInputStream * *_retval) = 0;
240 :
241 : /* nsIInputStream getInputStreamWithSpec (in AUTF8String aJarSpec, in AUTF8String zipEntry); */
242 : NS_IMETHOD GetInputStreamWithSpec(const nsACString & aJarSpec, const nsACString & zipEntry, nsIInputStream * *_retval) = 0;
243 :
244 : /* nsIX509Cert getSigningCert (in AUTF8String aEntryName); */
245 : NS_IMETHOD GetSigningCert(const nsACString & aEntryName, nsIX509Cert * *_retval) = 0;
246 :
247 : /* readonly attribute uint32_t manifestEntriesCount; */
248 : NS_IMETHOD GetManifestEntriesCount(uint32_t *aManifestEntriesCount) = 0;
249 :
250 : };
251 :
252 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIZipReader, NS_IZIPREADER_IID)
253 :
254 : /* Use this macro when declaring classes that implement this interface. */
255 : #define NS_DECL_NSIZIPREADER \
256 : NS_IMETHOD Open(nsIFile *zipFile) override; \
257 : NS_IMETHOD OpenInner(nsIZipReader *zipReader, const nsACString & zipEntry) override; \
258 : NS_IMETHOD OpenMemory(void *aData, uint32_t aLength) override; \
259 : NS_IMETHOD GetFile(nsIFile * *aFile) override; \
260 : NS_IMETHOD Close(void) override; \
261 : NS_IMETHOD Test(const nsACString & aEntryName) override; \
262 : NS_IMETHOD Extract(const nsACString & zipEntry, nsIFile *outFile) override; \
263 : NS_IMETHOD GetEntry(const nsACString & zipEntry, nsIZipEntry * *_retval) override; \
264 : NS_IMETHOD HasEntry(const nsACString & zipEntry, bool *_retval) override; \
265 : NS_IMETHOD FindEntries(const nsACString & aPattern, nsIUTF8StringEnumerator * *_retval) override; \
266 : NS_IMETHOD GetInputStream(const nsACString & zipEntry, nsIInputStream * *_retval) override; \
267 : NS_IMETHOD GetInputStreamWithSpec(const nsACString & aJarSpec, const nsACString & zipEntry, nsIInputStream * *_retval) override; \
268 : NS_IMETHOD GetSigningCert(const nsACString & aEntryName, nsIX509Cert * *_retval) override; \
269 : NS_IMETHOD GetManifestEntriesCount(uint32_t *aManifestEntriesCount) override;
270 :
271 : /* Use this macro when declaring the members of this interface when the
272 : class doesn't implement the interface. This is useful for forwarding. */
273 : #define NS_DECL_NON_VIRTUAL_NSIZIPREADER \
274 : nsresult Open(nsIFile *zipFile); \
275 : nsresult OpenInner(nsIZipReader *zipReader, const nsACString & zipEntry); \
276 : nsresult OpenMemory(void *aData, uint32_t aLength); \
277 : nsresult GetFile(nsIFile * *aFile); \
278 : nsresult Close(void); \
279 : nsresult Test(const nsACString & aEntryName); \
280 : nsresult Extract(const nsACString & zipEntry, nsIFile *outFile); \
281 : nsresult GetEntry(const nsACString & zipEntry, nsIZipEntry * *_retval); \
282 : nsresult HasEntry(const nsACString & zipEntry, bool *_retval); \
283 : nsresult FindEntries(const nsACString & aPattern, nsIUTF8StringEnumerator * *_retval); \
284 : nsresult GetInputStream(const nsACString & zipEntry, nsIInputStream * *_retval); \
285 : nsresult GetInputStreamWithSpec(const nsACString & aJarSpec, const nsACString & zipEntry, nsIInputStream * *_retval); \
286 : nsresult GetSigningCert(const nsACString & aEntryName, nsIX509Cert * *_retval); \
287 : nsresult GetManifestEntriesCount(uint32_t *aManifestEntriesCount);
288 :
289 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
290 : #define NS_FORWARD_NSIZIPREADER(_to) \
291 : NS_IMETHOD Open(nsIFile *zipFile) override { return _to Open(zipFile); } \
292 : NS_IMETHOD OpenInner(nsIZipReader *zipReader, const nsACString & zipEntry) override { return _to OpenInner(zipReader, zipEntry); } \
293 : NS_IMETHOD OpenMemory(void *aData, uint32_t aLength) override { return _to OpenMemory(aData, aLength); } \
294 : NS_IMETHOD GetFile(nsIFile * *aFile) override { return _to GetFile(aFile); } \
295 : NS_IMETHOD Close(void) override { return _to Close(); } \
296 : NS_IMETHOD Test(const nsACString & aEntryName) override { return _to Test(aEntryName); } \
297 : NS_IMETHOD Extract(const nsACString & zipEntry, nsIFile *outFile) override { return _to Extract(zipEntry, outFile); } \
298 : NS_IMETHOD GetEntry(const nsACString & zipEntry, nsIZipEntry * *_retval) override { return _to GetEntry(zipEntry, _retval); } \
299 : NS_IMETHOD HasEntry(const nsACString & zipEntry, bool *_retval) override { return _to HasEntry(zipEntry, _retval); } \
300 : NS_IMETHOD FindEntries(const nsACString & aPattern, nsIUTF8StringEnumerator * *_retval) override { return _to FindEntries(aPattern, _retval); } \
301 : NS_IMETHOD GetInputStream(const nsACString & zipEntry, nsIInputStream * *_retval) override { return _to GetInputStream(zipEntry, _retval); } \
302 : NS_IMETHOD GetInputStreamWithSpec(const nsACString & aJarSpec, const nsACString & zipEntry, nsIInputStream * *_retval) override { return _to GetInputStreamWithSpec(aJarSpec, zipEntry, _retval); } \
303 : NS_IMETHOD GetSigningCert(const nsACString & aEntryName, nsIX509Cert * *_retval) override { return _to GetSigningCert(aEntryName, _retval); } \
304 : NS_IMETHOD GetManifestEntriesCount(uint32_t *aManifestEntriesCount) override { return _to GetManifestEntriesCount(aManifestEntriesCount); }
305 :
306 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
307 : #define NS_FORWARD_SAFE_NSIZIPREADER(_to) \
308 : NS_IMETHOD Open(nsIFile *zipFile) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Open(zipFile); } \
309 : NS_IMETHOD OpenInner(nsIZipReader *zipReader, const nsACString & zipEntry) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenInner(zipReader, zipEntry); } \
310 : NS_IMETHOD OpenMemory(void *aData, uint32_t aLength) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenMemory(aData, aLength); } \
311 : NS_IMETHOD GetFile(nsIFile * *aFile) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFile(aFile); } \
312 : NS_IMETHOD Close(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \
313 : NS_IMETHOD Test(const nsACString & aEntryName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Test(aEntryName); } \
314 : NS_IMETHOD Extract(const nsACString & zipEntry, nsIFile *outFile) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Extract(zipEntry, outFile); } \
315 : NS_IMETHOD GetEntry(const nsACString & zipEntry, nsIZipEntry * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEntry(zipEntry, _retval); } \
316 : NS_IMETHOD HasEntry(const nsACString & zipEntry, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasEntry(zipEntry, _retval); } \
317 : NS_IMETHOD FindEntries(const nsACString & aPattern, nsIUTF8StringEnumerator * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FindEntries(aPattern, _retval); } \
318 : NS_IMETHOD GetInputStream(const nsACString & zipEntry, nsIInputStream * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInputStream(zipEntry, _retval); } \
319 : NS_IMETHOD GetInputStreamWithSpec(const nsACString & aJarSpec, const nsACString & zipEntry, nsIInputStream * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInputStreamWithSpec(aJarSpec, zipEntry, _retval); } \
320 : NS_IMETHOD GetSigningCert(const nsACString & aEntryName, nsIX509Cert * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSigningCert(aEntryName, _retval); } \
321 : NS_IMETHOD GetManifestEntriesCount(uint32_t *aManifestEntriesCount) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetManifestEntriesCount(aManifestEntriesCount); }
322 :
323 : #if 0
324 : /* Use the code below as a template for the implementation class for this interface. */
325 :
326 : /* Header file */
327 : class nsZipReader : public nsIZipReader
328 : {
329 : public:
330 : NS_DECL_ISUPPORTS
331 : NS_DECL_NSIZIPREADER
332 :
333 : nsZipReader();
334 :
335 : private:
336 : ~nsZipReader();
337 :
338 : protected:
339 : /* additional members */
340 : };
341 :
342 : /* Implementation file */
343 : NS_IMPL_ISUPPORTS(nsZipReader, nsIZipReader)
344 :
345 : nsZipReader::nsZipReader()
346 : {
347 : /* member initializers and constructor code */
348 : }
349 :
350 : nsZipReader::~nsZipReader()
351 : {
352 : /* destructor code */
353 : }
354 :
355 : /* void open (in nsIFile zipFile); */
356 : NS_IMETHODIMP nsZipReader::Open(nsIFile *zipFile)
357 : {
358 : return NS_ERROR_NOT_IMPLEMENTED;
359 : }
360 :
361 : /* void openInner (in nsIZipReader zipReader, in AUTF8String zipEntry); */
362 : NS_IMETHODIMP nsZipReader::OpenInner(nsIZipReader *zipReader, const nsACString & zipEntry)
363 : {
364 : return NS_ERROR_NOT_IMPLEMENTED;
365 : }
366 :
367 : /* void openMemory (in voidPtr aData, in unsigned long aLength); */
368 : NS_IMETHODIMP nsZipReader::OpenMemory(void *aData, uint32_t aLength)
369 : {
370 : return NS_ERROR_NOT_IMPLEMENTED;
371 : }
372 :
373 : /* readonly attribute nsIFile file; */
374 : NS_IMETHODIMP nsZipReader::GetFile(nsIFile * *aFile)
375 : {
376 : return NS_ERROR_NOT_IMPLEMENTED;
377 : }
378 :
379 : /* void close (); */
380 : NS_IMETHODIMP nsZipReader::Close()
381 : {
382 : return NS_ERROR_NOT_IMPLEMENTED;
383 : }
384 :
385 : /* void test (in AUTF8String aEntryName); */
386 : NS_IMETHODIMP nsZipReader::Test(const nsACString & aEntryName)
387 : {
388 : return NS_ERROR_NOT_IMPLEMENTED;
389 : }
390 :
391 : /* void extract (in AUTF8String zipEntry, in nsIFile outFile); */
392 : NS_IMETHODIMP nsZipReader::Extract(const nsACString & zipEntry, nsIFile *outFile)
393 : {
394 : return NS_ERROR_NOT_IMPLEMENTED;
395 : }
396 :
397 : /* nsIZipEntry getEntry (in AUTF8String zipEntry); */
398 : NS_IMETHODIMP nsZipReader::GetEntry(const nsACString & zipEntry, nsIZipEntry * *_retval)
399 : {
400 : return NS_ERROR_NOT_IMPLEMENTED;
401 : }
402 :
403 : /* boolean hasEntry (in AUTF8String zipEntry); */
404 : NS_IMETHODIMP nsZipReader::HasEntry(const nsACString & zipEntry, bool *_retval)
405 : {
406 : return NS_ERROR_NOT_IMPLEMENTED;
407 : }
408 :
409 : /* nsIUTF8StringEnumerator findEntries (in AUTF8String aPattern); */
410 : NS_IMETHODIMP nsZipReader::FindEntries(const nsACString & aPattern, nsIUTF8StringEnumerator * *_retval)
411 : {
412 : return NS_ERROR_NOT_IMPLEMENTED;
413 : }
414 :
415 : /* nsIInputStream getInputStream (in AUTF8String zipEntry); */
416 : NS_IMETHODIMP nsZipReader::GetInputStream(const nsACString & zipEntry, nsIInputStream * *_retval)
417 : {
418 : return NS_ERROR_NOT_IMPLEMENTED;
419 : }
420 :
421 : /* nsIInputStream getInputStreamWithSpec (in AUTF8String aJarSpec, in AUTF8String zipEntry); */
422 : NS_IMETHODIMP nsZipReader::GetInputStreamWithSpec(const nsACString & aJarSpec, const nsACString & zipEntry, nsIInputStream * *_retval)
423 : {
424 : return NS_ERROR_NOT_IMPLEMENTED;
425 : }
426 :
427 : /* nsIX509Cert getSigningCert (in AUTF8String aEntryName); */
428 : NS_IMETHODIMP nsZipReader::GetSigningCert(const nsACString & aEntryName, nsIX509Cert * *_retval)
429 : {
430 : return NS_ERROR_NOT_IMPLEMENTED;
431 : }
432 :
433 : /* readonly attribute uint32_t manifestEntriesCount; */
434 : NS_IMETHODIMP nsZipReader::GetManifestEntriesCount(uint32_t *aManifestEntriesCount)
435 : {
436 : return NS_ERROR_NOT_IMPLEMENTED;
437 : }
438 :
439 : /* End of implementation class template. */
440 : #endif
441 :
442 :
443 : /* starting interface: nsIZipReaderCache */
444 : #define NS_IZIPREADERCACHE_IID_STR "31179807-9fcd-46c4-befa-2ade209a394b"
445 :
446 : #define NS_IZIPREADERCACHE_IID \
447 : {0x31179807, 0x9fcd, 0x46c4, \
448 : { 0xbe, 0xfa, 0x2a, 0xde, 0x20, 0x9a, 0x39, 0x4b }}
449 :
450 1 : class NS_NO_VTABLE nsIZipReaderCache : public nsISupports {
451 : public:
452 :
453 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IZIPREADERCACHE_IID)
454 :
455 : /* void init (in unsigned long cacheSize); */
456 : NS_IMETHOD Init(uint32_t cacheSize) = 0;
457 :
458 : /* nsIZipReader getZip (in nsIFile zipFile); */
459 : NS_IMETHOD GetZip(nsIFile *zipFile, nsIZipReader * *_retval) = 0;
460 :
461 : /* bool isCached (in nsIFile zipFile); */
462 : NS_IMETHOD IsCached(nsIFile *zipFile, bool *_retval) = 0;
463 :
464 : /* nsIZipReader getInnerZip (in nsIFile zipFile, in AUTF8String zipEntry); */
465 : NS_IMETHOD GetInnerZip(nsIFile *zipFile, const nsACString & zipEntry, nsIZipReader * *_retval) = 0;
466 :
467 : /* PRFileDescStar getFd (in nsIFile zipFile); */
468 : NS_IMETHOD GetFd(nsIFile *zipFile, PRFileDesc **_retval) = 0;
469 :
470 : };
471 :
472 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIZipReaderCache, NS_IZIPREADERCACHE_IID)
473 :
474 : /* Use this macro when declaring classes that implement this interface. */
475 : #define NS_DECL_NSIZIPREADERCACHE \
476 : NS_IMETHOD Init(uint32_t cacheSize) override; \
477 : NS_IMETHOD GetZip(nsIFile *zipFile, nsIZipReader * *_retval) override; \
478 : NS_IMETHOD IsCached(nsIFile *zipFile, bool *_retval) override; \
479 : NS_IMETHOD GetInnerZip(nsIFile *zipFile, const nsACString & zipEntry, nsIZipReader * *_retval) override; \
480 : NS_IMETHOD GetFd(nsIFile *zipFile, PRFileDesc **_retval) override;
481 :
482 : /* Use this macro when declaring the members of this interface when the
483 : class doesn't implement the interface. This is useful for forwarding. */
484 : #define NS_DECL_NON_VIRTUAL_NSIZIPREADERCACHE \
485 : nsresult Init(uint32_t cacheSize); \
486 : nsresult GetZip(nsIFile *zipFile, nsIZipReader * *_retval); \
487 : nsresult IsCached(nsIFile *zipFile, bool *_retval); \
488 : nsresult GetInnerZip(nsIFile *zipFile, const nsACString & zipEntry, nsIZipReader * *_retval); \
489 : nsresult GetFd(nsIFile *zipFile, PRFileDesc **_retval);
490 :
491 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
492 : #define NS_FORWARD_NSIZIPREADERCACHE(_to) \
493 : NS_IMETHOD Init(uint32_t cacheSize) override { return _to Init(cacheSize); } \
494 : NS_IMETHOD GetZip(nsIFile *zipFile, nsIZipReader * *_retval) override { return _to GetZip(zipFile, _retval); } \
495 : NS_IMETHOD IsCached(nsIFile *zipFile, bool *_retval) override { return _to IsCached(zipFile, _retval); } \
496 : NS_IMETHOD GetInnerZip(nsIFile *zipFile, const nsACString & zipEntry, nsIZipReader * *_retval) override { return _to GetInnerZip(zipFile, zipEntry, _retval); } \
497 : NS_IMETHOD GetFd(nsIFile *zipFile, PRFileDesc **_retval) override { return _to GetFd(zipFile, _retval); }
498 :
499 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
500 : #define NS_FORWARD_SAFE_NSIZIPREADERCACHE(_to) \
501 : NS_IMETHOD Init(uint32_t cacheSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(cacheSize); } \
502 : NS_IMETHOD GetZip(nsIFile *zipFile, nsIZipReader * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetZip(zipFile, _retval); } \
503 : NS_IMETHOD IsCached(nsIFile *zipFile, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsCached(zipFile, _retval); } \
504 : NS_IMETHOD GetInnerZip(nsIFile *zipFile, const nsACString & zipEntry, nsIZipReader * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInnerZip(zipFile, zipEntry, _retval); } \
505 : NS_IMETHOD GetFd(nsIFile *zipFile, PRFileDesc **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFd(zipFile, _retval); }
506 :
507 : #if 0
508 : /* Use the code below as a template for the implementation class for this interface. */
509 :
510 : /* Header file */
511 : class nsZipReaderCache : public nsIZipReaderCache
512 : {
513 : public:
514 : NS_DECL_ISUPPORTS
515 : NS_DECL_NSIZIPREADERCACHE
516 :
517 : nsZipReaderCache();
518 :
519 : private:
520 : ~nsZipReaderCache();
521 :
522 : protected:
523 : /* additional members */
524 : };
525 :
526 : /* Implementation file */
527 : NS_IMPL_ISUPPORTS(nsZipReaderCache, nsIZipReaderCache)
528 :
529 : nsZipReaderCache::nsZipReaderCache()
530 : {
531 : /* member initializers and constructor code */
532 : }
533 :
534 : nsZipReaderCache::~nsZipReaderCache()
535 : {
536 : /* destructor code */
537 : }
538 :
539 : /* void init (in unsigned long cacheSize); */
540 : NS_IMETHODIMP nsZipReaderCache::Init(uint32_t cacheSize)
541 : {
542 : return NS_ERROR_NOT_IMPLEMENTED;
543 : }
544 :
545 : /* nsIZipReader getZip (in nsIFile zipFile); */
546 : NS_IMETHODIMP nsZipReaderCache::GetZip(nsIFile *zipFile, nsIZipReader * *_retval)
547 : {
548 : return NS_ERROR_NOT_IMPLEMENTED;
549 : }
550 :
551 : /* bool isCached (in nsIFile zipFile); */
552 : NS_IMETHODIMP nsZipReaderCache::IsCached(nsIFile *zipFile, bool *_retval)
553 : {
554 : return NS_ERROR_NOT_IMPLEMENTED;
555 : }
556 :
557 : /* nsIZipReader getInnerZip (in nsIFile zipFile, in AUTF8String zipEntry); */
558 : NS_IMETHODIMP nsZipReaderCache::GetInnerZip(nsIFile *zipFile, const nsACString & zipEntry, nsIZipReader * *_retval)
559 : {
560 : return NS_ERROR_NOT_IMPLEMENTED;
561 : }
562 :
563 : /* PRFileDescStar getFd (in nsIFile zipFile); */
564 : NS_IMETHODIMP nsZipReaderCache::GetFd(nsIFile *zipFile, PRFileDesc **_retval)
565 : {
566 : return NS_ERROR_NOT_IMPLEMENTED;
567 : }
568 :
569 : /* End of implementation class template. */
570 : #endif
571 :
572 :
573 : #define NS_ZIPREADER_CID \
574 : { /* 88e2fd0b-f7f4-480c-9483-7846b00e8dad */ \
575 : 0x88e2fd0b, 0xf7f4, 0x480c, \
576 : { 0x94, 0x83, 0x78, 0x46, 0xb0, 0x0e, 0x8d, 0xad } \
577 : }
578 : #define NS_ZIPREADERCACHE_CID \
579 : { /* 608b7f6f-4b60-40d6-87ed-d933bf53d8c1 */ \
580 : 0x608b7f6f, 0x4b60, 0x40d6, \
581 : { 0x87, 0xed, 0xd9, 0x33, 0xbf, 0x53, 0xd8, 0xc1 } \
582 : }
583 :
584 : #endif /* __gen_nsIZipReader_h__ */
|