2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 04:12:37 -07: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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsErrorService_h__
|
|
|
|
#define nsErrorService_h__
|
|
|
|
|
2011-11-20 22:21:16 -08:00
|
|
|
#include "mozilla/Attributes.h"
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsIErrorService.h"
|
|
|
|
#include "nsHashtable.h"
|
|
|
|
|
|
|
|
class nsInt2StrHashtable
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsInt2StrHashtable();
|
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
nsresult Put(uint32_t key, const char* aData);
|
|
|
|
char* Get(uint32_t key);
|
|
|
|
nsresult Remove(uint32_t key);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
protected:
|
|
|
|
nsObjectHashtable mHashtable;
|
|
|
|
};
|
|
|
|
|
2011-11-20 22:21:16 -08:00
|
|
|
class nsErrorService MOZ_FINAL : public nsIErrorService
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIERRORSERVICE
|
|
|
|
|
|
|
|
nsErrorService() {}
|
|
|
|
|
2010-06-10 11:11:11 -07:00
|
|
|
static nsresult
|
2007-03-22 10:30:00 -07:00
|
|
|
Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr);
|
|
|
|
|
|
|
|
private:
|
|
|
|
~nsErrorService() {}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
nsInt2StrHashtable mErrorStringBundleURLMap;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsErrorService_h__
|