1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include
"nsISupports.idl"
9 interface nsIDOMEventListener
;
10 interface nsIDOMFileHandle
;
12 dictionary DOMFileMetadataParameters
18 [scriptable
, builtinclass
, uuid(a09cdc35
-6b1e
-42ce
-95bb
-f8f10a354202
)]
19 interface nsIDOMLockedFile
: nsISupports
21 readonly attribute nsIDOMFileHandle fileHandle
;
23 // "readonly" or "readwrite"
24 readonly attribute DOMString mode
;
26 readonly attribute
boolean active
;
29 attribute jsval location
;
32 nsISupports
/* FileRequest */
33 getMetadata
(/* DOMFileMetadataParameters */
34 [optional /* all */] in jsval parameters
);
37 nsISupports
/* FileRequest */
38 readAsArrayBuffer
(in unsigned long long size
);
40 nsISupports
/* FileRequest */
41 readAsText
(in unsigned long long size
,
42 [optional] in DOMString encoding
);
45 nsISupports
/* FileRequest */
46 write
(in jsval value
);
49 nsISupports
/* FileRequest */
50 append
(in jsval value
);
53 nsISupports
/* FileRequest */
54 truncate
([optional] in unsigned long long size
);
56 nsISupports
/* FileRequest */
62 [implicit_jscontext
] attribute jsval oncomplete
;
64 [implicit_jscontext
] attribute jsval onabort
;
66 [implicit_jscontext
] attribute jsval onerror
;