Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsISupports.idl"
9 [scriptable, uuid(cfb08e46-193c-4be7-a467-d7775fb2a31e)]
10 /**
11 * This interface defines a "permission" object,
12 * used to specify allowed/blocked objects from
13 * user-specified sites (cookies, images etc).
14 */
16 interface nsIPermission : nsISupports
17 {
18 /**
19 * The name of the host for which the permission is set
20 */
21 readonly attribute AUTF8String host;
23 /**
24 * The id of the app for which the permission is set.
25 */
26 readonly attribute unsigned long appId;
28 /**
29 * Whether the permission has been set to a page inside a browser element.
30 */
31 readonly attribute boolean isInBrowserElement;
33 /**
34 * a case-sensitive ASCII string, indicating the type of permission
35 * (e.g., "cookie", "image", etc).
36 * This string is specified by the consumer when adding a permission
37 * via nsIPermissionManager.
38 * @see nsIPermissionManager
39 */
40 readonly attribute ACString type;
42 /**
43 * The permission (see nsIPermissionManager.idl for allowed values)
44 */
45 readonly attribute uint32_t capability;
47 /**
48 * The expiration type of the permission (session, time-based or none).
49 * Constants are EXPIRE_*, defined in nsIPermissionManager.
50 * @see nsIPermissionManager
51 */
52 readonly attribute uint32_t expireType;
54 /**
55 * The expiration time of the permission (milliseconds since Jan 1 1970
56 * 0:00:00).
57 */
58 readonly attribute int64_t expireTime;
59 };