Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
5 */
7 // TODO Bug 957086 - The DataStoreImpl WebIDL will be removed once the
8 // DataStore API is fully rewritten in C++ (i.e. should be
9 // directly implemented by the DataStore WebIDL).
11 [HeaderFile="mozilla/dom/DataStore.h",
12 Func="mozilla::dom::DataStore::EnabledForScope",
13 JSImplementation="@mozilla.org/dom/datastore-impl;1"]
14 interface DataStoreImpl {
15 void setEventTarget(EventTarget eventTarget);
17 // Returns the label of the DataSource.
18 readonly attribute DOMString name;
20 // Returns the origin of the DataSource (e.g., 'facebook.com').
21 // This value is the manifest URL of the owner app.
22 readonly attribute DOMString owner;
24 // is readOnly a F(current_app, datastore) function? yes
25 readonly attribute boolean readOnly;
27 // Promise<any>
28 Promise get(DataStoreKey... id);
30 // Promise<void>
31 Promise put(any obj, DataStoreKey id, optional DOMString revisionId = "");
33 // Promise<DataStoreKey>
34 Promise add(any obj, optional DataStoreKey id,
35 optional DOMString revisionId = "");
37 // Promise<boolean>
38 Promise remove(DataStoreKey id, optional DOMString revisionId = "");
40 // Promise<void>
41 Promise clear(optional DOMString revisionId = "");
43 readonly attribute DOMString revisionId;
45 // Promise<unsigned long>
46 Promise getLength();
48 [NewObject]
49 DataStoreCursor sync(optional DOMString revisionId = "");
50 };
53 // TODO Bug 957086 - The DataStoreCursorImpl WebIDL will be removed once the
54 // DataStore API is fully rewritten in C++ (i.e. should be
55 // directly implemented by the DataStoreCursor WebIDL).
57 [HeaderFile="mozilla/dom/DataStore.h",
58 Func="mozilla::dom::DataStore::EnabledForScope",
59 JSImplementation="@mozilla.org/dom/datastore-cursor-impl;1"]
60 interface DataStoreCursorImpl {
61 // the DataStore
62 readonly attribute DataStore store;
64 // Promise<DataStoreTask>
65 Promise next();
67 void close();
68 };