1 | /*
|
---|
2 | * DO NOT EDIT. THIS FILE IS GENERATED FROM 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 |
|
---|
24 | /* starting interface: nsIFileInputStream */
|
---|
25 | #define NS_IFILEINPUTSTREAM_IID_STR "e3d56a20-c7ec-11d3-8cda-0060b0fc14a3"
|
---|
26 |
|
---|
27 | #define NS_IFILEINPUTSTREAM_IID \
|
---|
28 | {0xe3d56a20, 0xc7ec, 0x11d3, \
|
---|
29 | { 0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}
|
---|
30 |
|
---|
31 | /**
|
---|
32 | * An input stream that allows you to read from a file.
|
---|
33 | */
|
---|
34 | class NS_NO_VTABLE nsIFileInputStream : public nsIInputStream {
|
---|
35 | public:
|
---|
36 |
|
---|
37 | NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFILEINPUTSTREAM_IID)
|
---|
38 |
|
---|
39 | /**
|
---|
40 | * @param file file to read from (must QI to nsILocalFile)
|
---|
41 | * @param ioFlags file open flags listed in prio.h
|
---|
42 | * @param perm file mode bits listed in prio.h
|
---|
43 | * @param behaviorFlags flags specifying various behaviors of the class
|
---|
44 | * (see enumerations in the class)
|
---|
45 | */
|
---|
46 | /* void init (in nsIFile file, in long ioFlags, in long perm, in long behaviorFlags); */
|
---|
47 | NS_IMETHOD Init(nsIFile *file, PRInt32 ioFlags, PRInt32 perm, PRInt32 behaviorFlags) = 0;
|
---|
48 |
|
---|
49 | /**
|
---|
50 | * If this is set, the file will be deleted by the time the stream is
|
---|
51 | * closed. It may be removed before the stream is closed if it is possible
|
---|
52 | * to delete it and still read from it.
|
---|
53 | *
|
---|
54 | * If OPEN_ON_READ is defined, and the file was recreated after the first
|
---|
55 | * delete, the file will be deleted again when it is closed again.
|
---|
56 | */
|
---|
57 | enum { DELETE_ON_CLOSE = 2 };
|
---|
58 |
|
---|
59 | /**
|
---|
60 | * If this is set, the file will close automatically when the end of the
|
---|
61 | * file is reached.
|
---|
62 | */
|
---|
63 | enum { CLOSE_ON_EOF = 4 };
|
---|
64 |
|
---|
65 | /**
|
---|
66 | * If this is set, the file will be reopened whenever Seek(0) occurs. If
|
---|
67 | * the file is already open and the seek occurs, it will happen naturally.
|
---|
68 | * (The file will only be reopened if it is closed for some reason.)
|
---|
69 | */
|
---|
70 | enum { REOPEN_ON_REWIND = 8 };
|
---|
71 |
|
---|
72 | };
|
---|
73 |
|
---|
74 | /* Use this macro when declaring classes that implement this interface. */
|
---|
75 | #define NS_DECL_NSIFILEINPUTSTREAM \
|
---|
76 | NS_IMETHOD Init(nsIFile *file, PRInt32 ioFlags, PRInt32 perm, PRInt32 behaviorFlags); \
|
---|
77 |
|
---|
78 | /* Use this macro to declare functions that forward the behavior of this interface to another object. */
|
---|
79 | #define NS_FORWARD_NSIFILEINPUTSTREAM(_to) \
|
---|
80 | NS_IMETHOD Init(nsIFile *file, PRInt32 ioFlags, PRInt32 perm, PRInt32 behaviorFlags) { return _to Init(file, ioFlags, perm, behaviorFlags); } \
|
---|
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_NSIFILEINPUTSTREAM(_to) \
|
---|
84 | NS_IMETHOD Init(nsIFile *file, PRInt32 ioFlags, PRInt32 perm, PRInt32 behaviorFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(file, ioFlags, perm, behaviorFlags); } \
|
---|
85 |
|
---|
86 | #if 0
|
---|
87 | /* Use the code below as a template for the implementation class for this interface. */
|
---|
88 |
|
---|
89 | /* Header file */
|
---|
90 | class nsFileInputStream : public nsIFileInputStream
|
---|
91 | {
|
---|
92 | public:
|
---|
93 | NS_DECL_ISUPPORTS
|
---|
94 | NS_DECL_NSIFILEINPUTSTREAM
|
---|
95 |
|
---|
96 | nsFileInputStream();
|
---|
97 |
|
---|
98 | private:
|
---|
99 | ~nsFileInputStream();
|
---|
100 |
|
---|
101 | protected:
|
---|
102 | /* additional members */
|
---|
103 | };
|
---|
104 |
|
---|
105 | /* Implementation file */
|
---|
106 | NS_IMPL_ISUPPORTS1(nsFileInputStream, nsIFileInputStream)
|
---|
107 |
|
---|
108 | nsFileInputStream::nsFileInputStream()
|
---|
109 | {
|
---|
110 | /* member initializers and constructor code */
|
---|
111 | }
|
---|
112 |
|
---|
113 | nsFileInputStream::~nsFileInputStream()
|
---|
114 | {
|
---|
115 | /* destructor code */
|
---|
116 | }
|
---|
117 |
|
---|
118 | /* void init (in nsIFile file, in long ioFlags, in long perm, in long behaviorFlags); */
|
---|
119 | NS_IMETHODIMP nsFileInputStream::Init(nsIFile *file, PRInt32 ioFlags, PRInt32 perm, PRInt32 behaviorFlags)
|
---|
120 | {
|
---|
121 | return NS_ERROR_NOT_IMPLEMENTED;
|
---|
122 | }
|
---|
123 |
|
---|
124 | /* End of implementation class template. */
|
---|
125 | #endif
|
---|
126 |
|
---|
127 |
|
---|
128 | /* starting interface: nsIFileOutputStream */
|
---|
129 | #define NS_IFILEOUTPUTSTREAM_IID_STR "e6f68040-c7ec-11d3-8cda-0060b0fc14a3"
|
---|
130 |
|
---|
131 | #define NS_IFILEOUTPUTSTREAM_IID \
|
---|
132 | {0xe6f68040, 0xc7ec, 0x11d3, \
|
---|
133 | { 0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}
|
---|
134 |
|
---|
135 | /**
|
---|
136 | * An output stream that lets you stream to a file.
|
---|
137 | */
|
---|
138 | class NS_NO_VTABLE nsIFileOutputStream : public nsIOutputStream {
|
---|
139 | public:
|
---|
140 |
|
---|
141 | NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFILEOUTPUTSTREAM_IID)
|
---|
142 |
|
---|
143 | /**
|
---|
144 | * @param file - file to write to (must QI to nsILocalFile)
|
---|
145 | * @param ioFlags - file open flags listed in prio.h
|
---|
146 | * @param perm - file mode bits listed in prio.h
|
---|
147 | * @param behaviorFlags flags specifying various behaviors of the class
|
---|
148 | * (currently none supported)
|
---|
149 | */
|
---|
150 | /* void init (in nsIFile file, in long ioFlags, in long perm, in long behaviorFlags); */
|
---|
151 | NS_IMETHOD Init(nsIFile *file, PRInt32 ioFlags, PRInt32 perm, PRInt32 behaviorFlags) = 0;
|
---|
152 |
|
---|
153 | };
|
---|
154 |
|
---|
155 | /* Use this macro when declaring classes that implement this interface. */
|
---|
156 | #define NS_DECL_NSIFILEOUTPUTSTREAM \
|
---|
157 | NS_IMETHOD Init(nsIFile *file, PRInt32 ioFlags, PRInt32 perm, PRInt32 behaviorFlags);
|
---|
158 |
|
---|
159 | /* Use this macro to declare functions that forward the behavior of this interface to another object. */
|
---|
160 | #define NS_FORWARD_NSIFILEOUTPUTSTREAM(_to) \
|
---|
161 | NS_IMETHOD Init(nsIFile *file, PRInt32 ioFlags, PRInt32 perm, PRInt32 behaviorFlags) { return _to Init(file, ioFlags, perm, behaviorFlags); }
|
---|
162 |
|
---|
163 | /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
|
---|
164 | #define NS_FORWARD_SAFE_NSIFILEOUTPUTSTREAM(_to) \
|
---|
165 | NS_IMETHOD Init(nsIFile *file, PRInt32 ioFlags, PRInt32 perm, PRInt32 behaviorFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(file, ioFlags, perm, behaviorFlags); }
|
---|
166 |
|
---|
167 | #if 0
|
---|
168 | /* Use the code below as a template for the implementation class for this interface. */
|
---|
169 |
|
---|
170 | /* Header file */
|
---|
171 | class nsFileOutputStream : public nsIFileOutputStream
|
---|
172 | {
|
---|
173 | public:
|
---|
174 | NS_DECL_ISUPPORTS
|
---|
175 | NS_DECL_NSIFILEOUTPUTSTREAM
|
---|
176 |
|
---|
177 | nsFileOutputStream();
|
---|
178 |
|
---|
179 | private:
|
---|
180 | ~nsFileOutputStream();
|
---|
181 |
|
---|
182 | protected:
|
---|
183 | /* additional members */
|
---|
184 | };
|
---|
185 |
|
---|
186 | /* Implementation file */
|
---|
187 | NS_IMPL_ISUPPORTS1(nsFileOutputStream, nsIFileOutputStream)
|
---|
188 |
|
---|
189 | nsFileOutputStream::nsFileOutputStream()
|
---|
190 | {
|
---|
191 | /* member initializers and constructor code */
|
---|
192 | }
|
---|
193 |
|
---|
194 | nsFileOutputStream::~nsFileOutputStream()
|
---|
195 | {
|
---|
196 | /* destructor code */
|
---|
197 | }
|
---|
198 |
|
---|
199 | /* void init (in nsIFile file, in long ioFlags, in long perm, in long behaviorFlags); */
|
---|
200 | NS_IMETHODIMP nsFileOutputStream::Init(nsIFile *file, PRInt32 ioFlags, PRInt32 perm, PRInt32 behaviorFlags)
|
---|
201 | {
|
---|
202 | return NS_ERROR_NOT_IMPLEMENTED;
|
---|
203 | }
|
---|
204 |
|
---|
205 | /* End of implementation class template. */
|
---|
206 | #endif
|
---|
207 |
|
---|
208 |
|
---|
209 | #endif /* __gen_nsIFileStreams_h__ */
|
---|