Struct xpcom::interfaces::nsICacheStorageService
[−]
[src]
#[repr(C)]pub struct nsICacheStorageService { /* fields omitted */ }
interface nsICacheStorageService : nsISupports
/**
* Provides access to particual cache storages of the network URI cache.
*/
Methods
impl nsICacheStorageService
[src]
pub fn coerce<T: nsICacheStorageServiceCoerce>(&self) -> &T
[src]
Cast this nsICacheStorageService
to one of its base interfaces.
impl nsICacheStorageService
[src]
pub const PURGE_DISK_DATA_ONLY: i64
PURGE_DISK_DATA_ONLY: i64 = 1
/**
* Purge only data of disk backed entries. Metadata are left for
* performance purposes.
*/
pub const PURGE_DISK_ALL: i64
PURGE_DISK_ALL: i64 = 2
/**
* Purge whole disk backed entries from memory. Disk files will
* be left unattended.
*/
pub const PURGE_EVERYTHING: i64
PURGE_EVERYTHING: i64 = 3
/**
* Purge all entries we keep in memory, including memory-storage
* entries. This may be dangerous to use.
*/
pub unsafe fn MemoryCacheStorage(
&self,
aLoadContextInfo: *const nsILoadContextInfo,
_retval: *mut *const nsICacheStorage
) -> nsresult
[src]
&self,
aLoadContextInfo: *const nsILoadContextInfo,
_retval: *mut *const nsICacheStorage
) -> nsresult
/**
* Get storage where entries will only remain in memory, never written
* to the disk.
*
* NOTE: Any existing disk entry for [URL|id-extension] will be doomed
* prior opening an entry using this memory-only storage. Result of
* AsyncOpenURI will be a new and empty memory-only entry. Using
* OPEN_READONLY open flag has no effect on this behavior.
*
* @param aLoadContextInfo
* Information about the loading context, this focuses the storage JAR and
* respects separate storage for private browsing.
*/
nsICacheStorage memoryCacheStorage (in nsILoadContextInfo aLoadContextInfo);
pub unsafe fn DiskCacheStorage(
&self,
aLoadContextInfo: *const nsILoadContextInfo,
aLookupAppCache: bool,
_retval: *mut *const nsICacheStorage
) -> nsresult
[src]
&self,
aLoadContextInfo: *const nsILoadContextInfo,
aLookupAppCache: bool,
_retval: *mut *const nsICacheStorage
) -> nsresult
/**
* Get storage where entries will be written to disk when not forbidden by
* response headers.
*
* @param aLookupAppCache
* When set true (for top level document loading channels) app cache will
* be first to check on to find entries in.
*/
nsICacheStorage diskCacheStorage (in nsILoadContextInfo aLoadContextInfo, in bool aLookupAppCache);
pub unsafe fn PinningCacheStorage(
&self,
aLoadContextInfo: *const nsILoadContextInfo,
_retval: *mut *const nsICacheStorage
) -> nsresult
[src]
&self,
aLoadContextInfo: *const nsILoadContextInfo,
_retval: *mut *const nsICacheStorage
) -> nsresult
/**
* Get storage where entries will be written to disk and marked as pinned.
* These pinned entries are immune to over limit eviction and call of clear()
* on this service.
*/
nsICacheStorage pinningCacheStorage (in nsILoadContextInfo aLoadContextInfo);
pub unsafe fn AppCacheStorage(
&self,
aLoadContextInfo: *const nsILoadContextInfo,
aApplicationCache: *const nsIApplicationCache,
_retval: *mut *const nsICacheStorage
) -> nsresult
[src]
&self,
aLoadContextInfo: *const nsILoadContextInfo,
aApplicationCache: *const nsIApplicationCache,
_retval: *mut *const nsICacheStorage
) -> nsresult
/**
* Get storage for a specified application cache obtained using some different
* mechanism.
*
* @param aLoadContextInfo
* Mandatory reference to a load context information.
* @param aApplicationCache
* Optional reference to an existing appcache. When left null, this will
* work with offline cache as a whole.
*/
nsICacheStorage appCacheStorage (in nsILoadContextInfo aLoadContextInfo, in nsIApplicationCache aApplicationCache);
pub unsafe fn SynthesizedCacheStorage(
&self,
aLoadContextInfo: *const nsILoadContextInfo,
_retval: *mut *const nsICacheStorage
) -> nsresult
[src]
&self,
aLoadContextInfo: *const nsILoadContextInfo,
_retval: *mut *const nsICacheStorage
) -> nsresult
/**
* Get storage for synthesized cache entries that we currently use for ServiceWorker interception in non-e10s mode.
*
* This cache storage has no limits on file size to allow the ServiceWorker to intercept large files.
*/
nsICacheStorage synthesizedCacheStorage (in nsILoadContextInfo aLoadContextInfo);
pub unsafe fn Clear(&self) -> nsresult
[src]
/**
* Evict the whole cache.
*/
void clear ();
pub unsafe fn PurgeFromMemory(&self, aWhat: uint32_t) -> nsresult
[src]
/**
* Purges data we keep warmed in memory. Use for tests and for
* saving memory.
*/
void purgeFromMemory (in uint32_t aWhat);
pub unsafe fn GetIoTarget(
&self,
aIoTarget: *mut *const nsIEventTarget
) -> nsresult
[src]
&self,
aIoTarget: *mut *const nsIEventTarget
) -> nsresult
/**
* I/O thread target to use for any operations on disk
*/
readonly attribute nsIEventTarget ioTarget;
pub unsafe fn AsyncGetDiskConsumption(
&self,
aObserver: *const nsICacheStorageConsumptionObserver
) -> nsresult
[src]
&self,
aObserver: *const nsICacheStorageConsumptionObserver
) -> nsresult
/**
* Asynchronously determine how many bytes of the disk space the cache takes.
* @see nsICacheStorageConsumptionObserver
* @param aObserver
* A mandatory (weak referred) observer. Documented at
* nsICacheStorageConsumptionObserver.
* NOTE: the observer MUST implement nsISupportsWeakReference.
*/
void asyncGetDiskConsumption (in nsICacheStorageConsumptionObserver aObserver);
pub unsafe fn AsyncVisitAllStorages(
&self,
aVisitor: *const nsICacheStorageVisitor,
aVisitEntries: bool
) -> nsresult
[src]
&self,
aVisitor: *const nsICacheStorageVisitor,
aVisitEntries: bool
) -> nsresult
/**
* Asynchronously visits all storages of the disk cache and memory cache.
* @see nsICacheStorageVisitor
* @param aVisitor
* A visitor callback.
* @param aVisitEntries
* A boolean indicates whether visits entries.
*/
void asyncVisitAllStorages (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 nsICacheStorageService
[src]
const IID: nsIID
IID: nsIID = nsID(2921972811, 64451, 17746, [175, 175, 10, 21, 124, 231, 113, 231])
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 nsICacheStorageService
[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 nsICacheStorageService
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.