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]
pub fn coerce<T: nsIPushNotifierCoerce>(&self) -> &T
[src]
Cast this nsIPushNotifier
to one of its base interfaces.
impl nsIPushNotifier
[src]
pub unsafe fn NotifyPush(
&self,
scope: &nsACString,
principal: *const nsIPrincipal,
messageId: &nsAString
) -> nsresult
[src]
&self,
scope: &nsACString,
principal: *const nsIPrincipal,
messageId: &nsAString
) -> nsresult
/**
* 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);
pub unsafe fn NotifyPushWithData(
&self,
scope: &nsACString,
principal: *const nsIPrincipal,
messageId: &nsAString,
dataLen: uint32_t,
data: *mut uint8_t
) -> nsresult
[src]
&self,
scope: &nsACString,
principal: *const nsIPrincipal,
messageId: &nsAString,
dataLen: uint32_t,
data: *mut uint8_t
) -> nsresult
/**
* 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);
pub unsafe fn NotifySubscriptionChange(
&self,
scope: &nsACString,
principal: *const nsIPrincipal
) -> nsresult
[src]
&self,
scope: &nsACString,
principal: *const nsIPrincipal
) -> nsresult
/**
* 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);
pub unsafe fn NotifySubscriptionModified(
&self,
scope: &nsACString,
principal: *const nsIPrincipal
) -> nsresult
[src]
&self,
scope: &nsACString,
principal: *const nsIPrincipal
) -> nsresult
/**
* 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);
pub unsafe fn NotifyError(
&self,
scope: &nsACString,
principal: *const nsIPrincipal,
message: &nsAString,
flags: uint32_t
) -> nsresult
[src]
&self,
scope: &nsACString,
principal: *const nsIPrincipal,
message: &nsAString,
flags: uint32_t
) -> nsresult
void notifyError (in ACString scope, in nsIPrincipal principal, in DOMString message, in uint32_t flags);
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIPushNotifier
[src]
const IID: nsIID
IID: nsIID = nsID(2953706987, 5349, 16987, [173, 199, 181, 49, 68, 46, 50, 22])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[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]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIPushNotifier
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.