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.
Initialize the update.
aManifestURI | The manifest URI to be checked. |
aDocumentURI | The page that is requesting the update. |
Initialize the update for partial processing.
aManifestURI | The manifest URI of the related cache. |
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. |
aDocumentURI | The page that is requesting the update. May be null when this information is unknown. |
Initialize the update to only check whether there is an update
to the manifest available (if it has actually changed on the server).
aManifestURI | The manifest URI of the related cache. |
aAppID | Local ID of an app (optional) to check the cache update for. |
aInBrowser | Whether to check for a cache populated from browser element. |
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). |
Add a dynamic URI to the offline cache as part of the update.
aURI | The URI to add. |
Add the update to the offline update queue. An offline-cache-update-added
event will be sent to the observer service.
Observe loads that are added to the update.
aObserver | object that notifications will be sent to. |
aHoldWeak | TRUE if you want the update to hold a weak reference to the observer, FALSE for a strong reference. |
Remove an observer from the update.
aObserver | the observer to remove. |
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.
Fetch the status of the running update. This will return a value
defined in nsIDOMOfflineResourceList.
TRUE if the update is being used to add specific resources.
FALSE if the complete cache update process is happening.
TRUE if this is an upgrade attempt, FALSE if it is a new cache
attempt.
The domain being updated, and the domain that will own any URIs added
with this update.
The manifest for the offline application being updated.
TRUE if the cache update completed successfully.
Return the number of bytes downloaded so far