Struct xpcom::interfaces::nsICookieManager
[−]
[src]
#[repr(C)]pub struct nsICookieManager { /* fields omitted */ }
interface nsICookieManager : nsISupports
/**
* An optional interface for accessing or removing the cookies
* that are in the cookie list
*/
Methods
impl nsICookieManager
[src]
pub fn coerce<T: nsICookieManagerCoerce>(&self) -> &T
[src]
Cast this nsICookieManager
to one of its base interfaces.
impl nsICookieManager
[src]
pub unsafe fn RemoveAll(&self) -> nsresult
[src]
/**
* Called to remove all cookies from the cookie list
*/
void removeAll ();
pub unsafe fn GetEnumerator(
&self,
aEnumerator: *mut *const nsISimpleEnumerator
) -> nsresult
[src]
&self,
aEnumerator: *mut *const nsISimpleEnumerator
) -> nsresult
/**
* Called to enumerate through each cookie in the cookie list.
* The objects enumerated over are of type nsICookie
* This enumerator should only be used for non-private browsing cookies.
* To retrieve an enumerator for private browsing cookies, use
* getCookiesWithOriginAttributes.
*/
readonly attribute nsISimpleEnumerator enumerator;
pub unsafe fn GetSessionEnumerator(
&self,
aSessionEnumerator: *mut *const nsISimpleEnumerator
) -> nsresult
[src]
&self,
aSessionEnumerator: *mut *const nsISimpleEnumerator
) -> nsresult
/**
* Called to enumerate through each session cookie in the cookie list.
* The objects enumerated over are of type nsICookie
* This enumerator should only be used for non-private browsing cookies.
*/
readonly attribute nsISimpleEnumerator sessionEnumerator;
pub unsafe fn CountCookiesFromHost(
&self,
aHost: &nsACString,
_retval: *mut uint32_t
) -> nsresult
[src]
&self,
aHost: &nsACString,
_retval: *mut uint32_t
) -> nsresult
/**
* Count how many cookies exist within the base domain of 'aHost'.
* Thus, for a host "weather.yahoo.com", the base domain would be "yahoo.com",
* and any host or domain cookies for "yahoo.com" and its subdomains would be
* counted.
*
* @param aHost
* the host string to search for, e.g. "google.com". this should consist
* of only the host portion of a URI. see @add for a description of
* acceptable host strings.
*
* @return the number of cookies found.
*/
unsigned long countCookiesFromHost (in AUTF8String aHost);
pub unsafe fn ImportCookies(&self, aCookieFile: *const nsIFile) -> nsresult
[src]
/**
* Import an old-style cookie file. Imported cookies will be added to the
* existing database. If the database contains any cookies the same as those
* being imported (i.e. domain, name, and path match), they will be replaced.
*
* @param aCookieFile the file to import, usually cookies.txt
*/
void importCookies (in nsIFile aCookieFile);
pub unsafe fn GetCookiesWithOriginAttributes(
&self,
aPattern: &nsAString,
aHost: &nsACString,
_retval: *mut *const nsISimpleEnumerator
) -> nsresult
[src]
&self,
aPattern: &nsAString,
aHost: &nsACString,
_retval: *mut *const nsISimpleEnumerator
) -> nsresult
/**
* Returns an enumerator of all cookies whose origin attributes matches aPattern
*
* @param aPattern origin attribute pattern in JSON format
*
* @param aHost
* the host string to search for, e.g. "google.com". this should consist
* of only the host portion of a URI. see @add for a description of
* acceptable host strings. This attribute is optional. It will search
* all hosts if this attribute is not given.
*/
nsISimpleEnumerator getCookiesWithOriginAttributes (in DOMString aPattern, [optional] in AUTF8String aHost);
pub unsafe fn RemoveCookiesWithOriginAttributes(
&self,
aPattern: &nsAString,
aHost: &nsACString
) -> nsresult
[src]
&self,
aPattern: &nsAString,
aHost: &nsACString
) -> nsresult
/**
* Remove all the cookies whose origin attributes matches aPattern
*
* @param aPattern origin attribute pattern in JSON format
*/
void removeCookiesWithOriginAttributes (in DOMString aPattern, [optional] in AUTF8String aHost);
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 nsICookieManager
[src]
const IID: nsIID
IID: nsIID = nsID(2863359760, 3884, 4565, [165, 59, 0, 16, 164, 1, 235, 16])
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 nsICookieManager
[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 nsICookieManager
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.