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]

[src]

Cast this nsIApplicationCache to one of its base interfaces.

impl nsIApplicationCache
[src]

ITEM_MANIFEST: i64 = 1
/**
     * Entries in an application cache can be marked as one or more of
     * the following types.
     */

ITEM_EXPLICIT: i64 = 2

ITEM_IMPLICIT: i64 = 4

ITEM_DYNAMIC: i64 = 8

ITEM_FOREIGN: i64 = 16

ITEM_FALLBACK: i64 = 32

ITEM_OPPORTUNISTIC: i64 = 64

[src]

/**
     * 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);

[src]

/**
     * URI of the manfiest specifying this application cache.
     **/

readonly attribute nsIURI manifestURI;

[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;

[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;

[src]

/**
     * TRUE if the cache is the active cache for this group.
     */

readonly attribute boolean active;

[src]

/**
     * The disk usage of the application cache, in bytes.
     */

readonly attribute unsigned long usage;

[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 ();

[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 ();

[src]

/**
     * Adds item types to a given entry.
     */

void markEntry (in ACString key, in unsigned long typeBits);

[src]

/**
     * 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);

[src]

/**
     * Gets the types for a given entry.
     */

unsigned long getTypes (in ACString key);

[src]

/**
     * 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);

[src]

/**
     * Add a set of namespace entries to the application cache.
     * @param namespaces
     *        An nsIArray of nsIApplicationCacheNamespace entries.
     */

void addNamespaces (in nsIArray namespaces);

[src]

/**
     * Get the most specific namespace matching a given key.
     */

nsIApplicationCacheNamespace getMatchingNamespace (in ACString key);

[src]

/**
     * 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>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsIApplicationCache
[src]

IID: nsIID = nsID(106335662, 50036, 17283, [161, 34, 12, 201, 108, 113, 119, 242])

[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]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIApplicationCache
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.