Struct xpcom::interfaces::nsIPermission
[−]
[src]
#[repr(C)]pub struct nsIPermission { /* fields omitted */ }
interface nsIPermission : nsISupports
/**
* This interface defines a "permission" object,
* used to specify allowed/blocked objects from
* user-specified sites (cookies, images etc).
*/
Methods
impl nsIPermission
[src]
pub fn coerce<T: nsIPermissionCoerce>(&self) -> &T
[src]
Cast this nsIPermission
to one of its base interfaces.
impl nsIPermission
[src]
pub unsafe fn GetPrincipal(
&self,
aPrincipal: *mut *const nsIPrincipal
) -> nsresult
[src]
&self,
aPrincipal: *mut *const nsIPrincipal
) -> nsresult
/**
* The principal for which this permission applies.
*/
readonly attribute nsIPrincipal principal;
pub unsafe fn GetType(&self, aType: &mut nsACString) -> nsresult
[src]
/**
* a case-sensitive ASCII string, indicating the type of permission
* (e.g., "cookie", "image", etc).
* This string is specified by the consumer when adding a permission
* via nsIPermissionManager.
* @see nsIPermissionManager
*/
readonly attribute ACString type;
pub unsafe fn GetCapability(&self, aCapability: *mut uint32_t) -> nsresult
[src]
/**
* The permission (see nsIPermissionManager.idl for allowed values)
*/
readonly attribute uint32_t capability;
pub unsafe fn GetExpireType(&self, aExpireType: *mut uint32_t) -> nsresult
[src]
/**
* The expiration type of the permission (session, time-based or none).
* Constants are EXPIRE_*, defined in nsIPermissionManager.
* @see nsIPermissionManager
*/
readonly attribute uint32_t expireType;
pub unsafe fn GetExpireTime(&self, aExpireTime: *mut int64_t) -> nsresult
[src]
/**
* The expiration time of the permission (milliseconds since Jan 1 1970
* 0:00:00).
*/
readonly attribute int64_t expireTime;
pub unsafe fn Matches(
&self,
principal: *const nsIPrincipal,
exactHost: bool,
_retval: *mut bool
) -> nsresult
[src]
&self,
principal: *const nsIPrincipal,
exactHost: bool,
_retval: *mut bool
) -> nsresult
/**
* Test whether a principal would be affected by this permission.
*
* @param principal the principal to test
* @param exactHost If true, only the specific host will be matched,
* @see nsIPermissionManager::testExactPermission.
* If false, subdomains will also be searched,
* @see nsIPermissionManager::testPermission.
*/
boolean matches (in nsIPrincipal principal, in boolean exactHost);
pub unsafe fn MatchesURI(
&self,
uri: *const nsIURI,
exactHost: bool,
_retval: *mut bool
) -> nsresult
[src]
&self,
uri: *const nsIURI,
exactHost: bool,
_retval: *mut bool
) -> nsresult
/**
* Test whether a URI would be affected by this permission.
* NOTE: This performs matches with default origin attribute values.
*
* @param uri the uri to test
* @param exactHost If true, only the specific host will be matched,
* @see nsIPermissionManager::testExactPermission.
* If false, subdomains will also be searched,
* @see nsIPermissionManager::testPermission.
*/
boolean matchesURI (in nsIURI uri, in boolean exactHost);
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 nsIPermission
[src]
const IID: nsIID
IID: nsIID = nsID(3141573201, 9073, 20458, [157, 201, 183, 40, 106, 69, 139, 140])
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 nsIPermission
[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 nsIPermission
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.