Struct xpcom::interfaces::nsIApplicationCache
[−]
[src]
#[repr(C)]pub struct nsIApplicationCache { /* fields omitted */ }
interface nsIApplicationCache : nsISupports
/**
* Application caches store resources for offline use. Each
* application cache has a unique client ID for use with
* nsICacheService::openSession() to access the cache's entries.
*
* Each entry in the application cache can be marked with a set of
* types, as discussed in the WHAT-WG offline applications
* specification.
*
* All application caches with the same group ID belong to a cache
* group. Each group has one "active" cache that will service future
* loads. Inactive caches will be removed from the cache when they are
* no longer referenced.
*/
Methods
impl nsIApplicationCache
[src]
pub fn coerce<T: nsIApplicationCacheCoerce>(&self) -> &T
[src]
Cast this nsIApplicationCache
to one of its base interfaces.
impl nsIApplicationCache
[src]
pub const ITEM_MANIFEST: i64
ITEM_MANIFEST: i64 = 1
/**
* Entries in an application cache can be marked as one or more of
* the following types.
*/
pub const ITEM_EXPLICIT: i64
ITEM_EXPLICIT: i64 = 2
pub const ITEM_IMPLICIT: i64
ITEM_IMPLICIT: i64 = 4
pub const ITEM_DYNAMIC: i64
ITEM_DYNAMIC: i64 = 8
pub const ITEM_FOREIGN: i64
ITEM_FOREIGN: i64 = 16
pub const ITEM_FALLBACK: i64
ITEM_FALLBACK: i64 = 32
pub const ITEM_OPPORTUNISTIC: i64
ITEM_OPPORTUNISTIC: i64 = 64
pub unsafe fn InitAsHandle(
&self,
groupId: &nsACString,
clientId: &nsACString
) -> nsresult
[src]
&self,
groupId: &nsACString,
clientId: &nsACString
) -> nsresult
/**
* Init this application cache instance to just hold the group ID and
* the client ID to work just as a handle to the real cache. Used on
* content process to simplify the application cache code.
*/
void initAsHandle (in ACString groupId, in ACString clientId);
pub unsafe fn GetManifestURI(
&self,
aManifestURI: *mut *const nsIURI
) -> nsresult
[src]
&self,
aManifestURI: *mut *const nsIURI
) -> nsresult
/**
* URI of the manfiest specifying this application cache.
**/
readonly attribute nsIURI manifestURI;
pub unsafe fn GetGroupID(&self, aGroupID: &mut nsACString) -> nsresult
[src]
/**
* The group ID for this cache group. It is an internally generated string
* and cannot be used as manifest URL spec.
**/
readonly attribute ACString groupID;
pub unsafe fn GetClientID(&self, aClientID: &mut nsACString) -> nsresult
[src]
/**
* The client ID for this application cache. Clients can open a
* session with nsICacheService::createSession() using this client
* ID and a storage policy of STORE_OFFLINE to access this cache.
*/
readonly attribute ACString clientID;
pub unsafe fn GetActive(&self, aActive: *mut bool) -> nsresult
[src]
/**
* TRUE if the cache is the active cache for this group.
*/
readonly attribute boolean active;
pub unsafe fn GetUsage(&self, aUsage: *mut uint32_t) -> nsresult
[src]
/**
* The disk usage of the application cache, in bytes.
*/
readonly attribute unsigned long usage;
pub unsafe fn Activate(&self) -> nsresult
[src]
/**
* Makes this cache the active application cache for this group.
* Future loads associated with this group will come from this
* cache. Other caches from this cache group will be deactivated.
*/
void activate ();
pub unsafe fn Discard(&self) -> nsresult
[src]
/**
* Discard this application cache. Removes all cached resources
* for this cache. If this is the active application cache for the
* group, the group will be removed.
*/
void discard ();
pub unsafe fn MarkEntry(&self, key: &nsACString, typeBits: uint32_t) -> nsresult
[src]
/**
* Adds item types to a given entry.
*/
void markEntry (in ACString key, in unsigned long typeBits);
pub unsafe fn UnmarkEntry(
&self,
key: &nsACString,
typeBits: uint32_t
) -> nsresult
[src]
&self,
key: &nsACString,
typeBits: uint32_t
) -> nsresult
/**
* Removes types from a given entry. If the resulting entry has
* no types left, the entry is removed.
*/
void unmarkEntry (in ACString key, in unsigned long typeBits);
pub unsafe fn GetTypes(
&self,
key: &nsACString,
_retval: *mut uint32_t
) -> nsresult
[src]
&self,
key: &nsACString,
_retval: *mut uint32_t
) -> nsresult
/**
* Gets the types for a given entry.
*/
unsigned long getTypes (in ACString key);
pub unsafe fn GatherEntries(
&self,
typeBits: uint32_t,
count: *mut uint32_t,
keys: *mut *mut *const c_char
) -> nsresult
[src]
&self,
typeBits: uint32_t,
count: *mut uint32_t,
keys: *mut *mut *const c_char
) -> nsresult
/**
* Returns any entries in the application cache whose type matches
* one or more of the bits in typeBits.
*/
void gatherEntries (in uint32_t typeBits, out unsigned long count, [array, size_is (count)] out string keys);
pub unsafe fn AddNamespaces(&self, namespaces: *const nsIArray) -> nsresult
[src]
/**
* Add a set of namespace entries to the application cache.
* @param namespaces
* An nsIArray of nsIApplicationCacheNamespace entries.
*/
void addNamespaces (in nsIArray namespaces);
pub unsafe fn GetMatchingNamespace(
&self,
key: &nsACString,
_retval: *mut *const nsIApplicationCacheNamespace
) -> nsresult
[src]
&self,
key: &nsACString,
_retval: *mut *const nsIApplicationCacheNamespace
) -> nsresult
/**
* Get the most specific namespace matching a given key.
*/
nsIApplicationCacheNamespace getMatchingNamespace (in ACString key);
pub unsafe fn GetProfileDirectory(
&self,
aProfileDirectory: *mut *const nsIFile
) -> nsresult
[src]
&self,
aProfileDirectory: *mut *const nsIFile
) -> nsresult
/**
* If set, this offline cache is placed in a different directory
* than the current application profile.
*/
readonly attribute nsIFile profileDirectory;
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 nsIApplicationCache
[src]
const IID: nsIID
IID: nsIID = nsID(106335662, 50036, 17283, [161, 34, 12, 201, 108, 113, 119, 242])
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 nsIApplicationCache
[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 nsIApplicationCache
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.