summaryrefslogtreecommitdiffstats
path: root/xpcom/system/nsIBlocklistService.idl
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /xpcom/system/nsIBlocklistService.idl
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'xpcom/system/nsIBlocklistService.idl')
-rw-r--r--xpcom/system/nsIBlocklistService.idl140
1 files changed, 140 insertions, 0 deletions
diff --git a/xpcom/system/nsIBlocklistService.idl b/xpcom/system/nsIBlocklistService.idl
new file mode 100644
index 000000000..b70038431
--- /dev/null
+++ b/xpcom/system/nsIBlocklistService.idl
@@ -0,0 +1,140 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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"
+
+interface nsIPluginTag;
+interface nsIVariant;
+
+[scriptable, uuid(a6dcc76e-9f62-4cc1-a470-b483a1a6f096)]
+interface nsIBlocklistService : nsISupports
+{
+ // Indicates that the item does not appear in the blocklist.
+ const unsigned long STATE_NOT_BLOCKED = 0;
+ // Indicates that the item is in the blocklist but the problem is not severe
+ // enough to warant forcibly blocking.
+ const unsigned long STATE_SOFTBLOCKED = 1;
+ // Indicates that the item should be blocked and never used.
+ const unsigned long STATE_BLOCKED = 2;
+ // Indicates that the item is considered outdated, and there is a known
+ // update available.
+ const unsigned long STATE_OUTDATED = 3;
+ // Indicates that the item is vulnerable and there is an update.
+ const unsigned long STATE_VULNERABLE_UPDATE_AVAILABLE = 4;
+ // Indicates that the item is vulnerable and there is no update.
+ const unsigned long STATE_VULNERABLE_NO_UPDATE = 5;
+
+ /**
+ * Determine if an item is blocklisted
+ * @param addon
+ * The addon item to be checked.
+ * @param appVersion
+ * The version of the application we are checking in the blocklist.
+ * If this parameter is null, the version of the running application
+ * is used.
+ * @param toolkitVersion
+ * The version of the toolkit we are checking in the blocklist.
+ * If this parameter is null, the version of the running toolkit
+ * is used.
+ * @returns true if the item is compatible with this version of the
+ * application or this version of the toolkit, false, otherwise.
+ */
+ boolean isAddonBlocklisted(in jsval addon,
+ [optional] in AString appVersion,
+ [optional] in AString toolkitVersion);
+
+ /**
+ * Determine the blocklist state of an add-on
+ * @param id
+ * The addon item to be checked.
+ * @param appVersion
+ * The version of the application we are checking in the blocklist.
+ * If this parameter is null, the version of the running application
+ * is used.
+ * @param toolkitVersion
+ * The version of the toolkit we are checking in the blocklist.
+ * If this parameter is null, the version of the running toolkit
+ * is used.
+ * @returns The STATE constant.
+ */
+ unsigned long getAddonBlocklistState(in jsval addon,
+ [optional] in AString appVersion,
+ [optional] in AString toolkitVersion);
+
+ /**
+ * Determine the blocklist state of a plugin
+ * @param plugin
+ * The plugin to get the state for
+ * @param appVersion
+ * The version of the application we are checking in the blocklist.
+ * If this parameter is null, the version of the running application
+ * is used.
+ * @param toolkitVersion
+ * The version of the toolkit we are checking in the blocklist.
+ * If this parameter is null, the version of the running toolkit
+ * is used.
+ * @returns The STATE constant.
+ */
+ unsigned long getPluginBlocklistState(in nsIPluginTag plugin,
+ [optional] in AString appVersion,
+ [optional] in AString toolkitVersion);
+
+ /**
+ * Determine the blocklist web page of an add-on.
+ * @param addon
+ * The addon item whose url is required.
+ * @returns The URL of the description page.
+ */
+ AString getAddonBlocklistURL(in jsval addon,
+ [optional] in AString appVersion,
+ [optional] in AString toolkitVersion);
+
+ /**
+ * Determine the blocklist web page of a plugin.
+ * @param plugin
+ * The blocked plugin that we are determining the web page for.
+ * @returns The URL of the description page.
+ */
+ AString getPluginBlocklistURL(in nsIPluginTag plugin);
+
+ /**
+ * Determine the blocklist infoURL of a plugin.
+ * @param plugin
+ * The blocked plugin that we are determining the infoURL for.
+ * @returns The preferred URL to present the user, or |null| if
+ * it is not available.
+ */
+ AString getPluginInfoURL(in nsIPluginTag plugin);
+};
+
+/**
+ * nsIBlocklistPrompt is used, if available, by the default implementation of
+ * nsIBlocklistService to display a confirmation UI to the user before blocking
+ * extensions/plugins.
+ */
+[scriptable, uuid(ba915921-b9c0-400d-8e4f-ca1b80c5699a)]
+interface nsIBlocklistPrompt : nsISupports
+{
+ /**
+ * Prompt the user about newly blocked addons. The prompt is then resposible
+ * for soft-blocking any addons that need to be afterwards
+ *
+ * @param aAddons
+ * An array of addons and plugins that are blocked. These are javascript
+ * objects with properties:
+ * name - the plugin or extension name,
+ * version - the version of the extension or plugin,
+ * icon - the plugin or extension icon,
+ * disable - can be used by the nsIBlocklistPrompt to allows users to decide
+ * whether a soft-blocked add-on should be disabled,
+ * blocked - true if the item is hard-blocked, false otherwise,
+ * item - the nsIPluginTag or Addon object
+ * @param aCount
+ * The number of addons
+ */
+ void prompt([array, size_is(aCount)] in nsIVariant aAddons,
+ [optional] in uint32_t aCount);
+};