mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 822712 - SimplePush - Interface. r=dougt, sr=sicking
This commit is contained in:
parent
e595af5617
commit
872d72080e
9
dom/interfaces/push/moz.build
Normal file
9
dom/interfaces/push/moz.build
Normal file
@ -0,0 +1,9 @@
|
||||
# vim: set filetype=python:
|
||||
# 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/.
|
||||
|
||||
MODULE = 'dom'
|
||||
XPIDL_MODULE = 'dom_push'
|
||||
XPIDL_SOURCES += ['nsIDOMPushManager.idl']
|
||||
XPIDL_FLAGS += ['-I$(topsrcdir)/dom/interfaces/base']
|
45
dom/interfaces/push/nsIDOMPushManager.idl
Normal file
45
dom/interfaces/push/nsIDOMPushManager.idl
Normal file
@ -0,0 +1,45 @@
|
||||
/* 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"
|
||||
interface nsIDOMDOMRequest;
|
||||
|
||||
/**
|
||||
* Client API for SimplePush.
|
||||
*
|
||||
* The SimplePush API allows web applications to use push notifications and be
|
||||
* woken up when something of interest has changed. This frees web applications
|
||||
* from implementing polling, giving better responsiveness and conserving the
|
||||
* device's battery life.
|
||||
*/
|
||||
[scriptable,uuid(c7ad4f42-faae-4e8b-9879-780a72349945)]
|
||||
interface nsIDOMPushManager : nsISupports
|
||||
{
|
||||
/**
|
||||
* Register for a new push endpoint.
|
||||
*
|
||||
* On success, the DOMRequest's result field will be a string URL. This URL
|
||||
* is the endpoint that can be contacted to wake up the application.
|
||||
*/
|
||||
nsIDOMDOMRequest register();
|
||||
|
||||
/**
|
||||
* Unregister a push endpoint.
|
||||
*
|
||||
* On success, the DOMRequest's result field will be the endpoint that was
|
||||
* passed in.
|
||||
*
|
||||
* Stops watching for changes to this URL.
|
||||
*/
|
||||
nsIDOMDOMRequest unregister(in ACString endpoint);
|
||||
|
||||
/**
|
||||
* Get a list of active registrations for this web app.
|
||||
*
|
||||
* On success, the DOMRequest's result field is an array of endpoints.
|
||||
* For example:
|
||||
* ["https://example.com/notify/1", "https://example.com/notify/2"]
|
||||
*/
|
||||
nsIDOMDOMRequest registrations();
|
||||
};
|
Loading…
Reference in New Issue
Block a user