Bug 891986 - Keep the source ArrayBuffer to a decodeAudioData call alive until the...
[gecko.git] / dom / file / nsIDOMLockedFile.idl
blob6fda91de192f464e4fc8ec19825a89a42a671512
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
14 boolean size;
15 boolean lastModified;
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;
28 [implicit_jscontext]
29 attribute jsval location;
31 [implicit_jscontext]
32 nsISupports /* FileRequest */
33 getMetadata(/* DOMFileMetadataParameters */
34 [optional /* all */] in jsval parameters);
36 [implicit_jscontext]
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);
44 [implicit_jscontext]
45 nsISupports /* FileRequest */
46 write(in jsval value);
48 [implicit_jscontext]
49 nsISupports /* FileRequest */
50 append(in jsval value);
52 [optional_argc]
53 nsISupports /* FileRequest */
54 truncate([optional] in unsigned long long size);
56 nsISupports /* FileRequest */
57 flush();
59 void
60 abort();
62 [implicit_jscontext] attribute jsval oncomplete;
64 [implicit_jscontext] attribute jsval onabort;
66 [implicit_jscontext] attribute jsval onerror;