xpcom/base/nsIErrorService.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #include "nsISupports.idl"
michael@0 7
michael@0 8 /**
michael@0 9 * nsIErrorService: This is an interim service that allows nsresult codes to be mapped to
michael@0 10 * string bundles that can be used to look up error messages. String bundle keys can also
michael@0 11 * be mapped.
michael@0 12 *
michael@0 13 * This service will eventually get replaced by extending xpidl to allow errors to be defined.
michael@0 14 * (http://bugzilla.mozilla.org/show_bug.cgi?id=13423).
michael@0 15 */
michael@0 16 [scriptable, uuid(afe1f190-a3c2-11e3-a5e2-0800200c9a66)]
michael@0 17 interface nsIErrorService : nsISupports
michael@0 18 {
michael@0 19 /**
michael@0 20 * Registers a string bundle URL for an error module. Error modules are obtained from
michael@0 21 * nsresult code with NS_ERROR_GET_MODULE.
michael@0 22 */
michael@0 23 void registerErrorStringBundle(in short errorModule, in string stringBundleURL);
michael@0 24
michael@0 25 /**
michael@0 26 * Unregisters a string bundle URL for an error module.
michael@0 27 */
michael@0 28 void unregisterErrorStringBundle(in short errorModule);
michael@0 29
michael@0 30 /**
michael@0 31 * Retrieves a string bundle URL for an error module.
michael@0 32 */
michael@0 33 string getErrorStringBundle(in short errorModule);
michael@0 34 };
michael@0 35
michael@0 36 %{C++
michael@0 37
michael@0 38 // The global nsIErrorService:
michael@0 39 #define NS_ERRORSERVICE_NAME "Error Service"
michael@0 40 #define NS_ERRORSERVICE_CONTRACTID "@mozilla.org/xpcom/error-service;1"
michael@0 41 #define NS_ERRORSERVICE_CID \
michael@0 42 { /* 744afd5e-5f8c-11d4-9877-00c04fa0cf4a */ \
michael@0 43 0x744afd5e, \
michael@0 44 0x5f8c, \
michael@0 45 0x11d4, \
michael@0 46 {0x98, 0x77, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a} \
michael@0 47 }
michael@0 48
michael@0 49 %}

mercurial