1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/base/public/nsIPermission.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,59 @@ 1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- 1.5 + * 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#include "nsISupports.idl" 1.11 + 1.12 +[scriptable, uuid(cfb08e46-193c-4be7-a467-d7775fb2a31e)] 1.13 +/** 1.14 + * This interface defines a "permission" object, 1.15 + * used to specify allowed/blocked objects from 1.16 + * user-specified sites (cookies, images etc). 1.17 + */ 1.18 + 1.19 +interface nsIPermission : nsISupports 1.20 +{ 1.21 + /** 1.22 + * The name of the host for which the permission is set 1.23 + */ 1.24 + readonly attribute AUTF8String host; 1.25 + 1.26 + /** 1.27 + * The id of the app for which the permission is set. 1.28 + */ 1.29 + readonly attribute unsigned long appId; 1.30 + 1.31 + /** 1.32 + * Whether the permission has been set to a page inside a browser element. 1.33 + */ 1.34 + readonly attribute boolean isInBrowserElement; 1.35 + 1.36 + /** 1.37 + * a case-sensitive ASCII string, indicating the type of permission 1.38 + * (e.g., "cookie", "image", etc). 1.39 + * This string is specified by the consumer when adding a permission 1.40 + * via nsIPermissionManager. 1.41 + * @see nsIPermissionManager 1.42 + */ 1.43 + readonly attribute ACString type; 1.44 + 1.45 + /** 1.46 + * The permission (see nsIPermissionManager.idl for allowed values) 1.47 + */ 1.48 + readonly attribute uint32_t capability; 1.49 + 1.50 + /** 1.51 + * The expiration type of the permission (session, time-based or none). 1.52 + * Constants are EXPIRE_*, defined in nsIPermissionManager. 1.53 + * @see nsIPermissionManager 1.54 + */ 1.55 + readonly attribute uint32_t expireType; 1.56 + 1.57 + /** 1.58 + * The expiration time of the permission (milliseconds since Jan 1 1970 1.59 + * 0:00:00). 1.60 + */ 1.61 + readonly attribute int64_t expireTime; 1.62 +};