Struct xpcom::interfaces::nsICookie2
[−]
[src]
#[repr(C)]pub struct nsICookie2 { /* fields omitted */ }
interface nsICookie2 : nsICookie
/**
* Main cookie object interface for use by consumers:
* extends nsICookie, a frozen interface for external
* access of cookie objects
*/
Methods
impl nsICookie2
[src]
pub fn coerce<T: nsICookie2Coerce>(&self) -> &T
[src]
Cast this nsICookie2
to one of its base interfaces.
impl nsICookie2
[src]
pub const SAMESITE_UNSET: i64
SAMESITE_UNSET: i64 = 0
pub const SAMESITE_LAX: i64
SAMESITE_LAX: i64 = 1
pub const SAMESITE_STRICT: i64
SAMESITE_STRICT: i64 = 2
pub unsafe fn GetRawHost(&self, aRawHost: &mut nsACString) -> nsresult
[src]
/**
* the host (possibly fully qualified) of the cookie,
* without a leading dot to represent if it is a
* domain cookie.
*/
readonly attribute AUTF8String rawHost;
pub unsafe fn GetIsSession(&self, aIsSession: *mut bool) -> nsresult
[src]
/**
* true if the cookie is a session cookie.
* note that expiry time will also be honored
* for session cookies (see below); thus, whichever is
* the more restrictive of the two will take effect.
*/
readonly attribute boolean isSession;
pub unsafe fn GetExpiry(&self, aExpiry: *mut int64_t) -> nsresult
[src]
/**
* the actual expiry time of the cookie, in seconds
* since midnight (00:00:00), January 1, 1970 UTC.
*
* this is distinct from nsICookie::expires, which
* has different and obsolete semantics.
*/
readonly attribute int64_t expiry;
pub unsafe fn GetIsHttpOnly(&self, aIsHttpOnly: *mut bool) -> nsresult
[src]
/**
* true if the cookie is an http only cookie
*/
readonly attribute boolean isHttpOnly;
pub unsafe fn GetCreationTime(&self, aCreationTime: *mut int64_t) -> nsresult
[src]
/**
* the creation time of the cookie, in microseconds
* since midnight (00:00:00), January 1, 1970 UTC.
*/
readonly attribute int64_t creationTime;
pub unsafe fn GetLastAccessed(&self, aLastAccessed: *mut int64_t) -> nsresult
[src]
/**
* the last time the cookie was accessed (i.e. created,
* modified, or read by the server), in microseconds
* since midnight (00:00:00), January 1, 1970 UTC.
*
* note that this time may be approximate.
*/
readonly attribute int64_t lastAccessed;
pub unsafe fn GetSameSite(&self, aSameSite: *mut int32_t) -> nsresult
[src]
/**
* the sameSite attribute; this controls the cookie behavior for cross-site
* requests as per
* https://tools.ietf.org/html/draft-west-first-party-cookies-07
*
* This should be one of:
* - SAMESITE_UNSET - the SameSite attribute is not present
* - SAMESITE_LAX - the SameSite attribute is present, but not strict
* - SAMESITE_STRICT - the SameSite attribute is present and strict
*/
readonly attribute int32_t sameSite;
Methods from Deref<Target = nsICookie>
pub fn coerce<T: nsICookieCoerce>(&self) -> &T
[src]
Cast this nsICookie
to one of its base interfaces.
pub const STATUS_UNKNOWN: i64
pub const STATUS_ACCEPTED: i64
pub const STATUS_DOWNGRADED: i64
pub const STATUS_FLAGGED: i64
pub const STATUS_REJECTED: i64
pub const POLICY_UNKNOWN: i64
pub const POLICY_NONE: i64
pub const POLICY_NO_CONSENT: i64
pub const POLICY_IMPLICIT_CONSENT: i64
pub const POLICY_EXPLICIT_CONSENT: i64
pub const POLICY_NO_II: i64
pub unsafe fn GetName(&self, aName: &mut nsACString) -> nsresult
[src]
/**
* the name of the cookie
*/
readonly attribute ACString name;
pub unsafe fn GetValue(&self, aValue: &mut nsACString) -> nsresult
[src]
/**
* the cookie value
*/
readonly attribute AUTF8String value;
pub unsafe fn GetIsDomain(&self, aIsDomain: *mut bool) -> nsresult
[src]
/**
* true if the cookie is a domain cookie, false otherwise
*/
readonly attribute boolean isDomain;
pub unsafe fn GetHost(&self, aHost: &mut nsACString) -> nsresult
[src]
/**
* the host (possibly fully qualified) of the cookie
*/
readonly attribute AUTF8String host;
pub unsafe fn GetPath(&self, aPath: &mut nsACString) -> nsresult
[src]
/**
* the path pertaining to the cookie
*/
readonly attribute AUTF8String path;
pub unsafe fn GetIsSecure(&self, aIsSecure: *mut bool) -> nsresult
[src]
/**
* true if the cookie was transmitted over ssl, false otherwise
*/
readonly attribute boolean isSecure;
pub unsafe fn GetExpires(&self, aExpires: *mut uint64_t) -> nsresult
[src]
/**
* @DEPRECATED use nsICookie2.expiry and nsICookie2.isSession instead.
*
* expiration time in seconds since midnight (00:00:00), January 1, 1970 UTC.
* expires = 0 represents a session cookie.
* expires = 1 represents an expiration time earlier than Jan 1, 1970.
*/
readonly attribute uint64_t expires;
pub unsafe fn GetStatus(&self, aStatus: *mut nsCookieStatus) -> nsresult
[src]
readonly attribute nsCookieStatus status;
pub unsafe fn GetPolicy(&self, aPolicy: *mut nsCookiePolicy) -> nsresult
[src]
readonly attribute nsCookiePolicy policy;
Trait Implementations
impl XpCom for nsICookie2
[src]
const IID: nsIID
IID: nsIID = nsID(3189792174, 20300, 4582, [128, 186, 234, 92, 211, 16, 193, 168])
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 nsICookie2
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.