dom/interfaces/devicestorage/nsIDOMDeviceStorage.idl

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 #include "domstubs.idl"
     6 #include "nsIDOMEventTarget.idl"
     7 interface nsIDOMBlob;
     8 interface nsIDOMDOMRequest;
     9 interface nsIDOMDOMCursor;
    10 interface nsIDOMDeviceStorageChangeEvent;
    11 interface nsIDOMEventListener;
    12 interface nsIFile;
    14 %{C++
    15 struct DeviceStorageFileDescriptor;
    16 %}
    17 [ptr] native DeviceStorageFdPtr(DeviceStorageFileDescriptor);
    19 [scriptable, uuid(8b724547-3c78-4244-969a-f00a1f4ae0c3), builtinclass]
    20 interface nsIDOMDeviceStorage : nsIDOMEventTarget
    21 {
    22     [implicit_jscontext] attribute jsval onchange;
    23     nsIDOMDOMRequest add(in nsIDOMBlob aBlob);
    24     nsIDOMDOMRequest addNamed(in nsIDOMBlob aBlob, in DOMString aName);
    26     nsIDOMDOMRequest get([Null(Stringify)] in DOMString aName);
    27     nsIDOMDOMRequest getEditable([Null(Stringify)] in DOMString aName);
    28     nsIDOMDOMRequest delete([Null(Stringify)] in DOMString aName);
    30     nsIDOMDOMRequest freeSpace();
    31     nsIDOMDOMRequest usedSpace();
    32     nsIDOMDOMRequest available();
    34     // Note that the storageName is just a name (like sdcard), and doesn't
    35     // include any path information.
    36     readonly attribute DOMString storageName;
    38     // Determines if this storage area is the one which will be used by default
    39     // for storing new files.
    40     readonly attribute bool default;
    42     // Note: aFileDescriptor is reference counted, which is why we're using
    43     //       a pointer rather than a reference.
    44     [noscript] nsIDOMDOMRequest createFileDescriptor(in DOMString aName,
    45                                                      in DeviceStorageFdPtr aFileDescriptor);
    46 };

mercurial