2010-08-01 20:28:19 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2003-2010, Haiku, Inc.
|
|
|
|
* Distributed under the terms of the MIT Licence.
|
|
|
|
*/
|
2009-05-01 19:23:59 +00:00
|
|
|
#ifndef _COUNTRY_H_
|
|
|
|
#define _COUNTRY_H_
|
|
|
|
|
|
|
|
|
2010-07-23 16:25:43 +00:00
|
|
|
#include <List.h>
|
2009-05-01 19:23:59 +00:00
|
|
|
#include <LocaleStrings.h>
|
|
|
|
#include <String.h>
|
2010-07-23 16:25:43 +00:00
|
|
|
#include <SupportDefs.h>
|
2009-05-01 19:23:59 +00:00
|
|
|
|
2010-04-15 15:57:30 +00:00
|
|
|
|
|
|
|
class BBitmap;
|
2010-07-22 12:47:00 +00:00
|
|
|
class BMessage;
|
2010-04-15 15:57:30 +00:00
|
|
|
|
2010-07-13 19:04:40 +00:00
|
|
|
namespace icu_44 {
|
2009-09-18 22:23:34 +00:00
|
|
|
class DateFormat;
|
2009-09-20 22:16:30 +00:00
|
|
|
class Locale;
|
2009-09-18 22:23:34 +00:00
|
|
|
}
|
|
|
|
|
2010-07-13 19:04:40 +00:00
|
|
|
|
2009-05-01 19:23:59 +00:00
|
|
|
enum {
|
|
|
|
B_METRIC = 0,
|
|
|
|
B_US
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-05-01 21:56:16 +00:00
|
|
|
class BCountry {
|
2010-08-01 20:28:19 +00: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;
|
|
|
|
|
|
|
|
private:
|
|
|
|
icu_44::Locale* fICULocale;
|
2009-05-01 19:23:59 +00:00
|
|
|
};
|
|
|
|
|
2010-08-01 20:28:19 +00:00
|
|
|
|
2009-05-01 19:23:59 +00:00
|
|
|
#endif /* _COUNTRY_H_ */
|