xref: /haiku/headers/private/locale/MutableLocaleRoster.h (revision 220d04022750f40f8bac8f01fa551211e28d04f2)
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 			status_t			UnloadCatalog(BCatalogData* catalogData);
56 
57 			BCatalogData*		CreateCatalog(const char* type,
58 									const char* signature,
59 									const char* language);
60 };
61 
62 
63 }	// namespace BPrivate
64 
65 
66 #endif	// _MUTABLE_LOCALE_ROSTER_H_
67