Bug 575870 - Enable the firefox button on xp themed, classic, and aero basic. r=dao...
[mozilla-central.git] / xpcom / system / nsIBlocklistService.idl
blobaebae33fc997aaa8b4a11b6633ba12be0ad038e3
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
13 * License.
15 * The Original Code is the Blocklist Service.
17 * The Initial Developer of the Original Code is
18 * Mozilla Corporation
19 * Portions created by the Initial Developer are Copyright (C) 2007
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
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
55 // update available.
56 const unsigned long STATE_OUTDATED = 3;
58 /**
59 * Determine if an item is blocklisted
60 * @param id
61 * The ID of the item.
62 * @param version
63 * The item's version.
64 * @param appVersion
65 * The version of the application we are checking in the blocklist.
66 * If this parameter is null, the version of the running application
67 * is used.
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
71 * is used.
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);
79 /**
80 * Determine the blocklist state of an add-on
81 * @param id
82 * The ID of the item.
83 * @param version
84 * The item's version.
85 * @param appVersion
86 * The version of the application we are checking in the blocklist.
87 * If this parameter is null, the version of the running application
88 * is used.
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
92 * is used.
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);
99 /**
100 * Determine the blocklist state of a plugin
101 * @param plugin
102 * The plugin to get the state for
103 * @param appVersion
104 * The version of the application we are checking in the blocklist.
105 * If this parameter is null, the version of the running application
106 * is used.
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
110 * is used.
111 * @returns The STATE constant.
113 unsigned long getPluginBlocklistState(in nsIPluginTag plugin,
114 [optional] in AString appVersion,
115 [optional] in AString toolkitVersion);