michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "domstubs.idl" michael@0: #include "nsIDOMEventTarget.idl" michael@0: interface nsIDOMBlob; michael@0: interface nsIDOMDOMRequest; michael@0: interface nsIDOMDOMCursor; michael@0: interface nsIDOMDeviceStorageChangeEvent; michael@0: interface nsIDOMEventListener; michael@0: interface nsIFile; michael@0: michael@0: %{C++ michael@0: struct DeviceStorageFileDescriptor; michael@0: %} michael@0: [ptr] native DeviceStorageFdPtr(DeviceStorageFileDescriptor); michael@0: michael@0: [scriptable, uuid(8b724547-3c78-4244-969a-f00a1f4ae0c3), builtinclass] michael@0: interface nsIDOMDeviceStorage : nsIDOMEventTarget michael@0: { michael@0: [implicit_jscontext] attribute jsval onchange; michael@0: nsIDOMDOMRequest add(in nsIDOMBlob aBlob); michael@0: nsIDOMDOMRequest addNamed(in nsIDOMBlob aBlob, in DOMString aName); michael@0: michael@0: nsIDOMDOMRequest get([Null(Stringify)] in DOMString aName); michael@0: nsIDOMDOMRequest getEditable([Null(Stringify)] in DOMString aName); michael@0: nsIDOMDOMRequest delete([Null(Stringify)] in DOMString aName); michael@0: michael@0: nsIDOMDOMRequest freeSpace(); michael@0: nsIDOMDOMRequest usedSpace(); michael@0: nsIDOMDOMRequest available(); michael@0: michael@0: // Note that the storageName is just a name (like sdcard), and doesn't michael@0: // include any path information. michael@0: readonly attribute DOMString storageName; michael@0: michael@0: // Determines if this storage area is the one which will be used by default michael@0: // for storing new files. michael@0: readonly attribute bool default; michael@0: michael@0: // Note: aFileDescriptor is reference counted, which is why we're using michael@0: // a pointer rather than a reference. michael@0: [noscript] nsIDOMDOMRequest createFileDescriptor(in DOMString aName, michael@0: in DeviceStorageFdPtr aFileDescriptor); michael@0: };