Struct xpcom::interfaces::nsICacheStorage
[−]
[src]
#[repr(C)]pub struct nsICacheStorage { /* fields omitted */ }
interface nsICacheStorage : nsISupports
/**
* Representation of a cache storage. There can be just-in-mem,
* in-mem+on-disk, in-mem+on-disk+app-cache or just a specific
* app-cache storage.
*/
Methods
impl nsICacheStorage
[src]
pub fn coerce<T: nsICacheStorageCoerce>(&self) -> &T
[src]
Cast this nsICacheStorage
to one of its base interfaces.
impl nsICacheStorage
[src]
pub const OPEN_NORMALLY: i64
OPEN_NORMALLY: i64 = 0
/**
* Placeholder for specifying "no special flags" during open.
*/
pub const OPEN_TRUNCATE: i64
OPEN_TRUNCATE: i64 = 1
/**
* Rewrite any existing data when opening a URL.
*/
pub const OPEN_READONLY: i64
OPEN_READONLY: i64 = 2
/**
* Only open an existing entry. Don't create a new one.
*/
pub const OPEN_PRIORITY: i64
OPEN_PRIORITY: i64 = 4
/**
* Use for first-paint blocking loads.
*/
pub const OPEN_BYPASS_IF_BUSY: i64
OPEN_BYPASS_IF_BUSY: i64 = 8
/**
* Bypass the cache load when write is still in progress.
*/
pub const CHECK_MULTITHREADED: i64
CHECK_MULTITHREADED: i64 = 16
/**
* Perform the cache entry check (onCacheEntryCheck invocation) on any thread
* for optimal perfomance optimization. If this flag is not specified it is
* ensured that onCacheEntryCheck is called on the same thread as respective
* asyncOpen has been called.
*/
pub const OPEN_SECRETLY: i64
OPEN_SECRETLY: i64 = 32
/**
* Don't automatically update any 'last used' metadata of the entry.
*/
pub const OPEN_INTERCEPTED: i64
OPEN_INTERCEPTED: i64 = 64
/**
* Entry is being opened as part of a service worker interception. Do not
* allow the cache to be disabled in this case.
*/
pub unsafe fn AsyncOpenURI(
&self,
aURI: *const nsIURI,
aIdExtension: &nsACString,
aFlags: uint32_t,
aCallback: *const nsICacheEntryOpenCallback
) -> nsresult
[src]
&self,
aURI: *const nsIURI,
aIdExtension: &nsACString,
aFlags: uint32_t,
aCallback: *const nsICacheEntryOpenCallback
) -> nsresult
/**
* Asynchronously opens a cache entry for the specified URI.
* Result is fetched asynchronously via the callback.
*
* @param aURI
* The URI to search in cache or to open for writting.
* @param aIdExtension
* Any string that will extend (distinguish) the entry. Two entries
* with the same aURI but different aIdExtension will be comletely
* different entries. If you don't know what aIdExtension should be
* leave it empty.
* @param aFlags
* OPEN_NORMALLY - open cache entry normally for read and write
* OPEN_TRUNCATE - delete any existing entry before opening it
* OPEN_READONLY - don't create an entry if there is none
* OPEN_PRIORITY - give this request a priority over others
* OPEN_BYPASS_IF_BUSY - backward compatibility only, LOAD_BYPASS_LOCAL_CACHE_IF_BUSY
* CHECK_MULTITHREADED - onCacheEntryCheck may be called on any thread, consumer
* implementation is thread-safe
* @param aCallback
* The consumer that receives the result.
* IMPORTANT: The callback may be called sooner the method returns.
*/
void asyncOpenURI (in nsIURI aURI, in ACString aIdExtension, in uint32_t aFlags, in nsICacheEntryOpenCallback aCallback);
pub unsafe fn OpenTruncate(
&self,
aURI: *const nsIURI,
aIdExtension: &nsACString,
_retval: *mut *const nsICacheEntry
) -> nsresult
[src]
&self,
aURI: *const nsIURI,
aIdExtension: &nsACString,
_retval: *mut *const nsICacheEntry
) -> nsresult
/**
* Immediately opens a new and empty cache entry in the storage, any existing
* entries are immediately doomed. This is similar to the recreate() method
* on nsICacheEntry.
*
* Storage may not implement this method and throw NS_ERROR_NOT_IMPLEMENTED.
* In that case consumer must use asyncOpen with OPEN_TRUNCATE flag and get
* the new entry via a callback.
*
* @param aURI @see asyncOpenURI
* @param aIdExtension @see asyncOpenURI
*/
nsICacheEntry openTruncate (in nsIURI aURI, in ACString aIdExtension);
pub unsafe fn Exists(
&self,
aURI: *const nsIURI,
aIdExtension: &nsACString,
_retval: *mut bool
) -> nsresult
[src]
&self,
aURI: *const nsIURI,
aIdExtension: &nsACString,
_retval: *mut bool
) -> nsresult
/**
* Synchronously check on existance of an entry. In case of disk entries
* this uses information from the cache index. When the index data are not
* up to date or index is still building, NS_ERROR_NOT_AVAILABLE is thrown.
* The same error may throw any storage implementation that cannot determine
* entry state without blocking the caller.
*/
boolean exists (in nsIURI aURI, in ACString aIdExtension);
pub unsafe fn GetCacheIndexEntryAttrs(
&self,
aURI: *const nsIURI,
aIdExtension: &nsACString,
aHasAltData: *mut bool,
aSizeInKB: *mut uint32_t
) -> nsresult
[src]
&self,
aURI: *const nsIURI,
aIdExtension: &nsACString,
aHasAltData: *mut bool,
aSizeInKB: *mut uint32_t
) -> nsresult
/**
* Synchronously check on existance of alternative data and size of the
* content. When the index data are not up to date or index is still building,
* NS_ERROR_NOT_AVAILABLE is thrown. The same error may throw any storage
* implementation that cannot determine entry state without blocking the caller.
*/
void getCacheIndexEntryAttrs (in nsIURI aURI, in ACString aIdExtension, out bool aHasAltData, out uint32_t aSizeInKB);
pub unsafe fn AsyncDoomURI(
&self,
aURI: *const nsIURI,
aIdExtension: &nsACString,
aCallback: *const nsICacheEntryDoomCallback
) -> nsresult
[src]
&self,
aURI: *const nsIURI,
aIdExtension: &nsACString,
aCallback: *const nsICacheEntryDoomCallback
) -> nsresult
/**
* Asynchronously removes an entry belonging to the URI from the cache.
*/
void asyncDoomURI (in nsIURI aURI, in ACString aIdExtension, in nsICacheEntryDoomCallback aCallback);
pub unsafe fn AsyncEvictStorage(
&self,
aCallback: *const nsICacheEntryDoomCallback
) -> nsresult
[src]
&self,
aCallback: *const nsICacheEntryDoomCallback
) -> nsresult
/**
* Asynchronously removes all cached entries under this storage.
* NOTE: Disk storage also evicts memory storage.
*/
void asyncEvictStorage (in nsICacheEntryDoomCallback aCallback);
pub unsafe fn AsyncVisitStorage(
&self,
aVisitor: *const nsICacheStorageVisitor,
aVisitEntries: bool
) -> nsresult
[src]
&self,
aVisitor: *const nsICacheStorageVisitor,
aVisitEntries: bool
) -> nsresult
/**
* Visits the storage and its entries.
* NOTE: Disk storage also visits memory storage.
*/
void asyncVisitStorage (in nsICacheStorageVisitor aVisitor, in boolean aVisitEntries);
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 nsICacheStorage
[src]
const IID: nsIID
IID: nsIID = nsID(902890662, 53842, 20436, [138, 86, 60, 20, 101, 124, 173, 59])
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 nsICacheStorage
[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 nsICacheStorage
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.