1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include
"nsISupports.idl"
20 [ptr] native FileInfo
(mozilla
::dom
::indexedDB
::FileInfo
);
21 [ptr] native FileManager
(mozilla
::dom
::indexedDB
::FileManager
);
23 interface nsIDOMFileError
;
24 interface nsIInputStream
;
26 interface nsIPrincipal
;
29 [scriptable
, builtinclass
, uuid(6ef56697
-7c9c
-41ac
-83df
-e01c079fb1d1
)]
30 interface nsIDOMBlob
: nsISupports
32 readonly attribute
unsigned long long size
;
33 readonly attribute DOMString type
;
35 [noscript
] readonly attribute nsIInputStream internalStream
;
37 [optional_argc
] nsIDOMBlob slice
([optional] in long long start
,
38 [optional] in long long end
,
39 [optional] in DOMString contentType
);
41 // Get internal id of stored file. Returns -1 if it is not a stored file.
42 // Intended only for testing. It can be called on any thread.
43 [notxpcom
] long long getFileId
();
45 // Called when the blob was successfully stored in a database or when
46 // the blob is initialized from a database. It can be called on any thread.
47 [notxpcom
] void addFileInfo
(in FileInfo aFileInfo
);
49 // Called before the blob is stored in a database to decide if it can be
50 // shared or needs to be copied. It can be called on any thread.
51 [notxpcom
] FileInfo getFileInfo
(in FileManager aFileManager
);
53 // Return true if this blob is a memory file.
54 [notxpcom
] bool isMemoryFile
();
57 [scriptable
, builtinclass
, uuid(4e7d1a8b
-e2d5
-4304-a753
-4affb731660c
)]
58 interface nsIDOMFile
: nsIDOMBlob
60 readonly attribute DOMString name
;
62 readonly attribute DOMString path
;
65 readonly attribute jsval lastModifiedDate
;
67 readonly attribute DOMString mozFullPath
;
69 // This performs no security checks!
70 [noscript
] readonly attribute DOMString mozFullPathInternal
;
72 [noscript
] readonly attribute uint64_t mozLastModifiedDate
;