Struct xpcom::interfaces::nsIAlertsService
[−]
[src]
#[repr(C)]pub struct nsIAlertsService { /* fields omitted */ }
interface nsIAlertsService : nsISupports
Methods
impl nsIAlertsService
[src]
pub fn coerce<T: nsIAlertsServiceCoerce>(&self) -> &T
[src]
Cast this nsIAlertsService
to one of its base interfaces.
impl nsIAlertsService
[src]
pub unsafe fn ShowPersistentNotification(
&self,
aPersistentData: &nsAString,
aAlert: *const nsIAlertNotification,
aAlertListener: *const nsIObserver
) -> nsresult
[src]
&self,
aPersistentData: &nsAString,
aAlert: *const nsIAlertNotification,
aAlertListener: *const nsIObserver
) -> nsresult
void showPersistentNotification (in AString aPersistentData, in nsIAlertNotification aAlert, [optional] in nsIObserver aAlertListener);
pub unsafe fn ShowAlert(
&self,
aAlert: *const nsIAlertNotification,
aAlertListener: *const nsIObserver
) -> nsresult
[src]
&self,
aAlert: *const nsIAlertNotification,
aAlertListener: *const nsIObserver
) -> nsresult
void showAlert (in nsIAlertNotification aAlert, [optional] in nsIObserver aAlertListener);
pub unsafe fn ShowAlertNotification(
&self,
aImageURL: &nsAString,
aTitle: &nsAString,
aText: &nsAString,
aTextClickable: bool,
aCookie: &nsAString,
aAlertListener: *const nsIObserver,
aName: &nsAString,
aDir: &nsAString,
aLang: &nsAString,
aData: &nsAString,
aPrincipal: *const nsIPrincipal,
aInPrivateBrowsing: bool,
aRequireInteraction: bool
) -> nsresult
[src]
&self,
aImageURL: &nsAString,
aTitle: &nsAString,
aText: &nsAString,
aTextClickable: bool,
aCookie: &nsAString,
aAlertListener: *const nsIObserver,
aName: &nsAString,
aDir: &nsAString,
aLang: &nsAString,
aData: &nsAString,
aPrincipal: *const nsIPrincipal,
aInPrivateBrowsing: bool,
aRequireInteraction: bool
) -> nsresult
/**
* Initializes and shows an |nsIAlertNotification| with the given parameters.
*
* @param aAlertListener Used for callbacks. May be null if the caller
* doesn't care about callbacks.
* @see nsIAlertNotification for descriptions of all other parameters.
* @throws NS_ERROR_NOT_AVAILABLE If the notification cannot be displayed.
*
* The following arguments will be passed to the alertListener's observe()
* method:
* subject - null
* topic - "alertfinished" when the alert goes away
* "alertdisablecallback" when alerts should be disabled for the principal
* "alertsettingscallback" when alert settings should be opened
* "alertclickcallback" when the text is clicked
* "alertshow" when the alert is shown
* data - the value of the cookie parameter passed to showAlertNotification.
*
* @note Depending on current circumstances (if the user's in a fullscreen
* application, for instance), the alert might not be displayed at all.
* In that case, if an alert listener is passed in it will receive the
* "alertfinished" notification immediately.
*/
void showAlertNotification (in AString aImageURL, in AString aTitle, in AString aText, [optional] in boolean aTextClickable, [optional] in AString aCookie, [optional] in nsIObserver aAlertListener, [optional] in AString aName, [optional] in AString aDir, [optional] in AString aLang, [optional] in AString aData, [optional] in nsIPrincipal aPrincipal, [optional] in boolean aInPrivateBrowsing, [optional] in boolean aRequireInteraction);
pub unsafe fn CloseAlert(
&self,
aName: &nsAString,
aPrincipal: *const nsIPrincipal
) -> nsresult
[src]
&self,
aName: &nsAString,
aPrincipal: *const nsIPrincipal
) -> nsresult
/**
* Close alerts created by the service.
*
* @param aName The name of the notification to close. If no name
* is provided then only a notification created with
* no name (if any) will be closed.
*/
void closeAlert ([optional] in AString aName, [optional] in nsIPrincipal aPrincipal);
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 nsIAlertsService
[src]
const IID: nsIID
IID: nsIID = nsID(4154680210, 55691, 16705, [167, 215, 78, 70, 100, 38, 132, 227])
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 nsIAlertsService
[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 nsIAlertsService
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.