Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 /**
9 * nsIErrorService: This is an interim service that allows nsresult codes to be mapped to
10 * string bundles that can be used to look up error messages. String bundle keys can also
11 * be mapped.
12 *
13 * This service will eventually get replaced by extending xpidl to allow errors to be defined.
14 * (http://bugzilla.mozilla.org/show_bug.cgi?id=13423).
15 */
16 [scriptable, uuid(afe1f190-a3c2-11e3-a5e2-0800200c9a66)]
17 interface nsIErrorService : nsISupports
18 {
19 /**
20 * Registers a string bundle URL for an error module. Error modules are obtained from
21 * nsresult code with NS_ERROR_GET_MODULE.
22 */
23 void registerErrorStringBundle(in short errorModule, in string stringBundleURL);
25 /**
26 * Unregisters a string bundle URL for an error module.
27 */
28 void unregisterErrorStringBundle(in short errorModule);
30 /**
31 * Retrieves a string bundle URL for an error module.
32 */
33 string getErrorStringBundle(in short errorModule);
34 };
36 %{C++
38 // The global nsIErrorService:
39 #define NS_ERRORSERVICE_NAME "Error Service"
40 #define NS_ERRORSERVICE_CONTRACTID "@mozilla.org/xpcom/error-service;1"
41 #define NS_ERRORSERVICE_CID \
42 { /* 744afd5e-5f8c-11d4-9877-00c04fa0cf4a */ \
43 0x744afd5e, \
44 0x5f8c, \
45 0x11d4, \
46 {0x98, 0x77, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a} \
47 }
49 %}