Interface nsIPermissionType

This interface defines a "permission" object, used to specify allowed/blocked objects from user-specified sites (cookies, images etc).

Hierarchy

Properties

capability: uint32_t

The permission (see nsIPermissionManager.idl for allowed values)

expireTime: int64_t

The expiration time of the permission (milliseconds since Jan 1 1970 0:00:00).

expireType: uint32_t

The expiration type of the permission (session, time-based or none). Constants are EXPIRE_*, defined in nsIPermissionManager.

See

nsIPermissionManager

modificationTime: int64_t

The last modification time of the permission (milliseconds since Jan 1 1970 0:00:00).

principal: nsIPrincipal

The principal for which this permission applies.

type: string

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

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Test whether a principal would be affected by this permission.

    See

    • nsIPermissionManager::testExactPermission. If false, subdomains will also be searched,
    • nsIPermissionManager::testPermission.

    Parameters

    • principal: nsIPrincipal

      the principal to test

    • exactHost: boolean

      If true, only the specific host will be matched,

    Returns boolean

  • Test whether a URI would be affected by this permission. NOTE: This performs matches with default origin attribute values.

    See

    • nsIPermissionManager::testExactPermission. If false, subdomains will also be searched,
    • nsIPermissionManager::testPermission.

    Parameters

    • uri: nsIURI

      the uri to test

    • exactHost: boolean

      If true, only the specific host will be matched,

    Returns boolean

Generated using TypeDoc