Struct xpcom::interfaces::nsIDOMStorageManager
[−]
[src]
#[repr(C)]pub struct nsIDOMStorageManager { /* fields omitted */ }
interface nsIDOMStorageManager : nsISupports
/**
* General purpose interface that has two implementations, for localStorage
* resp. sessionStorage with "@mozilla.org/dom/localStorage-manager;1" resp.
* "@mozilla.org/dom/sessionStorage-manager;1" contract IDs.
*/
Methods
impl nsIDOMStorageManager
[src]
pub fn coerce<T: nsIDOMStorageManagerCoerce>(&self) -> &T
[src]
Cast this nsIDOMStorageManager
to one of its base interfaces.
impl nsIDOMStorageManager
[src]
pub unsafe fn PrecacheStorage(
&self,
aPrincipal: *const nsIPrincipal,
_retval: *mut *const nsIDOMStorage
) -> nsresult
[src]
&self,
aPrincipal: *const nsIPrincipal,
_retval: *mut *const nsIDOMStorage
) -> nsresult
/**
* This starts async preloading of a storage cache for scope
* defined by the principal.
*
* Because of how multi-e10s support was implemented in bug 1285898, the
* StorageCache instance can no longer use a timer to keep itself alive. So a
* Storage instance is returned if precaching believes the principal may have
* localStorage data. (Previously the StorageCache would be brought into
* existence and kept alive by the timer so that it could be returned if a
* call to createStorage was made due to a request by the page.)
*/
nsIDOMStorage precacheStorage (in nsIPrincipal aPrincipal);
pub unsafe fn CreateStorage(
&self,
aWindow: *const mozIDOMWindow,
aPrincipal: *const nsIPrincipal,
aDocumentURI: &nsAString,
aPrivate: bool,
_retval: *mut *const nsIDOMStorage
) -> nsresult
[src]
&self,
aWindow: *const mozIDOMWindow,
aPrincipal: *const nsIPrincipal,
aDocumentURI: &nsAString,
aPrivate: bool,
_retval: *mut *const nsIDOMStorage
) -> nsresult
/**
* Returns instance of DOM storage object for given principal.
* A new object is always returned and it is ensured there is
* a storage for the scope created.
*
* @param aWindow
* The parent window.
* @param aPrincipal
* Principal to bound storage to.
* @param aDocumentURI
* URL of the demanding document, used for DOM storage event only.
* @param aPrivate
* Whether the demanding document is running in Private Browsing mode or not.
*/
nsIDOMStorage createStorage (in mozIDOMWindow aWindow, in nsIPrincipal aPrincipal, in DOMString aDocumentURI, [optional] in bool aPrivate);
pub unsafe fn GetStorage(
&self,
aWindow: *const mozIDOMWindow,
aPrincipal: *const nsIPrincipal,
aPrivate: bool,
_retval: *mut *const nsIDOMStorage
) -> nsresult
[src]
&self,
aWindow: *const mozIDOMWindow,
aPrincipal: *const nsIPrincipal,
aPrivate: bool,
_retval: *mut *const nsIDOMStorage
) -> nsresult
/**
* Returns instance of DOM storage object for given principal.
* If there is no storage managed for the scope, then null is returned and
* no object is created. Otherwise, an object (new) for the existing storage
* scope is returned.
*
* @param aWindow
* The parent window.
* @param aPrincipal
* Principal to bound storage to.
* @param aPrivate
* Whether the demanding document is running in Private Browsing mode or not.
*/
nsIDOMStorage getStorage (in mozIDOMWindow aWindow, in nsIPrincipal aPrincipal, [optional] in bool aPrivate);
pub unsafe fn CloneStorage(
&self,
aStorageToCloneFrom: *const nsIDOMStorage
) -> nsresult
[src]
&self,
aStorageToCloneFrom: *const nsIDOMStorage
) -> nsresult
/**
* Clones given storage into this storage manager.
*
* @param aStorageToCloneFrom
* The storage to copy all items from into this manager. Manager will then
* return a new and independent object that contains snapshot of data from
* the moment this method was called. Modification to this new object will
* not affect the original storage content we cloned from and vice versa.
*/
void cloneStorage (in nsIDOMStorage aStorageToCloneFrom);
pub unsafe fn CheckStorage(
&self,
aPrincipal: *const nsIPrincipal,
aStorage: *const nsIDOMStorage,
_retval: *mut bool
) -> nsresult
[src]
&self,
aPrincipal: *const nsIPrincipal,
aStorage: *const nsIDOMStorage,
_retval: *mut bool
) -> nsresult
/**
* Returns true if the storage belongs to the given principal and is managed
* (i.e. has been created and is cached) by this storage manager.
*
* @param aPrincipal
* Principal to check the storage against.
* @param aStorage
* The storage object to examine.
*
* @result
* true when the storage object is bound with the principal and is managed
* by this storage manager.
* false otherwise
*/
bool checkStorage (in nsIPrincipal aPrincipal, in nsIDOMStorage aStorage);
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 nsIDOMStorageManager
[src]
const IID: nsIID
IID: nsIID = nsID(2718725166, 16081, 17659, [184, 151, 64, 128, 167, 91, 22, 98])
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 nsIDOMStorageManager
[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 nsIDOMStorageManager
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.