Bumping manifests a=b2g-bump
[gecko.git] / intl / locale / nsLanguageAtomService.h
blob0eed94b3b906e52caa0eebb1956122f53cc9206a
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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 "nsCOMPtr.h"
7 #include "nsILanguageAtomService.h"
8 #include "nsIStringBundle.h"
9 #include "nsInterfaceHashtable.h"
10 #include "nsIAtom.h"
11 #include "mozilla/Attributes.h"
13 #define NS_LANGUAGEATOMSERVICE_CID \
14 {0xB7C65853, 0x2996, 0x435E, {0x96, 0x54, 0xDC, 0xC1, 0x78, 0xAA, 0xB4, 0x8C}}
16 class nsLanguageAtomService MOZ_FINAL : public nsILanguageAtomService
18 public:
19 NS_DECL_ISUPPORTS
21 // nsILanguageAtomService
22 virtual nsIAtom*
23 LookupLanguage(const nsACString &aLanguage, nsresult *aError);
25 virtual already_AddRefed<nsIAtom>
26 LookupCharSet(const nsACString& aCharSet);
28 virtual nsIAtom* GetLocaleLanguage(nsresult *aError);
30 virtual nsIAtom* GetLanguageGroup(nsIAtom *aLanguage,
31 nsresult *aError);
33 nsLanguageAtomService();
35 private:
36 ~nsLanguageAtomService() { }
38 protected:
39 nsresult InitLangGroupTable();
41 nsInterfaceHashtable<nsISupportsHashKey, nsIAtom> mLangToGroup;
42 nsCOMPtr<nsIStringBundle> mLangGroups;
43 nsCOMPtr<nsIAtom> mLocaleLanguage;