netwerk/base/nsIPermission.idl
author James Kitchener <jkitch.bug@internode.on.net>
Tue, 20 Jan 2015 03:58:00 -0500
changeset 253625 4ec37503ea6a752baf92e053ede5f0ff7750ff36
parent 109485 netwerk/base/public/nsIPermission.idl@789055abc89d6f8ec91ac54b4c46c5c836829880
child 286169 cf498d466b85edd8067efafa2cffd3f5beb33747
permissions -rw-r--r--
Bug 1100184 - Flatten netwerk/base/{public,src}/ directories. r=mcmanus, r=poiru

/* -*- 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;
};