2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
*
|
2012-05-21 04:12:37 -07:00
|
|
|
* 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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2012-08-23 11:37:31 -07:00
|
|
|
[scriptable, uuid(cfb08e46-193c-4be7-a467-d7775fb2a31e)]
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
|
2012-08-23 11:37:31 -07:00
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* 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)
|
|
|
|
*/
|
2012-08-22 08:56:38 -07:00
|
|
|
readonly attribute uint32_t capability;
|
2009-10-16 14:01:04 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The expiration type of the permission (session, time-based or none).
|
|
|
|
* Constants are EXPIRE_*, defined in nsIPermissionManager.
|
|
|
|
* @see nsIPermissionManager
|
|
|
|
*/
|
2012-08-22 08:56:38 -07:00
|
|
|
readonly attribute uint32_t expireType;
|
2009-10-16 14:01:04 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The expiration time of the permission (milliseconds since Jan 1 1970
|
|
|
|
* 0:00:00).
|
|
|
|
*/
|
2012-08-22 08:56:38 -07:00
|
|
|
readonly attribute int64_t expireTime;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|