2010-08-02 00:28:19 +04:00
|
|
|
/*
|
2019-09-20 13:34:29 +03:00
|
|
|
* Copyright 2003-2019, Haiku, Inc.
|
2010-08-02 00:28:19 +04:00
|
|
|
* Distributed under the terms of the MIT Licence.
|
|
|
|
*/
|
2009-05-01 23:23:59 +04:00
|
|
|
#ifndef _COUNTRY_H_
|
|
|
|
#define _COUNTRY_H_
|
|
|
|
|
|
|
|
|
2010-07-23 20:25:43 +04:00
|
|
|
#include <List.h>
|
2009-05-01 23:23:59 +04:00
|
|
|
#include <LocaleStrings.h>
|
|
|
|
#include <String.h>
|
2010-07-23 20:25:43 +04:00
|
|
|
#include <SupportDefs.h>
|
2009-05-01 23:23:59 +04:00
|
|
|
|
2010-04-15 19:57:30 +04:00
|
|
|
|
|
|
|
class BBitmap;
|
2010-10-20 01:36:44 +04:00
|
|
|
class BLanguage;
|
2010-07-22 16:47:00 +04:00
|
|
|
class BMessage;
|
2010-04-15 19:57:30 +04:00
|
|
|
|
2015-05-10 22:13:59 +03:00
|
|
|
#ifndef U_ICU_NAMESPACE
|
|
|
|
#define U_ICU_NAMESPACE icu
|
|
|
|
#endif
|
|
|
|
namespace U_ICU_NAMESPACE {
|
2009-09-19 02:23:34 +04:00
|
|
|
class DateFormat;
|
2009-09-21 02:16:30 +04:00
|
|
|
class Locale;
|
2009-09-19 02:23:34 +04:00
|
|
|
}
|
|
|
|
|
2010-07-13 23:04:40 +04:00
|
|
|
|
2009-05-02 01:56:16 +04:00
|
|
|
class BCountry {
|
2010-08-02 00:28:19 +04:00
|
|
|
public:
|
2010-10-24 16:57:55 +04:00
|
|
|
BCountry(const char* countryCode = NULL);
|
2010-08-02 00:28:19 +04:00
|
|
|
BCountry(const BCountry& other);
|
|
|
|
BCountry& operator=(const BCountry& other);
|
|
|
|
~BCountry();
|
|
|
|
|
2019-09-20 13:34:29 +03:00
|
|
|
status_t SetTo(const char* countryCode);
|
|
|
|
status_t InitCheck() const;
|
|
|
|
|
2010-10-20 01:36:44 +04:00
|
|
|
status_t GetNativeName(BString& name) const;
|
|
|
|
status_t GetName(BString& name,
|
|
|
|
const BLanguage* displayLanguage = NULL
|
|
|
|
) const;
|
|
|
|
|
2010-08-02 00:28:19 +04:00
|
|
|
const char* Code() const;
|
2010-10-24 16:57:55 +04:00
|
|
|
// ISO-3166
|
2010-08-02 00:28:19 +04:00
|
|
|
status_t GetIcon(BBitmap* result) const;
|
|
|
|
|
2010-08-28 13:23:26 +04:00
|
|
|
status_t GetAvailableTimeZones(
|
|
|
|
BMessage* timeZones) const;
|
2010-08-02 00:28:19 +04:00
|
|
|
|
2010-10-20 01:36:44 +04:00
|
|
|
class Private;
|
2010-08-02 00:28:19 +04:00
|
|
|
private:
|
2010-10-20 01:36:44 +04:00
|
|
|
friend class Private;
|
|
|
|
|
2015-05-10 22:13:59 +03:00
|
|
|
U_ICU_NAMESPACE::Locale* fICULocale;
|
2009-05-01 23:23:59 +04:00
|
|
|
};
|
|
|
|
|
2010-08-02 00:28:19 +04:00
|
|
|
|
2009-05-01 23:23:59 +04:00
|
|
|
#endif /* _COUNTRY_H_ */
|