1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is the Blocklist Service.
17 * The Initial Developer of the Original Code is
19 * Portions created by the Initial Developer are Copyright (C) 2007
20 * the Initial Developer. All Rights Reserved.
23 * Michael Wu <flamingice@sourmilk.net> (original author)
25 * Alternatively, the contents of this file may be used under the terms of
26 * either the GNU General Public License Version 2 or later (the "GPL"), or
27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
40 #include
"nsISupports.idl"
42 interface nsIPluginTag
;
44 [scriptable
, uuid(8439f9c0
-da03
-4260-8b21
-dc635eed28fb
)]
45 interface nsIBlocklistService
: nsISupports
47 // Indicates that the item does not appear in the blocklist.
48 const unsigned long STATE_NOT_BLOCKED
= 0;
49 // Indicates that the item is in the blocklist but the problem is not severe
50 // enough to warant forcibly blocking.
51 const unsigned long STATE_SOFTBLOCKED
= 1;
52 // Indicates that the item should be blocked and never used.
53 const unsigned long STATE_BLOCKED
= 2;
54 // Indicates that the item is considered outdated, and there is a known
56 const unsigned long STATE_OUTDATED
= 3;
59 * Determine if an item is blocklisted
65 * The version of the application we are checking in the blocklist.
66 * If this parameter is null, the version of the running application
68 * @param toolkitVersion
69 * The version of the toolkit we are checking in the blocklist.
70 * If this parameter is null, the version of the running toolkit
72 * @returns true if the item is compatible with this version of the
73 * application or this version of the toolkit, false, otherwise.
75 boolean isAddonBlocklisted
(in AString
id, in AString
version,
76 [optional] in AString appVersion
,
77 [optional] in AString toolkitVersion
);
80 * Determine the blocklist state of an add-on
86 * The version of the application we are checking in the blocklist.
87 * If this parameter is null, the version of the running application
89 * @param toolkitVersion
90 * The version of the toolkit we are checking in the blocklist.
91 * If this parameter is null, the version of the running toolkit
93 * @returns The STATE constant.
95 unsigned long getAddonBlocklistState
(in AString
id, in AString
version,
96 [optional] in AString appVersion
,
97 [optional] in AString toolkitVersion
);
100 * Determine the blocklist state of a plugin
102 * The plugin to get the state for
104 * The version of the application we are checking in the blocklist.
105 * If this parameter is null, the version of the running application
107 * @param toolkitVersion
108 * The version of the toolkit we are checking in the blocklist.
109 * If this parameter is null, the version of the running toolkit
111 * @returns The STATE constant.
113 unsigned long getPluginBlocklistState
(in nsIPluginTag plugin
,
114 [optional] in AString appVersion
,
115 [optional] in AString toolkitVersion
);