xref: /haiku/headers/os/locale/Country.h (revision d4e4909c6a3fe4290b78be2b78035c4774e3ff18)
1 /*
2  * Copyright 2003-2019, Haiku, Inc.
3  * Distributed under the terms of the MIT Licence.
4  */
5 #ifndef _COUNTRY_H_
6 #define _COUNTRY_H_
7 
8 
9 #include <List.h>
10 #include <LocaleStrings.h>
11 #include <String.h>
12 #include <SupportDefs.h>
13 
14 
15 class BBitmap;
16 class BLanguage;
17 class BMessage;
18 
19 #ifndef U_ICU_NAMESPACE
20   #define U_ICU_NAMESPACE icu
21 #endif
22 namespace U_ICU_NAMESPACE {
23 	class DateFormat;
24 	class Locale;
25 }
26 
27 
28 class BCountry {
29 public:
30 								BCountry(const char* countryCode = NULL);
31 								BCountry(const BCountry& other);
32 								BCountry& operator=(const BCountry& other);
33 								~BCountry();
34 
35 			status_t			SetTo(const char* countryCode);
36 			status_t			InitCheck() const;
37 
38 			status_t			GetNativeName(BString& name) const;
39 			status_t			GetName(BString& name,
40 									const BLanguage* displayLanguage = NULL
41 									) const;
42 			status_t			GetPreferredLanguage(BLanguage&) const;
43 
44 			const char*			Code() const;
45 									// ISO-3166
46 			status_t			GetIcon(BBitmap* result) const;
47 
48 			status_t			GetAvailableTimeZones(
49 									BMessage* timeZones) const;
50 
51 			class Private;
52 private:
53 	friend	class Private;
54 
55 			U_ICU_NAMESPACE::Locale*		fICULocale;
56 };
57 
58 
59 #endif	/* _COUNTRY_H_ */
60