gecko/dom/interfaces/devicestorage/nsIDOMDeviceStorage.idl

43 lines
1.6 KiB
Plaintext

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "domstubs.idl"
#include "nsIDOMEventTarget.idl"
interface nsIDOMBlob;
interface nsIDOMDOMRequest;
interface nsIDOMDOMCursor;
interface nsIDOMDeviceStorageChangeEvent;
interface nsIDOMEventListener;
interface nsIFile;
[scriptable, uuid(446b5221-e2ca-4ebe-873b-e1f06cfdafdf), builtinclass]
interface nsIDOMDeviceStorage : nsIDOMEventTarget
{
[implicit_jscontext] attribute jsval onchange;
nsIDOMDOMRequest add(in nsIDOMBlob aBlob);
nsIDOMDOMRequest addNamed(in nsIDOMBlob aBlob, in DOMString aName);
nsIDOMDOMRequest get([Null(Stringify)] in DOMString aName);
nsIDOMDOMRequest getEditable([Null(Stringify)] in DOMString aName);
nsIDOMDOMRequest delete([Null(Stringify)] in DOMString aName);
[optional_argc, implicit_jscontext]
nsIDOMDOMCursor enumerate([optional] in jsval aName, /* DeviceStorageEnumerationParameters */ [optional] in jsval options);
[optional_argc, implicit_jscontext]
nsIDOMDOMCursor enumerateEditable([optional] in jsval aName, /* DeviceStorageEnumerationParameters */ [optional] in jsval options);
nsIDOMDOMRequest freeSpace();
nsIDOMDOMRequest usedSpace();
nsIDOMDOMRequest available();
// Note that the storageName is just a name (like sdcard), and doesn't
// include any path information.
readonly attribute DOMString storageName;
[noscript] nsIFile getRootDirectoryForFile(in DOMString aName);
};