Implemented by
[scriptable, uuid(7dc06ede-1098-4384-b95e-65525ab254c9)]
interface nsIOfflineCacheUpdate : nsISupports
Attributes
Access to the list of items in the update.
readonly attribute
unsigned long
count
The manifest for the offline application being updated.
readonly attribute
nsIURI
manifestURI
TRUE if the update is being used to add specific resources. FALSE if the complete cache update process is happening.
readonly attribute
boolean
partial
An nsIOfflineCacheUpdate is used to update an application's offline resources. It can be used to perform partial or complete updates. Each update object maintains a list of nsIDOMLoadStatus items for the resources it is updating. The list of these items will be available after the object is scheduled. 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
TRUE if the cache update completed successfully.
readonly attribute
boolean
succeeded
The domain being updated, and the domain that will own any URIs added with this update.
readonly attribute
ACString
updateDomain
Methods
Add a URI to the offline cache as part of the update.
@param aURI
The URI to add.
void
addDynamicURI(in nsIURI aURI)
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, in boolean aHoldWeak)
Initialize the update.
@param aPartialUpdate
TRUE if the update should just update the URIs given to it,
FALSE if all URLs for the owner domain should be added.
@param aManifestURI
The manifest URI to be checked, or for partial updates the
manifest that should own resources that are added.
@param aDocumentURI
The page that is requesting the update.
void
init(in boolean aPartialUpdate, in nsIURI aManifestURI, in nsIURI aDocumentURI)
nsIDOMLoadStatus
item(in unsigned long index)
Remove an observer from the update.
@param aObserver
the observer to remove.
void
removeObserver(in nsIOfflineCacheUpdateObserver aObserver)
Add the update to the offline update queue. An offline-cache-update-added event will be sent to the observer service.
void
schedule()
Compare to: