12774e142SAdrien Destugues /* 245f2f22bSOliver Tappe * Copyright 2010-2011, Haiku, Inc. All rights reserved. 399d2aa98SOliver Tappe * Distributed under the terms of the MIT License. 42774e142SAdrien Destugues */ 599d2aa98SOliver Tappe #ifndef _TIME_ZONE_H 699d2aa98SOliver Tappe #define _TIME_ZONE_H 72774e142SAdrien Destugues 82774e142SAdrien Destugues 999d2aa98SOliver Tappe #include <String.h> 102774e142SAdrien Destugues 112774e142SAdrien Destugues 12*73de5837SJérôme Duval #ifndef U_ICU_NAMESPACE 13*73de5837SJérôme Duval #define U_ICU_NAMESPACE icu 14*73de5837SJérôme Duval #endif 15*73de5837SJérôme Duval namespace U_ICU_NAMESPACE { 163bdedcf3SOliver Tappe class Locale; 17750e57b8SOliver Tappe class TimeZone; 18750e57b8SOliver Tappe } 19aa8372c4SOliver Tappe class BLanguage; 20750e57b8SOliver Tappe 21750e57b8SOliver Tappe 222774e142SAdrien Destugues class BTimeZone { 232774e142SAdrien Destugues public: 243bdedcf3SOliver Tappe BTimeZone(const char* zoneID = NULL, 25aa8372c4SOliver Tappe const BLanguage* language = NULL); 26750e57b8SOliver Tappe BTimeZone(const BTimeZone& other); 272774e142SAdrien Destugues ~BTimeZone(); 282774e142SAdrien Destugues 29750e57b8SOliver Tappe BTimeZone& operator=(const BTimeZone& source); 30750e57b8SOliver Tappe 31750e57b8SOliver Tappe const BString& ID() const; 3299d2aa98SOliver Tappe const BString& Name() const; 33e4da3d66SOliver Tappe const BString& DaylightSavingName() const; 34e4da3d66SOliver Tappe const BString& ShortName() const; 35e4da3d66SOliver Tappe const BString& ShortDaylightSavingName() const; 3699d2aa98SOliver Tappe int OffsetFromGMT() const; 37e4da3d66SOliver Tappe bool SupportsDaylightSaving() const; 3899d2aa98SOliver Tappe 3999d2aa98SOliver Tappe status_t InitCheck() const; 402774e142SAdrien Destugues 413bdedcf3SOliver Tappe status_t SetTo(const char* zoneID, 42aa8372c4SOliver Tappe const BLanguage* language = NULL); 433bdedcf3SOliver Tappe 44aa8372c4SOliver Tappe status_t SetLanguage(const BLanguage* language); 4599d2aa98SOliver Tappe 4638ac8defSOliver Tappe static const char* kNameOfGmtZone; 4738ac8defSOliver Tappe 486e30c4b8SOliver Tappe class Private; 4938ac8defSOliver Tappe private: 506e30c4b8SOliver Tappe friend class Private; 516e30c4b8SOliver Tappe 52*73de5837SJérôme Duval U_ICU_NAMESPACE::TimeZone* fICUTimeZone; 53*73de5837SJérôme Duval U_ICU_NAMESPACE::Locale* fICULocale; 5499d2aa98SOliver Tappe status_t fInitStatus; 55750e57b8SOliver Tappe 56750e57b8SOliver Tappe mutable uint32 fInitializedFields; 57750e57b8SOliver Tappe mutable BString fZoneID; 58750e57b8SOliver Tappe mutable BString fName; 59750e57b8SOliver Tappe mutable BString fDaylightSavingName; 60750e57b8SOliver Tappe mutable BString fShortName; 61750e57b8SOliver Tappe mutable BString fShortDaylightSavingName; 62750e57b8SOliver Tappe mutable int fOffsetFromGMT; 63750e57b8SOliver Tappe mutable bool fSupportsDaylightSaving; 642774e142SAdrien Destugues }; 652774e142SAdrien Destugues 662774e142SAdrien Destugues 6799d2aa98SOliver Tappe #endif // _TIME_ZONE_H 68