xref: /haiku/headers/private/locale/MutableLocaleRoster.h (revision 899e0ef82b5624ace2ccfa5f5a58c8ebee54aaef)
1 /*
2  * Copyright 2010-2012, Haiku. All rights reserved.
3  * Distributed under the terms of the MIT license.
4  */
5 #ifndef _MUTABLE_LOCALE_ROSTER_H_
6 #define _MUTABLE_LOCALE_ROSTER_H_
7 
8 
9 #include <Collator.h>
10 #include <FormattingConventions.h>
11 #include <image.h>
12 #include <Language.h>
13 #include <List.h>
14 #include <Locale.h>
15 #include <Locker.h>
16 #include <LocaleRoster.h>
17 #include <Message.h>
18 #include <Resources.h>
19 #include <TimeZone.h>
20 
21 
22 class BLocale;
23 class BCatalog;
24 class BCatalogData;
25 
26 struct entry_ref;
27 
28 
29 namespace BPrivate {
30 
31 
32 class MutableLocaleRoster : public BLocaleRoster {
33 public:
34 								MutableLocaleRoster();
35 								~MutableLocaleRoster();
36 
37 	static	MutableLocaleRoster* Default();
38 
39 			status_t			SetDefaultFormattingConventions(
40 									const BFormattingConventions& conventions);
41 			status_t			SetDefaultTimeZone(const BTimeZone& zone);
42 
43 			status_t			SetPreferredLanguages(const BMessage* message);
44 									// the message contains one or more
45 									// 'language'-string-fields which
46 									// contain the language-name(s)
47 			status_t			SetFilesystemTranslationPreferred(
48 									bool preferred);
49 
50 			status_t			LoadSystemCatalog(BCatalog* catalog) const;
51 
52 			BCatalogData*		LoadCatalog(const entry_ref& catalogOwner,
53 									const char* language = NULL,
54 									int32 fingerprint = 0) const;
55 			BCatalogData*		LoadCatalog(const char* signature,
56 									const char* language = NULL) const;
57 			status_t			UnloadCatalog(BCatalogData* catalogData);
58 
59 			BCatalogData*		CreateCatalog(const char* type,
60 									const char* signature,
61 									const char* language);
62 };
63 
64 
65 }	// namespace BPrivate
66 
67 
68 #endif	// _MUTABLE_LOCALE_ROSTER_H_
69