Files
palemoon27/dom/webidl/DeviceStorage.webidl
roytam1 c554d461ab import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1173051 - Minor optimizations for device storage enumerate on parent and child. r=dhylands (31037e471a)
- Bug 1020179 followup: Mark DeviceStorageRequest::GetRequester as override (and use NS_IMETHOD instead of NS_IMETHODIMP inside of class definition). rs=ehsan (b2a0808c21)
- Bug 1171170 - Consolidate/cache access to permissions, cycle collected objects in device storage. r=dhylands (8eddc30aed)
- Bug 1204618 - Add a field to the DeviceStorage object holding the low-disk-space status. r=dhylands, r=bzbarsky (52257b821f)
- Bug 1128505 - Preload Webapps.js for faster mozApps instantiation. r=fabrice (d540be89af)
- Bug 1166207 - Load preload.js in the Nuwa process. r=khuey (1310da32df)
- MOZ_FINAL -> final (887f351669)
- Bug 1200922: Add the ability to shut down a thread asynchronously. r=froydnj (b09ea156b6)
- Bug 1195767 - part 1 - remove nsCOMPtr temporary from nsEventQueue::PtEvent; r=gerald (fed354ffb7)
- Bug 1195767 - part 2 - create an nsEventQueueBase templated over the monitor type; r=gerald (ede20ac6f4)
- Bug 1202497 - part 1 - switch nsEventQueue to use a non-reentrant Monitor; r=gerald (cd043d1267)
- Bug 1195767 - part 3 - modify nsThreadPool to use a non-reentrant monitor; r=gerald (52eec3d125)
- Bug 1202497 - part 2 - remove ReentrantMonitor specializations for nsEventQueueBase; r=gerald (ceb1a9e63e)
- Bug 1202497 - part 3 - remove nsThread::GetEvent; r=gerald (ef9a5924fe)
- Bug 1202828 - use nsEventQueue::HasPendingEvent in nsThread.cpp; r=mccr8 nsEventQueue's HasPending event is defined to simply: (2e7a6ebcd2)
- Bug 1202497 - part 4 - lock around call to nsChainedEventQueue::HasPendingEvent; r=gerald (bc69bb30db)
- Bug 1202497 - part 5 - make the locking requirements of nsChainedEventQueue explicit; r=gerald (fbd73f2b0c)
- Bug 1195767 - part 4 - remove nsEventQueue::GetReentrantMonitor; r=gerald (1dfa6b186a)
- Bug 1195767 - part 5 - use signaling instead of broadcast when work items are placed in nsEventQueue; r=gerald (1f01f6198a)
- Bug 1202497 - part 6 - make the locking requirements of nsEventQueue explicit; r=gerald (7aaf4eb9cd)
- Bug 1202497 - part 7 - make nsEventQueue use external locking; r=gerald (2b31ff22f0)
- Bug 1202497 - follow-up - fix static analysis bustage; r=me (b7997e75f5)
- Bug 1197672 - s/_sendPromise/createPromiseWithId/ in mozInputMethod.addInput(). r=kchen (fb8e91e67e)
- Bug 1132349 - Test for focus removal after pagehide/submit/beforeload. r=janjongboom (a9adc87bb5)
- Bug 1137557 - Part 3: Allow content to pass a dict representing the property of the keyboard event to send. r=masayuki, sr=smaug (4e27b2bfc9)
- Bug 895274 part.18 Rename NS_PLUGIN_ACTIVATE to ePluginActivate r=smaug (6ad79fee12)
- Bug 1167069 - Watch out for deletion of current frame. r=jmathies (2868b2689d)
- Bug 895274 part.19 Rename NS_PLUGIN_FOCUS to ePluginFocus r=smaug (792d1d41d8)
- Bug 895274 part.20 Rename NS_OFFLINE to eOffline r=smaug (6eab162432)
- Bug 895274 part.21 Rename NS_ONLINE to eOnline r=smaug (91fb9aea87)
- Bug 895274 part.22 Get rid of NS_MOZ_USER_* since nobody is using them r=smaug (a46848bfc5)
- Bug 895274 part.23 Rename NS_LANGUAGECHANGE to eLanguageChange r=smaug (11ee7a6511)
- Bug 895274 part.24 Rename NS_MOUSE_MESSAGE_START to eMouseEventFirst r=smaug (52168d3374)
2022-04-18 11:22:17 +08:00

96 lines
3.1 KiB
Plaintext

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */
dictionary DeviceStorageEnumerationParameters {
Date since;
};
[Pref="device.storage.enabled"]
interface DeviceStorage : EventTarget {
attribute EventHandler onchange;
[Throws]
DOMRequest? add(Blob? aBlob);
[Throws]
DOMRequest? addNamed(Blob? aBlob, DOMString aName);
/**
* Append data to a given file.
* If the file doesn't exist, a "NotFoundError" event will be dispatched.
* In the same time, it is a request.onerror case.
* If the file exists, it will be opened with the following permission:
* "PR_WRONLY|PR_CREATE_FILE|PR_APPEND".
* The function will return null when blob file is null and other unexpected situations.
* @parameter aBlob: A Blob object representing the data to append
* @parameter aName: A string representing the full name (path + file name) of the file
* to append data to.
*/
[Throws]
DOMRequest? appendNamed(Blob? aBlob, DOMString aName);
[Throws]
DOMRequest get(DOMString aName);
[Throws]
DOMRequest getEditable(DOMString aName);
[Throws]
DOMRequest delete(DOMString aName);
[Throws]
DOMCursor enumerate(optional DeviceStorageEnumerationParameters options);
[Throws]
DOMCursor enumerate(DOMString path,
optional DeviceStorageEnumerationParameters options);
[Throws]
DOMCursor enumerateEditable(optional DeviceStorageEnumerationParameters options);
[Throws]
DOMCursor enumerateEditable(DOMString path,
optional DeviceStorageEnumerationParameters options);
[Throws]
DOMRequest freeSpace();
[Throws]
DOMRequest usedSpace();
[Throws]
DOMRequest available();
[Throws]
DOMRequest storageStatus();
[Throws]
DOMRequest format();
[Throws]
DOMRequest mount();
[Throws]
DOMRequest unmount();
// Note that the storageName is just a name (like sdcard), and doesn't
// include any path information.
readonly attribute DOMString storageName;
// Indicates if the storage area denoted by storageName is capable of
// being mounted and unmounted.
readonly attribute boolean canBeMounted;
// Indicates if the storage area denoted by storageName is capable of
// being shared and unshared.
readonly attribute boolean canBeShared;
// Indicates if the storage area denoted by storageName is capable of
// being formatted.
readonly attribute boolean canBeFormatted;
// Determines if this storage area is the one which will be used by default
// for storing new files.
readonly attribute boolean default;
// Indicates if the storage area denoted by storageName is removable
readonly attribute boolean isRemovable;
// True if the storage area is close to being full
readonly attribute boolean lowDiskSpace;
[NewObject]
// XXXbz what type does this really return?
Promise<any> getRoot();
};