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 43 const char* Code() const; 44 // ISO-3166 45 status_t GetIcon(BBitmap* result) const; 46 47 status_t GetAvailableTimeZones( 48 BMessage* timeZones) const; 49 50 class Private; 51 private: 52 friend class Private; 53 54 U_ICU_NAMESPACE::Locale* fICULocale; 55 }; 56 57 58 #endif /* _COUNTRY_H_ */ 59