2012-05-21 09:18:30 -07:00
|
|
|
/* 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"
|
2012-08-01 23:29:34 -07:00
|
|
|
#include "nsIDOMEventTarget.idl"
|
2012-05-21 09:18:30 -07:00
|
|
|
interface nsIDOMBlob;
|
|
|
|
interface nsIDOMDOMRequest;
|
2013-03-01 16:21:01 -08:00
|
|
|
interface nsIDOMDOMCursor;
|
2012-08-01 23:29:34 -07:00
|
|
|
interface nsIDOMDeviceStorageChangeEvent;
|
|
|
|
interface nsIDOMEventListener;
|
2012-09-28 22:30:52 -07:00
|
|
|
interface nsIFile;
|
2012-05-21 09:18:30 -07:00
|
|
|
|
2014-01-16 17:01:27 -08:00
|
|
|
%{C++
|
2014-04-14 12:04:24 -07:00
|
|
|
struct DeviceStorageFileDescriptor;
|
2014-01-16 17:01:27 -08:00
|
|
|
%}
|
|
|
|
[ptr] native DeviceStorageFdPtr(DeviceStorageFileDescriptor);
|
|
|
|
|
2014-08-13 15:38:29 -07:00
|
|
|
[uuid(25e4e387-1974-4f77-83b5-e6f3cf1beae8), builtinclass]
|
2012-08-01 23:29:34 -07:00
|
|
|
interface nsIDOMDeviceStorage : nsIDOMEventTarget
|
2012-05-21 09:18:30 -07:00
|
|
|
{
|
2012-08-30 20:45:16 -07:00
|
|
|
[implicit_jscontext] attribute jsval onchange;
|
2012-05-21 09:18:30 -07:00
|
|
|
nsIDOMDOMRequest add(in nsIDOMBlob aBlob);
|
|
|
|
nsIDOMDOMRequest addNamed(in nsIDOMBlob aBlob, in DOMString aName);
|
|
|
|
|
2013-05-31 23:54:40 -07:00
|
|
|
nsIDOMDOMRequest get([Null(Stringify)] in DOMString aName);
|
|
|
|
nsIDOMDOMRequest getEditable([Null(Stringify)] in DOMString aName);
|
|
|
|
nsIDOMDOMRequest delete([Null(Stringify)] in DOMString aName);
|
2012-05-21 09:18:30 -07:00
|
|
|
|
2013-01-25 11:05:24 -08:00
|
|
|
nsIDOMDOMRequest freeSpace();
|
|
|
|
nsIDOMDOMRequest usedSpace();
|
|
|
|
nsIDOMDOMRequest available();
|
2012-09-28 22:30:52 -07:00
|
|
|
|
2013-05-11 02:10:18 -07:00
|
|
|
// Note that the storageName is just a name (like sdcard), and doesn't
|
2013-04-02 12:52:21 -07:00
|
|
|
// include any path information.
|
2013-05-11 02:10:18 -07:00
|
|
|
readonly attribute DOMString storageName;
|
2013-04-02 12:52:21 -07:00
|
|
|
|
2013-06-03 08:35:02 -07:00
|
|
|
// Determines if this storage area is the one which will be used by default
|
|
|
|
// for storing new files.
|
|
|
|
readonly attribute bool default;
|
|
|
|
|
2014-01-16 17:01:27 -08:00
|
|
|
// Note: aFileDescriptor is reference counted, which is why we're using
|
|
|
|
// a pointer rather than a reference.
|
|
|
|
[noscript] nsIDOMDOMRequest createFileDescriptor(in DOMString aName,
|
|
|
|
in DeviceStorageFdPtr aFileDescriptor);
|
2012-05-21 09:18:30 -07:00
|
|
|
};
|