michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsErrorService_h__ michael@0: #define nsErrorService_h__ michael@0: michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: #include "nsIErrorService.h" michael@0: #include "nsHashtable.h" michael@0: michael@0: class nsInt2StrHashtable michael@0: { michael@0: public: michael@0: nsInt2StrHashtable(); michael@0: michael@0: nsresult Put(uint32_t key, const char* aData); michael@0: char* Get(uint32_t key); michael@0: nsresult Remove(uint32_t key); michael@0: michael@0: protected: michael@0: nsObjectHashtable mHashtable; michael@0: }; michael@0: michael@0: class nsErrorService MOZ_FINAL : public nsIErrorService michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIERRORSERVICE michael@0: michael@0: nsErrorService() {} michael@0: michael@0: static nsresult michael@0: Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr); michael@0: michael@0: private: michael@0: ~nsErrorService() {} michael@0: michael@0: protected: michael@0: nsInt2StrHashtable mErrorStringBundleURLMap; michael@0: }; michael@0: michael@0: #endif // nsErrorService_h__