mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 08:35:26 +00:00
f057e4abbb
Backed out changeset f60d4ad64070 (bug 1018320) Backed out changeset 1aac4d23ccd2 (bug 1018320) Backed out changeset 6063a2463d6c (bug 1018320) Backed out changeset 2df23c44ef44 (bug 1018320) Backed out changeset daf456b0a23a (bug 1018320) Backed out changeset 3e2e4d298e98 (bug 1018320) Backed out changeset 012373bb552b (bug 1018320)
55 lines
2.0 KiB
Plaintext
55 lines
2.0 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/.
|
|
*/
|
|
|
|
[AvailableIn=CertifiedApps,
|
|
Pref="dom.requestSync.enabled",
|
|
CheckPermissions="requestsync-manager",
|
|
JSImplementation="@mozilla.org/dom/request-sync-task-app;1"]
|
|
interface RequestSyncApp {
|
|
readonly attribute USVString origin;
|
|
readonly attribute USVString manifestURL;
|
|
readonly attribute boolean isInBrowserElement;
|
|
};
|
|
|
|
enum RequestSyncTaskPolicyState { "enabled", "disabled", "wifiOnly" };
|
|
|
|
// Like a normal task, but with info about the app.
|
|
[AvailableIn=CertifiedApps,
|
|
Pref="dom.requestSync.enabled",
|
|
CheckPermissions="requestsync-manager",
|
|
JSImplementation="@mozilla.org/dom/request-sync-task-manager;1"]
|
|
interface RequestSyncTask {
|
|
// This object describes the app that is owning the task.
|
|
readonly attribute RequestSyncApp app;
|
|
|
|
// Using setPolicy it's possible to owerwrite the state and the minInterval.
|
|
readonly attribute RequestSyncTaskPolicyState state;
|
|
readonly attribute long overwrittenMinInterval;
|
|
|
|
// These attributes are taken from the configuration of the task:
|
|
|
|
readonly attribute USVString task;
|
|
readonly attribute DOMTimeStamp lastSync;
|
|
readonly attribute USVString wakeUpPage;
|
|
readonly attribute boolean oneShot;
|
|
readonly attribute long minInterval;
|
|
readonly attribute boolean wifiOnly;
|
|
readonly attribute any data;
|
|
|
|
Promise<void> setPolicy(RequestSyncTaskPolicyState aState,
|
|
optional long ovewrittenMinInterval);
|
|
};
|
|
|
|
[NavigatorProperty="syncManager",
|
|
AvailableIn=CertifiedApps,
|
|
Pref="dom.requestSync.enabled",
|
|
CheckPermissions="requestsync-manager",
|
|
JSImplementation="@mozilla.org/dom/request-sync-manager;1"]
|
|
// This interface will be used only by the B2G SystemApp
|
|
interface RequestSyncManager {
|
|
Promise<sequence<RequestSyncTask>> registrations();
|
|
};
|