Struct xpcom::interfaces::nsICacheSession
[−]
[src]
#[repr(C)]pub struct nsICacheSession { /* fields omitted */ }
interface nsICacheSession : nsISupports
Methods
impl nsICacheSession
[src]
pub fn coerce<T: nsICacheSessionCoerce>(&self) -> &T
[src]
Cast this nsICacheSession
to one of its base interfaces.
impl nsICacheSession
[src]
pub unsafe fn GetDoomEntriesIfExpired(
&self,
aDoomEntriesIfExpired: *mut bool
) -> nsresult
[src]
&self,
aDoomEntriesIfExpired: *mut bool
) -> nsresult
/**
* Expired entries will be doomed or evicted if this attribute is set to
* true. If false, expired entries will be returned (useful for offline-
* mode and clients, such as HTTP, that can update the valid lifetime of
* cached content). This attribute defaults to true.
*/
attribute boolean doomEntriesIfExpired;
pub unsafe fn SetDoomEntriesIfExpired(
&self,
aDoomEntriesIfExpired: bool
) -> nsresult
[src]
&self,
aDoomEntriesIfExpired: bool
) -> nsresult
/**
* Expired entries will be doomed or evicted if this attribute is set to
* true. If false, expired entries will be returned (useful for offline-
* mode and clients, such as HTTP, that can update the valid lifetime of
* cached content). This attribute defaults to true.
*/
attribute boolean doomEntriesIfExpired;
pub unsafe fn GetProfileDirectory(
&self,
aProfileDirectory: *mut *const nsIFile
) -> nsresult
[src]
&self,
aProfileDirectory: *mut *const nsIFile
) -> nsresult
/**
* When set, entries created with this session will be placed to a cache
* based at this directory. Use when storing entries to a different
* profile than the active profile of the the current running application
* process.
*/
attribute nsIFile profileDirectory;
pub unsafe fn SetProfileDirectory(
&self,
aProfileDirectory: *const nsIFile
) -> nsresult
[src]
&self,
aProfileDirectory: *const nsIFile
) -> nsresult
/**
* When set, entries created with this session will be placed to a cache
* based at this directory. Use when storing entries to a different
* profile than the active profile of the the current running application
* process.
*/
attribute nsIFile profileDirectory;
pub unsafe fn OpenCacheEntry(
&self,
key: &nsACString,
accessRequested: nsCacheAccessMode,
blockingMode: bool,
_retval: *mut *const nsICacheEntryDescriptor
) -> nsresult
[src]
&self,
key: &nsACString,
accessRequested: nsCacheAccessMode,
blockingMode: bool,
_retval: *mut *const nsICacheEntryDescriptor
) -> nsresult
/**
* A cache session can only give out one descriptor with WRITE access
* to a given cache entry at a time. Until the client calls MarkValid on
* its descriptor, other attempts to open the same cache entry will block.
*/
/**
* Synchronous cache access. This method fails if it is called on the main
* thread. Use asyncOpenCacheEntry() instead. This returns a unique
* descriptor each time it is called, even if the same key is specified.
* When called by multiple threads for write access, only one writable
* descriptor will be granted. If 'blockingMode' is set to false, it will
* return NS_ERROR_CACHE_WAIT_FOR_VALIDATION rather than block when another
* descriptor has been given WRITE access but hasn't validated the entry yet.
*/
nsICacheEntryDescriptor openCacheEntry (in ACString key, in nsCacheAccessMode accessRequested, in boolean blockingMode);
pub unsafe fn AsyncOpenCacheEntry(
&self,
key: &nsACString,
accessRequested: nsCacheAccessMode,
listener: *const nsICacheListener,
noWait: bool
) -> nsresult
[src]
&self,
key: &nsACString,
accessRequested: nsCacheAccessMode,
listener: *const nsICacheListener,
noWait: bool
) -> nsresult
/**
* Asynchronous cache access. Does not block the calling thread. Instead,
* the listener will be notified when the descriptor is available. If
* 'noWait' is set to true, the listener will be notified immediately with
* status NS_ERROR_CACHE_WAIT_FOR_VALIDATION rather than queuing the request
* when another descriptor has been given WRITE access but hasn't validated
* the entry yet.
*/
void asyncOpenCacheEntry (in ACString key, in nsCacheAccessMode accessRequested, in nsICacheListener listener, [optional] in boolean noWait);
pub unsafe fn EvictEntries(&self) -> nsresult
[src]
/**
* Evict all entries for this session's clientID according to its storagePolicy.
*/
void evictEntries ();
pub unsafe fn IsStorageEnabled(&self, _retval: *mut bool) -> nsresult
[src]
/**
* Return whether any of the cache devices implied by the session storage policy
* are currently enabled for instantiation if they don't already exist.
*/
boolean isStorageEnabled ();
pub unsafe fn DoomEntry(
&self,
key: &nsACString,
listener: *const nsICacheListener
) -> nsresult
[src]
&self,
key: &nsACString,
listener: *const nsICacheListener
) -> nsresult
/**
* Asynchronously doom an entry specified by the key. Listener will be
* notified about the status of the operation. Null may be passed if caller
* doesn't care about the result.
*/
void doomEntry (in ACString key, in nsICacheListener listener);
pub unsafe fn GetIsPrivate(&self, aIsPrivate: *mut bool) -> nsresult
[src]
/**
* Private entries will be doomed when the last private browsing session
* finishes.
*/
attribute boolean isPrivate;
pub unsafe fn SetIsPrivate(&self, aIsPrivate: bool) -> nsresult
[src]
/**
* Private entries will be doomed when the last private browsing session
* finishes.
*/
attribute boolean isPrivate;
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 nsICacheSession
[src]
const IID: nsIID
IID: nsIID = nsID(500658316, 56904, 20478, [181, 170, 205, 33, 140, 118, 40, 135])
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 nsICacheSession
[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 nsICacheSession
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.