Struct xpcom::interfaces::nsIUpdateTimerManager
[−]
[src]
#[repr(C)]pub struct nsIUpdateTimerManager { /* fields omitted */ }
interface nsIUpdateTimerManager : nsISupports
/**
* An interface describing a global application service that allows long
* duration (e.g. 1-7 or more days, weeks or months) timers to be registered
* and then fired.
*/
Methods
impl nsIUpdateTimerManager
[src]
pub fn coerce<T: nsIUpdateTimerManagerCoerce>(&self) -> &T
[src]
Cast this nsIUpdateTimerManager
to one of its base interfaces.
impl nsIUpdateTimerManager
[src]
pub unsafe fn RegisterTimer(
&self,
id: &nsAString,
callback: *const nsITimerCallback,
interval: uint32_t
) -> nsresult
[src]
&self,
id: &nsAString,
callback: *const nsITimerCallback,
interval: uint32_t
) -> nsresult
/**
* Register an interval with the timer manager. The timer manager
* periodically checks to see if the interval has expired and if it has
* calls the specified callback. This is persistent across application
* restarts and can handle intervals of long durations.
* @param id
* An id that identifies the interval, used for persistence
* @param callback
* A nsITimerCallback object that is notified when the interval
* expires
* @param interval
* The length of time, in seconds, of the interval
*
* Note: to avoid having to instantiate a component to call registerTimer
* the component can intead register an update-timer category with comma
* separated values as a single string representing the timer as follows.
*
* _xpcom_categories: [{ category: "update-timer",
* value: "contractID," +
* "method," +
* "id," +
* "preference," +
* "interval" }],
* the values are as follows
* contractID : the contract ID for the component.
* method : the method used to instantiate the interface. This should be
* either getService or createInstance depending on your
* component.
* id : the id that identifies the interval, used for persistence.
* preference : the preference to for timer interval. This value can be
* optional by specifying an empty string for the value.
* interval : the default interval in seconds for the timer.
*/
void registerTimer (in AString id, in nsITimerCallback callback, in unsigned long interval);
pub unsafe fn UnregisterTimer(&self, id: &nsAString) -> nsresult
[src]
/**
* Unregister an existing interval from the timer manager.
*
* @param id
* An id that identifies the interval.
*/
void unregisterTimer (in AString id);
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 nsIUpdateTimerManager
[src]
const IID: nsIID
IID: nsIID = nsID(124111148, 24901, 16979, [157, 180, 89, 77, 128, 35, 8, 126])
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 nsIUpdateTimerManager
[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 nsIUpdateTimerManager
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.