gecko/netwerk/base/nsIPermission.idl

60 lines
1.7 KiB
Plaintext

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
[scriptable, uuid(cfb08e46-193c-4be7-a467-d7775fb2a31e)]
/**
* This interface defines a "permission" object,
* used to specify allowed/blocked objects from
* user-specified sites (cookies, images etc).
*/
interface nsIPermission : nsISupports
{
/**
* The name of the host for which the permission is set
*/
readonly attribute AUTF8String host;
/**
* The id of the app for which the permission is set.
*/
readonly attribute unsigned long appId;
/**
* Whether the permission has been set to a page inside a browser element.
*/
readonly attribute boolean isInBrowserElement;
/**
* 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;
/**
* The permission (see nsIPermissionManager.idl for allowed values)
*/
readonly attribute uint32_t capability;
/**
* The expiration type of the permission (session, time-based or none).
* Constants are EXPIRE_*, defined in nsIPermissionManager.
* @see nsIPermissionManager
*/
readonly attribute uint32_t expireType;
/**
* The expiration time of the permission (milliseconds since Jan 1 1970
* 0:00:00).
*/
readonly attribute int64_t expireTime;
};