2010-08-02 00:28:19 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2003-2010, Haiku, Inc.
|
|
|
|
* 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-07-22 16:47:00 +04:00
|
|
|
class BMessage;
|
2010-04-15 19:57:30 +04:00
|
|
|
|
2010-07-13 23:04:40 +04:00
|
|
|
namespace icu_44 {
|
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-01 23:23:59 +04:00
|
|
|
enum {
|
|
|
|
B_METRIC = 0,
|
|
|
|
B_US
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-05-02 01:56:16 +04:00
|
|
|
class BCountry {
|
2010-08-02 00:28:19 +04:00
|
|
|
public:
|
|
|
|
BCountry(const char* languageCode,
|
|
|
|
const char* countryCode);
|
|
|
|
BCountry(const char* languageAndCountryCode
|
|
|
|
= "en_US");
|
|
|
|
BCountry(const BCountry& other);
|
|
|
|
BCountry& operator=(const BCountry& other);
|
|
|
|
~BCountry();
|
|
|
|
|
|
|
|
bool GetName(BString& name) const;
|
|
|
|
const char* Code() const;
|
|
|
|
status_t GetIcon(BBitmap* result) const;
|
|
|
|
|
|
|
|
const char* GetLocalizedString(uint32 id) const;
|
|
|
|
|
|
|
|
// measurements
|
|
|
|
|
|
|
|
int8 Measurement() const;
|
|
|
|
|
|
|
|
// timezones
|
|
|
|
|
|
|
|
int GetTimeZones(BList& timezones) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
icu_44::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_ */
|