Struct xpcom::interfaces::nsIPushNotifier [] [src]

#[repr(C)]
pub struct nsIPushNotifier { /* fields omitted */ }

interface nsIPushNotifier : nsISupports

/**
 * Fires XPCOM observer notifications and service worker events for
 * messages sent to push subscriptions.
 */

Methods

impl nsIPushNotifier
[src]

[src]

Cast this nsIPushNotifier to one of its base interfaces.

impl nsIPushNotifier
[src]

[src]

/**
   * Fires a `push-message` observer notification, and sends a `push` event to
   * the service worker registered for the |scope|. |messageId| is an opaque ID
   * used to report errors if the worker fails to handle the message.
   */

void notifyPush (in ACString scope, in nsIPrincipal principal, in DOMString messageId);

[src]

/**
   * Same as `notifyPush`, except the subject of the observer notification
   * receives an `nsIPushMessage` instance containing the |data|. Service
   * workers can access the |data| via the `PushMessageData` WebIDL interface.
   */

void notifyPushWithData (in ACString scope, in nsIPrincipal principal, in DOMString messageId, [optional] in uint32_t dataLen, [array, size_is (dataLen)] in uint8_t data);

[src]

/**
   * Fires a `push-subscription-change` observer notification, and sends a
   * `pushsubscriptionchange` event to the service worker registered for the
   * |scope|.
   */

void notifySubscriptionChange (in ACString scope, in nsIPrincipal principal);

[src]

/**
   * Fires a `push-subscription-modified` observer notification. Chrome code
   * can listen for this notification to see when a subscription is added,
   * updated, removed, or expired for any |scope|.
   *
   * This is useful for Dev Tools and debugging add-ons that passively observe
   * when subscriptions are created or dropped. Other callers should listen for
   * `push-subscription-change` and resubscribe instead.
   */

void notifySubscriptionModified (in ACString scope, in nsIPrincipal principal);

[src]

void notifyError (in ACString scope, in nsIPrincipal principal, in DOMString message, in uint32_t flags);

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsIPushNotifier
[src]

IID: nsIID = nsID(2953706987, 5349, 16987, [173, 199, 181, 49, 68, 46, 50, 22])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for nsIPushNotifier
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIPushNotifier
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.