Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIFileStreams.idl
3 : */
4 :
5 : #ifndef __gen_nsIFileStreams_h__
6 : #define __gen_nsIFileStreams_h__
7 :
8 :
9 : #ifndef __gen_nsIInputStream_h__
10 : #include "nsIInputStream.h"
11 : #endif
12 :
13 : #ifndef __gen_nsIOutputStream_h__
14 : #include "nsIOutputStream.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 nsIFile; /* forward declaration */
22 :
23 : struct PRFileDesc;
24 :
25 : /* starting interface: nsIFileInputStream */
26 : #define NS_IFILEINPUTSTREAM_IID_STR "e3d56a20-c7ec-11d3-8cda-0060b0fc14a3"
27 :
28 : #define NS_IFILEINPUTSTREAM_IID \
29 : {0xe3d56a20, 0xc7ec, 0x11d3, \
30 : { 0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}
31 :
32 273 : class NS_NO_VTABLE nsIFileInputStream : public nsIInputStream {
33 : public:
34 :
35 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFILEINPUTSTREAM_IID)
36 :
37 : /* void init (in nsIFile file, in long ioFlags, in long perm, in long behaviorFlags); */
38 : NS_IMETHOD Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags) = 0;
39 :
40 : enum {
41 : DELETE_ON_CLOSE = 2,
42 : CLOSE_ON_EOF = 4,
43 : REOPEN_ON_REWIND = 8,
44 : DEFER_OPEN = 16,
45 : SHARE_DELETE = 32
46 : };
47 :
48 : };
49 :
50 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIFileInputStream, NS_IFILEINPUTSTREAM_IID)
51 :
52 : /* Use this macro when declaring classes that implement this interface. */
53 : #define NS_DECL_NSIFILEINPUTSTREAM \
54 : NS_IMETHOD Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags) override; \
55 :
56 : /* Use this macro when declaring the members of this interface when the
57 : class doesn't implement the interface. This is useful for forwarding. */
58 : #define NS_DECL_NON_VIRTUAL_NSIFILEINPUTSTREAM \
59 : nsresult Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags); \
60 :
61 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
62 : #define NS_FORWARD_NSIFILEINPUTSTREAM(_to) \
63 : NS_IMETHOD Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags) override { return _to Init(file, ioFlags, perm, behaviorFlags); } \
64 :
65 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
66 : #define NS_FORWARD_SAFE_NSIFILEINPUTSTREAM(_to) \
67 : NS_IMETHOD Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(file, ioFlags, perm, behaviorFlags); } \
68 :
69 : #if 0
70 : /* Use the code below as a template for the implementation class for this interface. */
71 :
72 : /* Header file */
73 : class nsFileInputStream : public nsIFileInputStream
74 : {
75 : public:
76 : NS_DECL_ISUPPORTS
77 : NS_DECL_NSIFILEINPUTSTREAM
78 :
79 : nsFileInputStream();
80 :
81 : private:
82 : ~nsFileInputStream();
83 :
84 : protected:
85 : /* additional members */
86 : };
87 :
88 : /* Implementation file */
89 : NS_IMPL_ISUPPORTS(nsFileInputStream, nsIFileInputStream)
90 :
91 : nsFileInputStream::nsFileInputStream()
92 : {
93 : /* member initializers and constructor code */
94 : }
95 :
96 : nsFileInputStream::~nsFileInputStream()
97 : {
98 : /* destructor code */
99 : }
100 :
101 : /* void init (in nsIFile file, in long ioFlags, in long perm, in long behaviorFlags); */
102 : NS_IMETHODIMP nsFileInputStream::Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags)
103 : {
104 : return NS_ERROR_NOT_IMPLEMENTED;
105 : }
106 :
107 : /* End of implementation class template. */
108 : #endif
109 :
110 :
111 : /* starting interface: nsIFileOutputStream */
112 : #define NS_IFILEOUTPUTSTREAM_IID_STR "e734cac9-1295-4e6f-9684-3ac4e1f91063"
113 :
114 : #define NS_IFILEOUTPUTSTREAM_IID \
115 : {0xe734cac9, 0x1295, 0x4e6f, \
116 : { 0x96, 0x84, 0x3a, 0xc4, 0xe1, 0xf9, 0x10, 0x63 }}
117 :
118 12 : class NS_NO_VTABLE nsIFileOutputStream : public nsIOutputStream {
119 : public:
120 :
121 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFILEOUTPUTSTREAM_IID)
122 :
123 : /* void init (in nsIFile file, in long ioFlags, in long perm, in long behaviorFlags); */
124 : NS_IMETHOD Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags) = 0;
125 :
126 : /* [noscript] void preallocate (in long long length); */
127 : NS_IMETHOD Preallocate(int64_t length) = 0;
128 :
129 : enum {
130 : DEFER_OPEN = 1
131 : };
132 :
133 : };
134 :
135 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIFileOutputStream, NS_IFILEOUTPUTSTREAM_IID)
136 :
137 : /* Use this macro when declaring classes that implement this interface. */
138 : #define NS_DECL_NSIFILEOUTPUTSTREAM \
139 : NS_IMETHOD Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags) override; \
140 : NS_IMETHOD Preallocate(int64_t length) override; \
141 :
142 : /* Use this macro when declaring the members of this interface when the
143 : class doesn't implement the interface. This is useful for forwarding. */
144 : #define NS_DECL_NON_VIRTUAL_NSIFILEOUTPUTSTREAM \
145 : nsresult Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags); \
146 : nsresult Preallocate(int64_t length); \
147 :
148 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
149 : #define NS_FORWARD_NSIFILEOUTPUTSTREAM(_to) \
150 : NS_IMETHOD Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags) override { return _to Init(file, ioFlags, perm, behaviorFlags); } \
151 : NS_IMETHOD Preallocate(int64_t length) override { return _to Preallocate(length); } \
152 :
153 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
154 : #define NS_FORWARD_SAFE_NSIFILEOUTPUTSTREAM(_to) \
155 : NS_IMETHOD Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(file, ioFlags, perm, behaviorFlags); } \
156 : NS_IMETHOD Preallocate(int64_t length) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Preallocate(length); } \
157 :
158 : #if 0
159 : /* Use the code below as a template for the implementation class for this interface. */
160 :
161 : /* Header file */
162 : class nsFileOutputStream : public nsIFileOutputStream
163 : {
164 : public:
165 : NS_DECL_ISUPPORTS
166 : NS_DECL_NSIFILEOUTPUTSTREAM
167 :
168 : nsFileOutputStream();
169 :
170 : private:
171 : ~nsFileOutputStream();
172 :
173 : protected:
174 : /* additional members */
175 : };
176 :
177 : /* Implementation file */
178 : NS_IMPL_ISUPPORTS(nsFileOutputStream, nsIFileOutputStream)
179 :
180 : nsFileOutputStream::nsFileOutputStream()
181 : {
182 : /* member initializers and constructor code */
183 : }
184 :
185 : nsFileOutputStream::~nsFileOutputStream()
186 : {
187 : /* destructor code */
188 : }
189 :
190 : /* void init (in nsIFile file, in long ioFlags, in long perm, in long behaviorFlags); */
191 : NS_IMETHODIMP nsFileOutputStream::Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags)
192 : {
193 : return NS_ERROR_NOT_IMPLEMENTED;
194 : }
195 :
196 : /* [noscript] void preallocate (in long long length); */
197 : NS_IMETHODIMP nsFileOutputStream::Preallocate(int64_t length)
198 : {
199 : return NS_ERROR_NOT_IMPLEMENTED;
200 : }
201 :
202 : /* End of implementation class template. */
203 : #endif
204 :
205 :
206 : /* starting interface: nsIFileStream */
207 : #define NS_IFILESTREAM_IID_STR "82cf605a-8393-4550-83ab-43cd5578e006"
208 :
209 : #define NS_IFILESTREAM_IID \
210 : {0x82cf605a, 0x8393, 0x4550, \
211 : { 0x83, 0xab, 0x43, 0xcd, 0x55, 0x78, 0xe0, 0x06 }}
212 :
213 0 : class NS_NO_VTABLE nsIFileStream : public nsISupports {
214 : public:
215 :
216 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFILESTREAM_IID)
217 :
218 : /* void init (in nsIFile file, in long ioFlags, in long perm, in long behaviorFlags); */
219 : NS_IMETHOD Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags) = 0;
220 :
221 : enum {
222 : DEFER_OPEN = 1
223 : };
224 :
225 : };
226 :
227 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIFileStream, NS_IFILESTREAM_IID)
228 :
229 : /* Use this macro when declaring classes that implement this interface. */
230 : #define NS_DECL_NSIFILESTREAM \
231 : NS_IMETHOD Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags) override; \
232 :
233 : /* Use this macro when declaring the members of this interface when the
234 : class doesn't implement the interface. This is useful for forwarding. */
235 : #define NS_DECL_NON_VIRTUAL_NSIFILESTREAM \
236 : nsresult Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags); \
237 :
238 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
239 : #define NS_FORWARD_NSIFILESTREAM(_to) \
240 : NS_IMETHOD Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags) override { return _to Init(file, ioFlags, perm, behaviorFlags); } \
241 :
242 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
243 : #define NS_FORWARD_SAFE_NSIFILESTREAM(_to) \
244 : NS_IMETHOD Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(file, ioFlags, perm, behaviorFlags); } \
245 :
246 : #if 0
247 : /* Use the code below as a template for the implementation class for this interface. */
248 :
249 : /* Header file */
250 : class nsFileStream : public nsIFileStream
251 : {
252 : public:
253 : NS_DECL_ISUPPORTS
254 : NS_DECL_NSIFILESTREAM
255 :
256 : nsFileStream();
257 :
258 : private:
259 : ~nsFileStream();
260 :
261 : protected:
262 : /* additional members */
263 : };
264 :
265 : /* Implementation file */
266 : NS_IMPL_ISUPPORTS(nsFileStream, nsIFileStream)
267 :
268 : nsFileStream::nsFileStream()
269 : {
270 : /* member initializers and constructor code */
271 : }
272 :
273 : nsFileStream::~nsFileStream()
274 : {
275 : /* destructor code */
276 : }
277 :
278 : /* void init (in nsIFile file, in long ioFlags, in long perm, in long behaviorFlags); */
279 : NS_IMETHODIMP nsFileStream::Init(nsIFile *file, int32_t ioFlags, int32_t perm, int32_t behaviorFlags)
280 : {
281 : return NS_ERROR_NOT_IMPLEMENTED;
282 : }
283 :
284 : /* End of implementation class template. */
285 : #endif
286 :
287 :
288 : /* starting interface: nsIFileMetadata */
289 : #define NS_IFILEMETADATA_IID_STR "07f679e4-9601-4bd1-b510-cd3852edb881"
290 :
291 : #define NS_IFILEMETADATA_IID \
292 : {0x07f679e4, 0x9601, 0x4bd1, \
293 : { 0xb5, 0x10, 0xcd, 0x38, 0x52, 0xed, 0xb8, 0x81 }}
294 :
295 285 : class NS_NO_VTABLE nsIFileMetadata : public nsISupports {
296 : public:
297 :
298 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFILEMETADATA_IID)
299 :
300 : /* readonly attribute long long size; */
301 : NS_IMETHOD GetSize(int64_t *aSize) = 0;
302 :
303 : /* readonly attribute long long lastModified; */
304 : NS_IMETHOD GetLastModified(int64_t *aLastModified) = 0;
305 :
306 : /* [noscript] PRFileDescPtr getFileDescriptor (); */
307 : NS_IMETHOD GetFileDescriptor(PRFileDesc **_retval) = 0;
308 :
309 : };
310 :
311 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIFileMetadata, NS_IFILEMETADATA_IID)
312 :
313 : /* Use this macro when declaring classes that implement this interface. */
314 : #define NS_DECL_NSIFILEMETADATA \
315 : NS_IMETHOD GetSize(int64_t *aSize) override; \
316 : NS_IMETHOD GetLastModified(int64_t *aLastModified) override; \
317 : NS_IMETHOD GetFileDescriptor(PRFileDesc **_retval) override;
318 :
319 : /* Use this macro when declaring the members of this interface when the
320 : class doesn't implement the interface. This is useful for forwarding. */
321 : #define NS_DECL_NON_VIRTUAL_NSIFILEMETADATA \
322 : nsresult GetSize(int64_t *aSize); \
323 : nsresult GetLastModified(int64_t *aLastModified); \
324 : nsresult GetFileDescriptor(PRFileDesc **_retval);
325 :
326 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
327 : #define NS_FORWARD_NSIFILEMETADATA(_to) \
328 : NS_IMETHOD GetSize(int64_t *aSize) override { return _to GetSize(aSize); } \
329 : NS_IMETHOD GetLastModified(int64_t *aLastModified) override { return _to GetLastModified(aLastModified); } \
330 : NS_IMETHOD GetFileDescriptor(PRFileDesc **_retval) override { return _to GetFileDescriptor(_retval); }
331 :
332 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
333 : #define NS_FORWARD_SAFE_NSIFILEMETADATA(_to) \
334 : NS_IMETHOD GetSize(int64_t *aSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSize(aSize); } \
335 : NS_IMETHOD GetLastModified(int64_t *aLastModified) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastModified(aLastModified); } \
336 : NS_IMETHOD GetFileDescriptor(PRFileDesc **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFileDescriptor(_retval); }
337 :
338 : #if 0
339 : /* Use the code below as a template for the implementation class for this interface. */
340 :
341 : /* Header file */
342 : class nsFileMetadata : public nsIFileMetadata
343 : {
344 : public:
345 : NS_DECL_ISUPPORTS
346 : NS_DECL_NSIFILEMETADATA
347 :
348 : nsFileMetadata();
349 :
350 : private:
351 : ~nsFileMetadata();
352 :
353 : protected:
354 : /* additional members */
355 : };
356 :
357 : /* Implementation file */
358 : NS_IMPL_ISUPPORTS(nsFileMetadata, nsIFileMetadata)
359 :
360 : nsFileMetadata::nsFileMetadata()
361 : {
362 : /* member initializers and constructor code */
363 : }
364 :
365 : nsFileMetadata::~nsFileMetadata()
366 : {
367 : /* destructor code */
368 : }
369 :
370 : /* readonly attribute long long size; */
371 : NS_IMETHODIMP nsFileMetadata::GetSize(int64_t *aSize)
372 : {
373 : return NS_ERROR_NOT_IMPLEMENTED;
374 : }
375 :
376 : /* readonly attribute long long lastModified; */
377 : NS_IMETHODIMP nsFileMetadata::GetLastModified(int64_t *aLastModified)
378 : {
379 : return NS_ERROR_NOT_IMPLEMENTED;
380 : }
381 :
382 : /* [noscript] PRFileDescPtr getFileDescriptor (); */
383 : NS_IMETHODIMP nsFileMetadata::GetFileDescriptor(PRFileDesc **_retval)
384 : {
385 : return NS_ERROR_NOT_IMPLEMENTED;
386 : }
387 :
388 : /* End of implementation class template. */
389 : #endif
390 :
391 :
392 : #endif /* __gen_nsIFileStreams_h__ */
|