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