Struct xpcom::interfaces::nsIOfflineCacheUpdate [] [src]

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

interface nsIOfflineCacheUpdate : nsISupports

Methods

impl nsIOfflineCacheUpdate
[src]

[src]

Cast this nsIOfflineCacheUpdate to one of its base interfaces.

impl nsIOfflineCacheUpdate
[src]

[src]

/**
 * An nsIOfflineCacheUpdate is used to update an application's offline
 * resources.
 *
 * It can be used to perform partial or complete updates.
 *
 * One update object will be updating at a time.  The active object will
 * load its items one by one, sending itemCompleted() to any registered
 * observers.
 */
/**
   * Fetch the status of the running update.  This will return a value
   * defined in nsIDOMOfflineResourceList.
   */

readonly attribute unsigned short status;

[src]

/**
   * TRUE if the update is being used to add specific resources.
   * FALSE if the complete cache update process is happening.
   */

readonly attribute boolean partial;

[src]

/**
   * TRUE if this is an upgrade attempt, FALSE if it is a new cache
   * attempt.
   */

readonly attribute boolean isUpgrade;

[src]

/**
   * The domain being updated, and the domain that will own any URIs added
   * with this update.
   */

readonly attribute ACString updateDomain;

[src]

/**
   * The manifest for the offline application being updated.
   */

readonly attribute nsIURI manifestURI;

[src]

/**
   * TRUE if the cache update completed successfully.
   */

readonly attribute boolean succeeded;

[src]

/**
   * Initialize the update.
   *
   * @param aManifestURI
   *        The manifest URI to be checked.
   * @param aDocumentURI
   *        The page that is requesting the update.
   * @param aLoadingPrincipal
   *        The principal of the page that is requesting the update.
   */

void init (in nsIURI aManifestURI, in nsIURI aDocumentURI, in nsIPrincipal aLoadingPrincipal, in nsIDOMDocument aDocument, [optional] in nsIFile aCustomProfileDir);

[src]

/**
   * Initialize the update for partial processing.
   *
   * @param aManifestURI
   *        The manifest URI of the related cache.
   * @param aClientID
   *        Client  ID of the cache to store resource to. This ClientID
   *        must be ID of cache in the cache group identified by
   *        the manifest URI passed in the first parameter.
   * @param aDocumentURI
   *        The page that is requesting the update. May be null
   *        when this information is unknown.
   */

void initPartial (in nsIURI aManifestURI, in ACString aClientID, in nsIURI aDocumentURI, in nsIPrincipal aPrincipal);

[src]

/**
   * Initialize the update to only check whether there is an update
   * to the manifest available (if it has actually changed on the server).
   *
   * @param aManifestURI
   *        The manifest URI of the related cache.
   * @param aObserver
   *        nsIObserver implementation that receives the result.
   *        When aTopic == "offline-cache-update-available" there is an update to
   *        to download. Update of the app cache will lead to a new version
   *        download.
   *        When aTopic == "offline-cache-update-unavailable" then there is no
   *        update available (the manifest has not changed on the server).
   */

void initForUpdateCheck (in nsIURI aManifestURI, in nsIPrincipal aLoadingPrincipal, in nsIObserver aObserver);

[src]

/**
   * Add a dynamic URI to the offline cache as part of the update.
   *
   * @param aURI
   *        The URI to add.
   */

void addDynamicURI (in nsIURI aURI);

[src]

/**
   * Add the update to the offline update queue.  An offline-cache-update-added
   * event will be sent to the observer service.
   */

void schedule ();

[src]

/**
   * Observe loads that are added to the update.
   *
   * @param aObserver
   *        object that notifications will be sent to.
   * @param aHoldWeak
   *        TRUE if you want the update to hold a weak reference to the
   *        observer, FALSE for a strong reference.
   */

void addObserver (in nsIOfflineCacheUpdateObserver aObserver, [optional] in boolean aHoldWeak);

[src]

/**
   * Remove an observer from the update.
   *
   * @param aObserver
   *        the observer to remove.
   */

void removeObserver (in nsIOfflineCacheUpdateObserver aObserver);

[src]

/**
   * Cancel the update when still in progress. This stops all running resource
   * downloads and discards the downloaded cache version. Throws when update
   * has already finished and made the new cache version active.
   */

void cancel ();

[src]

/**
   * Return the number of bytes downloaded so far
   */

readonly attribute uint64_t byteProgress;

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

IID: nsIID = nsID(1849566954, 17842, 19895, [158, 74, 147, 185, 101, 103, 146, 152])

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

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIOfflineCacheUpdate
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.