Struct xpcom::interfaces::nsIOfflineCacheUpdate
[−]
[src]
#[repr(C)]pub struct nsIOfflineCacheUpdate { /* fields omitted */ }
interface nsIOfflineCacheUpdate : nsISupports
Methods
impl nsIOfflineCacheUpdate
[src]
pub fn coerce<T: nsIOfflineCacheUpdateCoerce>(&self) -> &T
[src]
Cast this nsIOfflineCacheUpdate
to one of its base interfaces.
impl nsIOfflineCacheUpdate
[src]
pub unsafe fn GetStatus(&self, aStatus: *mut uint16_t) -> nsresult
[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;
pub unsafe fn GetPartial(&self, aPartial: *mut bool) -> nsresult
[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;
pub unsafe fn GetIsUpgrade(&self, aIsUpgrade: *mut bool) -> nsresult
[src]
/**
* TRUE if this is an upgrade attempt, FALSE if it is a new cache
* attempt.
*/
readonly attribute boolean isUpgrade;
pub unsafe fn GetUpdateDomain(&self, aUpdateDomain: &mut nsACString) -> nsresult
[src]
/**
* The domain being updated, and the domain that will own any URIs added
* with this update.
*/
readonly attribute ACString updateDomain;
pub unsafe fn GetManifestURI(
&self,
aManifestURI: *mut *const nsIURI
) -> nsresult
[src]
&self,
aManifestURI: *mut *const nsIURI
) -> nsresult
/**
* The manifest for the offline application being updated.
*/
readonly attribute nsIURI manifestURI;
pub unsafe fn GetSucceeded(&self, aSucceeded: *mut bool) -> nsresult
[src]
/**
* TRUE if the cache update completed successfully.
*/
readonly attribute boolean succeeded;
pub unsafe fn Init(
&self,
aManifestURI: *const nsIURI,
aDocumentURI: *const nsIURI,
aLoadingPrincipal: *const nsIPrincipal,
aDocument: *const nsIDOMDocument,
aCustomProfileDir: *const nsIFile
) -> nsresult
[src]
&self,
aManifestURI: *const nsIURI,
aDocumentURI: *const nsIURI,
aLoadingPrincipal: *const nsIPrincipal,
aDocument: *const nsIDOMDocument,
aCustomProfileDir: *const nsIFile
) -> nsresult
/**
* 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);
pub unsafe fn InitPartial(
&self,
aManifestURI: *const nsIURI,
aClientID: &nsACString,
aDocumentURI: *const nsIURI,
aPrincipal: *const nsIPrincipal
) -> nsresult
[src]
&self,
aManifestURI: *const nsIURI,
aClientID: &nsACString,
aDocumentURI: *const nsIURI,
aPrincipal: *const nsIPrincipal
) -> nsresult
/**
* 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);
pub unsafe fn InitForUpdateCheck(
&self,
aManifestURI: *const nsIURI,
aLoadingPrincipal: *const nsIPrincipal,
aObserver: *const nsIObserver
) -> nsresult
[src]
&self,
aManifestURI: *const nsIURI,
aLoadingPrincipal: *const nsIPrincipal,
aObserver: *const nsIObserver
) -> nsresult
/**
* 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);
pub unsafe fn AddDynamicURI(&self, aURI: *const nsIURI) -> nsresult
[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);
pub unsafe fn Schedule(&self) -> nsresult
[src]
/**
* Add the update to the offline update queue. An offline-cache-update-added
* event will be sent to the observer service.
*/
void schedule ();
pub unsafe fn AddObserver(
&self,
aObserver: *const nsIOfflineCacheUpdateObserver,
aHoldWeak: bool
) -> nsresult
[src]
&self,
aObserver: *const nsIOfflineCacheUpdateObserver,
aHoldWeak: bool
) -> nsresult
/**
* 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);
pub unsafe fn RemoveObserver(
&self,
aObserver: *const nsIOfflineCacheUpdateObserver
) -> nsresult
[src]
&self,
aObserver: *const nsIOfflineCacheUpdateObserver
) -> nsresult
/**
* Remove an observer from the update.
*
* @param aObserver
* the observer to remove.
*/
void removeObserver (in nsIOfflineCacheUpdateObserver aObserver);
pub unsafe fn Cancel(&self) -> nsresult
[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 ();
pub unsafe fn GetByteProgress(&self, aByteProgress: *mut uint64_t) -> nsresult
[src]
/**
* Return the number of bytes downloaded so far
*/
readonly attribute uint64_t byteProgress;
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIOfflineCacheUpdate
[src]
const IID: nsIID
IID: nsIID = nsID(1849566954, 17842, 19895, [158, 74, 147, 185, 101, 103, 146, 152])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[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]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIOfflineCacheUpdate
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.