xpcom/system/nsIBlocklistService.idl

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6
michael@0 7 #include "nsISupports.idl"
michael@0 8
michael@0 9 interface nsIPluginTag;
michael@0 10 interface nsIVariant;
michael@0 11
michael@0 12 [scriptable, uuid(d463dfbb-89c4-4553-97af-b4fd8854e161)]
michael@0 13 interface nsIBlocklistService : nsISupports
michael@0 14 {
michael@0 15 // Indicates that the item does not appear in the blocklist.
michael@0 16 const unsigned long STATE_NOT_BLOCKED = 0;
michael@0 17 // Indicates that the item is in the blocklist but the problem is not severe
michael@0 18 // enough to warant forcibly blocking.
michael@0 19 const unsigned long STATE_SOFTBLOCKED = 1;
michael@0 20 // Indicates that the item should be blocked and never used.
michael@0 21 const unsigned long STATE_BLOCKED = 2;
michael@0 22 // Indicates that the item is considered outdated, and there is a known
michael@0 23 // update available.
michael@0 24 const unsigned long STATE_OUTDATED = 3;
michael@0 25 // Indicates that the item is vulnerable and there is an update.
michael@0 26 const unsigned long STATE_VULNERABLE_UPDATE_AVAILABLE = 4;
michael@0 27 // Indicates that the item is vulnerable and there is no update.
michael@0 28 const unsigned long STATE_VULNERABLE_NO_UPDATE = 5;
michael@0 29
michael@0 30 /**
michael@0 31 * Determine if an item is blocklisted
michael@0 32 * @param addon
michael@0 33 * The addon item to be checked.
michael@0 34 * @param appVersion
michael@0 35 * The version of the application we are checking in the blocklist.
michael@0 36 * If this parameter is null, the version of the running application
michael@0 37 * is used.
michael@0 38 * @param toolkitVersion
michael@0 39 * The version of the toolkit we are checking in the blocklist.
michael@0 40 * If this parameter is null, the version of the running toolkit
michael@0 41 * is used.
michael@0 42 * @returns true if the item is compatible with this version of the
michael@0 43 * application or this version of the toolkit, false, otherwise.
michael@0 44 */
michael@0 45 boolean isAddonBlocklisted(in jsval addon,
michael@0 46 [optional] in AString appVersion,
michael@0 47 [optional] in AString toolkitVersion);
michael@0 48
michael@0 49 /**
michael@0 50 * Determine the blocklist state of an add-on
michael@0 51 * @param id
michael@0 52 * The addon item to be checked.
michael@0 53 * @param appVersion
michael@0 54 * The version of the application we are checking in the blocklist.
michael@0 55 * If this parameter is null, the version of the running application
michael@0 56 * is used.
michael@0 57 * @param toolkitVersion
michael@0 58 * The version of the toolkit we are checking in the blocklist.
michael@0 59 * If this parameter is null, the version of the running toolkit
michael@0 60 * is used.
michael@0 61 * @returns The STATE constant.
michael@0 62 */
michael@0 63 unsigned long getAddonBlocklistState(in jsval addon,
michael@0 64 [optional] in AString appVersion,
michael@0 65 [optional] in AString toolkitVersion);
michael@0 66
michael@0 67 /**
michael@0 68 * Determine the blocklist state of a plugin
michael@0 69 * @param plugin
michael@0 70 * The plugin to get the state for
michael@0 71 * @param appVersion
michael@0 72 * The version of the application we are checking in the blocklist.
michael@0 73 * If this parameter is null, the version of the running application
michael@0 74 * is used.
michael@0 75 * @param toolkitVersion
michael@0 76 * The version of the toolkit we are checking in the blocklist.
michael@0 77 * If this parameter is null, the version of the running toolkit
michael@0 78 * is used.
michael@0 79 * @returns The STATE constant.
michael@0 80 */
michael@0 81 unsigned long getPluginBlocklistState(in nsIPluginTag plugin,
michael@0 82 [optional] in AString appVersion,
michael@0 83 [optional] in AString toolkitVersion);
michael@0 84
michael@0 85 /**
michael@0 86 * Determine the blocklist web page of an add-on.
michael@0 87 * @param addon
michael@0 88 * The addon item whose url is required.
michael@0 89 * @returns The URL of the description page.
michael@0 90 */
michael@0 91 AString getAddonBlocklistURL(in jsval addon,
michael@0 92 [optional] in AString appVersion,
michael@0 93 [optional] in AString toolkitVersion);
michael@0 94
michael@0 95 /**
michael@0 96 * Determine the blocklist web page of a plugin.
michael@0 97 * @param plugin
michael@0 98 * The blocked plugin that we are determining the web page for.
michael@0 99 * @returns The URL of the description page.
michael@0 100 */
michael@0 101 AString getPluginBlocklistURL(in nsIPluginTag plugin);
michael@0 102 };
michael@0 103
michael@0 104 /**
michael@0 105 * nsIBlocklistPrompt is used, if available, by the default implementation of
michael@0 106 * nsIBlocklistService to display a confirmation UI to the user before blocking
michael@0 107 * extensions/plugins.
michael@0 108 */
michael@0 109 [scriptable, uuid(ba915921-b9c0-400d-8e4f-ca1b80c5699a)]
michael@0 110 interface nsIBlocklistPrompt : nsISupports
michael@0 111 {
michael@0 112 /**
michael@0 113 * Prompt the user about newly blocked addons. The prompt is then resposible
michael@0 114 * for soft-blocking any addons that need to be afterwards
michael@0 115 *
michael@0 116 * @param aAddons
michael@0 117 * An array of addons and plugins that are blocked. These are javascript
michael@0 118 * objects with properties:
michael@0 119 * name - the plugin or extension name,
michael@0 120 * version - the version of the extension or plugin,
michael@0 121 * icon - the plugin or extension icon,
michael@0 122 * disable - can be used by the nsIBlocklistPrompt to allows users to decide
michael@0 123 * whether a soft-blocked add-on should be disabled,
michael@0 124 * blocked - true if the item is hard-blocked, false otherwise,
michael@0 125 * item - the nsIPluginTag or Addon object
michael@0 126 * @param aCount
michael@0 127 * The number of addons
michael@0 128 */
michael@0 129 void prompt([array, size_is(aCount)] in nsIVariant aAddons,
michael@0 130 [optional] in uint32_t aCount);
michael@0 131 };

mercurial