2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2000-07-22 09:38:43 +04:00
|
|
|
|
|
|
|
#ifndef nsErrorService_h__
|
|
|
|
#define nsErrorService_h__
|
|
|
|
|
2011-11-21 10:21:16 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
|
|
|
|
2000-07-22 09:38:43 +04:00
|
|
|
#include "nsIErrorService.h"
|
|
|
|
#include "nsHashtable.h"
|
|
|
|
|
|
|
|
class nsInt2StrHashtable
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsInt2StrHashtable();
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
nsresult Put(uint32_t key, const char* aData);
|
|
|
|
char* Get(uint32_t key);
|
|
|
|
nsresult Remove(uint32_t key);
|
2000-07-22 09:38:43 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
nsObjectHashtable mHashtable;
|
|
|
|
};
|
|
|
|
|
2011-11-21 10:21:16 +04:00
|
|
|
class nsErrorService MOZ_FINAL : public nsIErrorService
|
2000-07-22 09:38:43 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIERRORSERVICE
|
|
|
|
|
2003-01-09 02:19:20 +03:00
|
|
|
nsErrorService() {}
|
2000-07-22 09:38:43 +04:00
|
|
|
|
2010-06-10 22:11:11 +04:00
|
|
|
static nsresult
|
2000-07-22 09:38:43 +04:00
|
|
|
Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr);
|
|
|
|
|
2004-01-15 09:14:18 +03:00
|
|
|
private:
|
|
|
|
~nsErrorService() {}
|
|
|
|
|
2000-07-22 09:38:43 +04:00
|
|
|
protected:
|
|
|
|
nsInt2StrHashtable mErrorStringBundleURLMap;
|
|
|
|
nsInt2StrHashtable mErrorStringBundleKeyMap;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsErrorService_h__
|