1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-aurora-lnx-codecoverage/build/content/base/public/nsIDOMFile.idl
3 : */
4 :
5 : #ifndef __gen_nsIDOMFile_h__
6 : #define __gen_nsIDOMFile_h__
7 :
8 :
9 : #ifndef __gen_domstubs_h__
10 : #include "domstubs.h"
11 : #endif
12 :
13 : #include "jspubtd.h"
14 :
15 : /* For IDL files that don't want to include root IDL files. */
16 : #ifndef NS_NO_VTABLE
17 : #define NS_NO_VTABLE
18 : #endif
19 : #include "jsapi.h"
20 : namespace mozilla {
21 : namespace dom {
22 : namespace indexedDB {
23 : class FileInfo;
24 : class FileManager;
25 : }
26 : }
27 : }
28 : class nsIDOMFileError; /* forward declaration */
29 :
30 : class nsIInputStream; /* forward declaration */
31 :
32 : class nsIURI; /* forward declaration */
33 :
34 : class nsIPrincipal; /* forward declaration */
35 :
36 : class nsIDOMBlob; /* forward declaration */
37 :
38 :
39 : /* starting interface: nsIDOMBlob */
40 : #define NS_IDOMBLOB_IID_STR "f62c6887-e3bc-495a-802c-287e12e969a0"
41 :
42 : #define NS_IDOMBLOB_IID \
43 : {0xf62c6887, 0xe3bc, 0x495a, \
44 : { 0x80, 0x2c, 0x28, 0x7e, 0x12, 0xe9, 0x69, 0xa0 }}
45 :
46 10 : class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMBlob : public nsISupports {
47 : public:
48 :
49 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMBLOB_IID)
50 :
51 : /* readonly attribute unsigned long long size; */
52 : NS_SCRIPTABLE NS_IMETHOD GetSize(PRUint64 *aSize) = 0;
53 :
54 : /* readonly attribute DOMString type; */
55 : NS_SCRIPTABLE NS_IMETHOD GetType(nsAString & aType) = 0;
56 :
57 : /* [noscript] readonly attribute nsIInputStream internalStream; */
58 : NS_IMETHOD GetInternalStream(nsIInputStream * *aInternalStream) = 0;
59 :
60 : /* [noscript] DOMString getInternalUrl (in nsIPrincipal principal); */
61 : NS_IMETHOD GetInternalUrl(nsIPrincipal *principal, nsAString & _retval NS_OUTPARAM) = 0;
62 :
63 : /* [optional_argc] nsIDOMBlob slice ([optional] in long long start, [optional] in long long end, [optional] in DOMString contentType); */
64 : NS_SCRIPTABLE NS_IMETHOD Slice(PRInt64 start, PRInt64 end, const nsAString & contentType, PRUint8 _argc, nsIDOMBlob * *_retval NS_OUTPARAM) = 0;
65 :
66 : /* [notxpcom] long long getFileId (); */
67 : NS_IMETHOD_(PRInt64) GetFileId(void) = 0;
68 :
69 : /* [notxpcom] void addFileInfo (in FileInfo aFileInfo); */
70 : NS_IMETHOD_(void) AddFileInfo(mozilla::dom::indexedDB::FileInfo *aFileInfo) = 0;
71 :
72 : /* [notxpcom] FileInfo getFileInfo (in FileManager aFileManager); */
73 : NS_IMETHOD_(mozilla::dom::indexedDB::FileInfo *) GetFileInfo(mozilla::dom::indexedDB::FileManager *aFileManager) = 0;
74 :
75 : };
76 :
77 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMBlob, NS_IDOMBLOB_IID)
78 :
79 : /* Use this macro when declaring classes that implement this interface. */
80 : #define NS_DECL_NSIDOMBLOB \
81 : NS_SCRIPTABLE NS_IMETHOD GetSize(PRUint64 *aSize); \
82 : NS_SCRIPTABLE NS_IMETHOD GetType(nsAString & aType); \
83 : NS_IMETHOD GetInternalStream(nsIInputStream * *aInternalStream); \
84 : NS_IMETHOD GetInternalUrl(nsIPrincipal *principal, nsAString & _retval NS_OUTPARAM); \
85 : NS_SCRIPTABLE NS_IMETHOD Slice(PRInt64 start, PRInt64 end, const nsAString & contentType, PRUint8 _argc, nsIDOMBlob * *_retval NS_OUTPARAM); \
86 : NS_IMETHOD_(PRInt64) GetFileId(void); \
87 : NS_IMETHOD_(void) AddFileInfo(mozilla::dom::indexedDB::FileInfo *aFileInfo); \
88 : NS_IMETHOD_(mozilla::dom::indexedDB::FileInfo *) GetFileInfo(mozilla::dom::indexedDB::FileManager *aFileManager);
89 :
90 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
91 : #define NS_FORWARD_NSIDOMBLOB(_to) \
92 : NS_SCRIPTABLE NS_IMETHOD GetSize(PRUint64 *aSize) { return _to GetSize(aSize); } \
93 : NS_SCRIPTABLE NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \
94 : NS_IMETHOD GetInternalStream(nsIInputStream * *aInternalStream) { return _to GetInternalStream(aInternalStream); } \
95 : NS_IMETHOD GetInternalUrl(nsIPrincipal *principal, nsAString & _retval NS_OUTPARAM) { return _to GetInternalUrl(principal, _retval); } \
96 : NS_SCRIPTABLE NS_IMETHOD Slice(PRInt64 start, PRInt64 end, const nsAString & contentType, PRUint8 _argc, nsIDOMBlob * *_retval NS_OUTPARAM) { return _to Slice(start, end, contentType, _argc, _retval); } \
97 : NS_IMETHOD_(PRInt64) GetFileId(void) { return _to GetFileId(); } \
98 : NS_IMETHOD_(void) AddFileInfo(mozilla::dom::indexedDB::FileInfo *aFileInfo) { return _to AddFileInfo(aFileInfo); } \
99 : NS_IMETHOD_(mozilla::dom::indexedDB::FileInfo *) GetFileInfo(mozilla::dom::indexedDB::FileManager *aFileManager) { return _to GetFileInfo(aFileManager); }
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_NSIDOMBLOB(_to) \
103 : NS_SCRIPTABLE NS_IMETHOD GetSize(PRUint64 *aSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSize(aSize); } \
104 : NS_SCRIPTABLE NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
105 : NS_IMETHOD GetInternalStream(nsIInputStream * *aInternalStream) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInternalStream(aInternalStream); } \
106 : NS_IMETHOD GetInternalUrl(nsIPrincipal *principal, nsAString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInternalUrl(principal, _retval); } \
107 : NS_SCRIPTABLE NS_IMETHOD Slice(PRInt64 start, PRInt64 end, const nsAString & contentType, PRUint8 _argc, nsIDOMBlob * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Slice(start, end, contentType, _argc, _retval); } \
108 : NS_IMETHOD_(PRInt64) GetFileId(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFileId(); } \
109 : NS_IMETHOD_(void) AddFileInfo(mozilla::dom::indexedDB::FileInfo *aFileInfo) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddFileInfo(aFileInfo); } \
110 : NS_IMETHOD_(mozilla::dom::indexedDB::FileInfo *) GetFileInfo(mozilla::dom::indexedDB::FileManager *aFileManager) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFileInfo(aFileManager); }
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 nsDOMBlob : public nsIDOMBlob
117 : {
118 : public:
119 : NS_DECL_ISUPPORTS
120 : NS_DECL_NSIDOMBLOB
121 :
122 : nsDOMBlob();
123 :
124 : private:
125 : ~nsDOMBlob();
126 :
127 : protected:
128 : /* additional members */
129 : };
130 :
131 : /* Implementation file */
132 : NS_IMPL_ISUPPORTS1(nsDOMBlob, nsIDOMBlob)
133 :
134 : nsDOMBlob::nsDOMBlob()
135 : {
136 : /* member initializers and constructor code */
137 : }
138 :
139 : nsDOMBlob::~nsDOMBlob()
140 : {
141 : /* destructor code */
142 : }
143 :
144 : /* readonly attribute unsigned long long size; */
145 : NS_IMETHODIMP nsDOMBlob::GetSize(PRUint64 *aSize)
146 : {
147 : return NS_ERROR_NOT_IMPLEMENTED;
148 : }
149 :
150 : /* readonly attribute DOMString type; */
151 : NS_IMETHODIMP nsDOMBlob::GetType(nsAString & aType)
152 : {
153 : return NS_ERROR_NOT_IMPLEMENTED;
154 : }
155 :
156 : /* [noscript] readonly attribute nsIInputStream internalStream; */
157 : NS_IMETHODIMP nsDOMBlob::GetInternalStream(nsIInputStream * *aInternalStream)
158 : {
159 : return NS_ERROR_NOT_IMPLEMENTED;
160 : }
161 :
162 : /* [noscript] DOMString getInternalUrl (in nsIPrincipal principal); */
163 : NS_IMETHODIMP nsDOMBlob::GetInternalUrl(nsIPrincipal *principal, nsAString & _retval NS_OUTPARAM)
164 : {
165 : return NS_ERROR_NOT_IMPLEMENTED;
166 : }
167 :
168 : /* [optional_argc] nsIDOMBlob slice ([optional] in long long start, [optional] in long long end, [optional] in DOMString contentType); */
169 : NS_IMETHODIMP nsDOMBlob::Slice(PRInt64 start, PRInt64 end, const nsAString & contentType, PRUint8 _argc, nsIDOMBlob * *_retval NS_OUTPARAM)
170 : {
171 : return NS_ERROR_NOT_IMPLEMENTED;
172 : }
173 :
174 : /* [notxpcom] long long getFileId (); */
175 : NS_IMETHODIMP_(PRInt64) nsDOMBlob::GetFileId()
176 : {
177 : return NS_ERROR_NOT_IMPLEMENTED;
178 : }
179 :
180 : /* [notxpcom] void addFileInfo (in FileInfo aFileInfo); */
181 : NS_IMETHODIMP_(void) nsDOMBlob::AddFileInfo(mozilla::dom::indexedDB::FileInfo *aFileInfo)
182 : {
183 : return NS_ERROR_NOT_IMPLEMENTED;
184 : }
185 :
186 : /* [notxpcom] FileInfo getFileInfo (in FileManager aFileManager); */
187 : NS_IMETHODIMP_(mozilla::dom::indexedDB::FileInfo *) nsDOMBlob::GetFileInfo(mozilla::dom::indexedDB::FileManager *aFileManager)
188 : {
189 : return NS_ERROR_NOT_IMPLEMENTED;
190 : }
191 :
192 : /* End of implementation class template. */
193 : #endif
194 :
195 :
196 : /* starting interface: nsIDOMFile */
197 : #define NS_IDOMFILE_IID_STR "b096ef67-7b77-47f8-8e70-5d8ee36416bf"
198 :
199 : #define NS_IDOMFILE_IID \
200 : {0xb096ef67, 0x7b77, 0x47f8, \
201 : { 0x8e, 0x70, 0x5d, 0x8e, 0xe3, 0x64, 0x16, 0xbf }}
202 :
203 10 : class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMFile : public nsIDOMBlob {
204 : public:
205 :
206 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMFILE_IID)
207 :
208 : /* readonly attribute DOMString name; */
209 : NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) = 0;
210 :
211 : /* readonly attribute DOMString mozFullPath; */
212 : NS_SCRIPTABLE NS_IMETHOD GetMozFullPath(nsAString & aMozFullPath) = 0;
213 :
214 : /* [noscript] readonly attribute DOMString mozFullPathInternal; */
215 : NS_IMETHOD GetMozFullPathInternal(nsAString & aMozFullPathInternal) = 0;
216 :
217 : };
218 :
219 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMFile, NS_IDOMFILE_IID)
220 :
221 : /* Use this macro when declaring classes that implement this interface. */
222 : #define NS_DECL_NSIDOMFILE \
223 : NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName); \
224 : NS_SCRIPTABLE NS_IMETHOD GetMozFullPath(nsAString & aMozFullPath); \
225 : NS_IMETHOD GetMozFullPathInternal(nsAString & aMozFullPathInternal);
226 :
227 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
228 : #define NS_FORWARD_NSIDOMFILE(_to) \
229 : NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \
230 : NS_SCRIPTABLE NS_IMETHOD GetMozFullPath(nsAString & aMozFullPath) { return _to GetMozFullPath(aMozFullPath); } \
231 : NS_IMETHOD GetMozFullPathInternal(nsAString & aMozFullPathInternal) { return _to GetMozFullPathInternal(aMozFullPathInternal); }
232 :
233 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
234 : #define NS_FORWARD_SAFE_NSIDOMFILE(_to) \
235 : NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
236 : NS_SCRIPTABLE NS_IMETHOD GetMozFullPath(nsAString & aMozFullPath) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMozFullPath(aMozFullPath); } \
237 : NS_IMETHOD GetMozFullPathInternal(nsAString & aMozFullPathInternal) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMozFullPathInternal(aMozFullPathInternal); }
238 :
239 : #if 0
240 : /* Use the code below as a template for the implementation class for this interface. */
241 :
242 : /* Header file */
243 : class nsDOMFile : public nsIDOMFile
244 : {
245 : public:
246 : NS_DECL_ISUPPORTS
247 : NS_DECL_NSIDOMFILE
248 :
249 : nsDOMFile();
250 :
251 : private:
252 : ~nsDOMFile();
253 :
254 : protected:
255 : /* additional members */
256 : };
257 :
258 : /* Implementation file */
259 : NS_IMPL_ISUPPORTS1(nsDOMFile, nsIDOMFile)
260 :
261 : nsDOMFile::nsDOMFile()
262 : {
263 : /* member initializers and constructor code */
264 : }
265 :
266 : nsDOMFile::~nsDOMFile()
267 : {
268 : /* destructor code */
269 : }
270 :
271 : /* readonly attribute DOMString name; */
272 : NS_IMETHODIMP nsDOMFile::GetName(nsAString & aName)
273 : {
274 : return NS_ERROR_NOT_IMPLEMENTED;
275 : }
276 :
277 : /* readonly attribute DOMString mozFullPath; */
278 : NS_IMETHODIMP nsDOMFile::GetMozFullPath(nsAString & aMozFullPath)
279 : {
280 : return NS_ERROR_NOT_IMPLEMENTED;
281 : }
282 :
283 : /* [noscript] readonly attribute DOMString mozFullPathInternal; */
284 : NS_IMETHODIMP nsDOMFile::GetMozFullPathInternal(nsAString & aMozFullPathInternal)
285 : {
286 : return NS_ERROR_NOT_IMPLEMENTED;
287 : }
288 :
289 : /* End of implementation class template. */
290 : #endif
291 :
292 :
293 : /* starting interface: nsIDOMMozBlobBuilder */
294 : #define NS_IDOMMOZBLOBBUILDER_IID_STR "57195950-edd9-496b-9b45-e4893a9ffca9"
295 :
296 : #define NS_IDOMMOZBLOBBUILDER_IID \
297 : {0x57195950, 0xedd9, 0x496b, \
298 : { 0x9b, 0x45, 0xe4, 0x89, 0x3a, 0x9f, 0xfc, 0xa9 }}
299 :
300 0 : class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMMozBlobBuilder : public nsISupports {
301 : public:
302 :
303 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMMOZBLOBBUILDER_IID)
304 :
305 : /* nsIDOMBlob getBlob ([optional] in DOMString contentType); */
306 : NS_SCRIPTABLE NS_IMETHOD GetBlob(const nsAString & contentType, nsIDOMBlob * *_retval NS_OUTPARAM) = 0;
307 :
308 : /* nsIDOMFile getFile (in DOMString name, [optional] in DOMString contentType); */
309 : NS_SCRIPTABLE NS_IMETHOD GetFile(const nsAString & name, const nsAString & contentType, nsIDOMFile * *_retval NS_OUTPARAM) = 0;
310 :
311 : /* [implicit_jscontext] void append (in jsval data, [optional] in DOMString endings); */
312 : NS_SCRIPTABLE NS_IMETHOD Append(const JS::Value & data, const nsAString & endings, JSContext* cx) = 0;
313 :
314 : };
315 :
316 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMMozBlobBuilder, NS_IDOMMOZBLOBBUILDER_IID)
317 :
318 : /* Use this macro when declaring classes that implement this interface. */
319 : #define NS_DECL_NSIDOMMOZBLOBBUILDER \
320 : NS_SCRIPTABLE NS_IMETHOD GetBlob(const nsAString & contentType, nsIDOMBlob * *_retval NS_OUTPARAM); \
321 : NS_SCRIPTABLE NS_IMETHOD GetFile(const nsAString & name, const nsAString & contentType, nsIDOMFile * *_retval NS_OUTPARAM); \
322 : NS_SCRIPTABLE NS_IMETHOD Append(const JS::Value & data, const nsAString & endings, JSContext* cx);
323 :
324 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
325 : #define NS_FORWARD_NSIDOMMOZBLOBBUILDER(_to) \
326 : NS_SCRIPTABLE NS_IMETHOD GetBlob(const nsAString & contentType, nsIDOMBlob * *_retval NS_OUTPARAM) { return _to GetBlob(contentType, _retval); } \
327 : NS_SCRIPTABLE NS_IMETHOD GetFile(const nsAString & name, const nsAString & contentType, nsIDOMFile * *_retval NS_OUTPARAM) { return _to GetFile(name, contentType, _retval); } \
328 : NS_SCRIPTABLE NS_IMETHOD Append(const JS::Value & data, const nsAString & endings, JSContext* cx) { return _to Append(data, endings, cx); }
329 :
330 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
331 : #define NS_FORWARD_SAFE_NSIDOMMOZBLOBBUILDER(_to) \
332 : NS_SCRIPTABLE NS_IMETHOD GetBlob(const nsAString & contentType, nsIDOMBlob * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBlob(contentType, _retval); } \
333 : NS_SCRIPTABLE NS_IMETHOD GetFile(const nsAString & name, const nsAString & contentType, nsIDOMFile * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFile(name, contentType, _retval); } \
334 : NS_SCRIPTABLE NS_IMETHOD Append(const JS::Value & data, const nsAString & endings, JSContext* cx) { return !_to ? NS_ERROR_NULL_POINTER : _to->Append(data, endings, cx); }
335 :
336 : #if 0
337 : /* Use the code below as a template for the implementation class for this interface. */
338 :
339 : /* Header file */
340 : class nsDOMMozBlobBuilder : public nsIDOMMozBlobBuilder
341 : {
342 : public:
343 : NS_DECL_ISUPPORTS
344 : NS_DECL_NSIDOMMOZBLOBBUILDER
345 :
346 : nsDOMMozBlobBuilder();
347 :
348 : private:
349 : ~nsDOMMozBlobBuilder();
350 :
351 : protected:
352 : /* additional members */
353 : };
354 :
355 : /* Implementation file */
356 : NS_IMPL_ISUPPORTS1(nsDOMMozBlobBuilder, nsIDOMMozBlobBuilder)
357 :
358 : nsDOMMozBlobBuilder::nsDOMMozBlobBuilder()
359 : {
360 : /* member initializers and constructor code */
361 : }
362 :
363 : nsDOMMozBlobBuilder::~nsDOMMozBlobBuilder()
364 : {
365 : /* destructor code */
366 : }
367 :
368 : /* nsIDOMBlob getBlob ([optional] in DOMString contentType); */
369 : NS_IMETHODIMP nsDOMMozBlobBuilder::GetBlob(const nsAString & contentType, nsIDOMBlob * *_retval NS_OUTPARAM)
370 : {
371 : return NS_ERROR_NOT_IMPLEMENTED;
372 : }
373 :
374 : /* nsIDOMFile getFile (in DOMString name, [optional] in DOMString contentType); */
375 : NS_IMETHODIMP nsDOMMozBlobBuilder::GetFile(const nsAString & name, const nsAString & contentType, nsIDOMFile * *_retval NS_OUTPARAM)
376 : {
377 : return NS_ERROR_NOT_IMPLEMENTED;
378 : }
379 :
380 : /* [implicit_jscontext] void append (in jsval data, [optional] in DOMString endings); */
381 : NS_IMETHODIMP nsDOMMozBlobBuilder::Append(const JS::Value & data, const nsAString & endings, JSContext* cx)
382 : {
383 : return NS_ERROR_NOT_IMPLEMENTED;
384 : }
385 :
386 : /* End of implementation class template. */
387 : #endif
388 :
389 :
390 : #endif /* __gen_nsIDOMFile_h__ */
|