import "nsIOfflineCacheUpdate.idl";
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.
Public Member Functions | |
| void | init (in boolean aPartialUpdate, in nsIURI aManifestURI, in nsIURI aDocumentURI) |
| Initialize the update. | |
| void | addDynamicURI (in nsIURI aURI) |
| Add a URI to the offline cache as part of the update. | |
| void | schedule () |
| Add the update to the offline update queue. | |
| nsIDOMLoadStatus | item (in unsigned long index) |
| void | addObserver (in nsIOfflineCacheUpdateObserver aObserver, in boolean aHoldWeak) |
| Observe loads that are added to the update. | |
| void | removeObserver (in nsIOfflineCacheUpdateObserver aObserver) |
| Remove an observer from the update. | |
Public Attributes | |
| readonly attribute unsigned short | status |
| Fetch the status of the running update. | |
| readonly attribute boolean | partial |
| TRUE if the update is being used to add specific resources. | |
| readonly attribute ACString | updateDomain |
| The domain being updated, and the domain that will own any URIs added with this update. | |
| readonly attribute nsIURI | manifestURI |
| The manifest for the offline application being updated. | |
| readonly attribute boolean | succeeded |
| TRUE if the cache update completed successfully. | |
| readonly attribute unsigned long | count |
| Access to the list of items in the update. | |
| void nsIOfflineCacheUpdate::init | ( | in boolean | aPartialUpdate, | |
| in nsIURI | aManifestURI, | |||
| in nsIURI | aDocumentURI | |||
| ) |
| aPartialUpdate | TRUE if the update should just update the URIs given to it, FALSE if all URLs for the owner domain should be added. | |
| aManifestURI | The manifest URI to be checked, or for partial updates the manifest that should own resources that are added. | |
| aDocumentURI | The page that is requesting the update. |
| void nsIOfflineCacheUpdate::addDynamicURI | ( | in nsIURI | aURI | ) |
| aURI | The URI to add. |
| void nsIOfflineCacheUpdate::schedule | ( | ) |
An offline-cache-update-added event will be sent to the observer service.
| nsIDOMLoadStatus nsIOfflineCacheUpdate::item | ( | in unsigned long | index | ) |
| void nsIOfflineCacheUpdate::addObserver | ( | in nsIOfflineCacheUpdateObserver | aObserver, | |
| in boolean | aHoldWeak | |||
| ) |
| 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. |
| void nsIOfflineCacheUpdate::removeObserver | ( | in nsIOfflineCacheUpdateObserver | aObserver | ) |
| aObserver | the observer to remove. |
| readonly attribute unsigned short nsIOfflineCacheUpdate::status |
This will return a value defined in nsIDOMOfflineResourceList.
FALSE if the complete cache update process is happening.
| readonly attribute ACString nsIOfflineCacheUpdate::updateDomain |
| readonly attribute unsigned long nsIOfflineCacheUpdate::count |
1.5.6