diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /dom/interfaces/push/nsIPushErrorReporter.idl | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/interfaces/push/nsIPushErrorReporter.idl')
-rw-r--r-- | dom/interfaces/push/nsIPushErrorReporter.idl | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/dom/interfaces/push/nsIPushErrorReporter.idl b/dom/interfaces/push/nsIPushErrorReporter.idl new file mode 100644 index 000000000..d9cef82ea --- /dev/null +++ b/dom/interfaces/push/nsIPushErrorReporter.idl @@ -0,0 +1,45 @@ +/* -*- 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/. */ + +#include "nsISupports.idl" + +[scriptable, uuid(b58249f9-1a04-48cc-bc20-2c992d64c73e)] +interface nsIPushErrorReporter : nsISupports +{ + /** + * Ack types, reported when the Push service acknowledges an incoming message. + * + * Acks are sent before the message is dispatched to the service worker, + * since the server delays new messages until all outstanding ones have been + * acked. |reportDeliveryError| will be called if an error occurs in the + * worker's `push` event handler after acking the message. + */ + const uint16_t ACK_DELIVERED = 0; + const uint16_t ACK_DECRYPTION_ERROR = 1; + const uint16_t ACK_NOT_DELIVERED = 2; + + /** + * Unsubscribe reasons, reported when the service drops a subscription. + */ + const uint16_t UNSUBSCRIBE_MANUAL = 3; + const uint16_t UNSUBSCRIBE_QUOTA_EXCEEDED = 4; + const uint16_t UNSUBSCRIBE_PERMISSION_REVOKED = 5; + + /** + * Delivery error reasons, reported when a service worker fails to handle + * an incoming push message in its `push` event handler. + */ + const uint16_t DELIVERY_UNCAUGHT_EXCEPTION = 6; + const uint16_t DELIVERY_UNHANDLED_REJECTION = 7; + const uint16_t DELIVERY_INTERNAL_ERROR = 8; + + /** + * Reports a `push` event handler error to the Push service. |messageId| is + * an opaque string passed to `nsIPushNotifier.notifyPush{WithData}`. + * |reason| is a delivery error reason. + */ + void reportDeliveryError(in DOMString messageId, + [optional] in uint16_t reason); +}; |