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]

[src]

Cast this nsIUpdateTimerManager to one of its base interfaces.

impl nsIUpdateTimerManager
[src]

[src]

/**
   * 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);

[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>

[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 nsIUpdateTimerManager
[src]

IID: nsIID = nsID(124111148, 24901, 16979, [157, 180, 89, 77, 128, 35, 8, 126])

[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]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIUpdateTimerManager
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.