2010-07-23 17:19:33 +04:00
|
|
|
/*
|
2011-08-19 02:13:06 +04:00
|
|
|
* Copyright 2010-2011, Haiku, Inc. All rights reserved.
|
2010-07-30 00:10:26 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _TIME_ZONE_H
|
|
|
|
#define _TIME_ZONE_H
|
2010-07-23 17:19:33 +04:00
|
|
|
|
|
|
|
|
2010-07-30 00:10:26 +04:00
|
|
|
#include <String.h>
|
2010-07-23 17:19:33 +04:00
|
|
|
|
|
|
|
|
2015-05-10 22:13:59 +03:00
|
|
|
#ifndef U_ICU_NAMESPACE
|
|
|
|
#define U_ICU_NAMESPACE icu
|
|
|
|
#endif
|
|
|
|
namespace U_ICU_NAMESPACE {
|
2010-08-24 19:03:54 +04:00
|
|
|
class Locale;
|
2010-08-23 19:17:49 +04:00
|
|
|
class TimeZone;
|
|
|
|
}
|
2010-08-24 22:32:59 +04:00
|
|
|
class BLanguage;
|
2010-08-23 19:17:49 +04:00
|
|
|
|
|
|
|
|
2010-07-30 00:10:26 +04:00
|
|
|
class BTimeZone {
|
|
|
|
public:
|
2010-08-24 19:03:54 +04:00
|
|
|
BTimeZone(const char* zoneID = NULL,
|
2010-08-24 22:32:59 +04:00
|
|
|
const BLanguage* language = NULL);
|
2010-08-23 19:17:49 +04:00
|
|
|
BTimeZone(const BTimeZone& other);
|
2010-07-30 00:10:26 +04:00
|
|
|
~BTimeZone();
|
2010-07-23 17:19:33 +04:00
|
|
|
|
2010-08-23 19:17:49 +04:00
|
|
|
BTimeZone& operator=(const BTimeZone& source);
|
|
|
|
|
|
|
|
const BString& ID() const;
|
2010-07-30 00:10:26 +04:00
|
|
|
const BString& Name() const;
|
2010-08-06 01:44:38 +04:00
|
|
|
const BString& DaylightSavingName() const;
|
|
|
|
const BString& ShortName() const;
|
|
|
|
const BString& ShortDaylightSavingName() const;
|
2010-07-30 00:10:26 +04:00
|
|
|
int OffsetFromGMT() const;
|
2010-08-06 01:44:38 +04:00
|
|
|
bool SupportsDaylightSaving() const;
|
2010-07-23 17:19:33 +04:00
|
|
|
|
2010-07-30 00:10:26 +04:00
|
|
|
status_t InitCheck() const;
|
|
|
|
|
2010-08-24 19:03:54 +04:00
|
|
|
status_t SetTo(const char* zoneID,
|
2010-08-24 22:32:59 +04:00
|
|
|
const BLanguage* language = NULL);
|
2010-08-24 19:03:54 +04:00
|
|
|
|
2010-08-24 22:32:59 +04:00
|
|
|
status_t SetLanguage(const BLanguage* language);
|
2010-08-02 00:28:19 +04:00
|
|
|
|
|
|
|
static const char* kNameOfGmtZone;
|
2010-07-23 17:19:33 +04:00
|
|
|
|
2010-08-30 18:30:22 +04:00
|
|
|
class Private;
|
2010-08-02 00:28:19 +04:00
|
|
|
private:
|
2010-08-30 18:30:22 +04:00
|
|
|
friend class Private;
|
|
|
|
|
2015-05-10 22:13:59 +03:00
|
|
|
U_ICU_NAMESPACE::TimeZone* fICUTimeZone;
|
|
|
|
U_ICU_NAMESPACE::Locale* fICULocale;
|
2010-07-30 00:10:26 +04:00
|
|
|
status_t fInitStatus;
|
2010-08-23 19:17:49 +04:00
|
|
|
|
|
|
|
mutable uint32 fInitializedFields;
|
|
|
|
mutable BString fZoneID;
|
|
|
|
mutable BString fName;
|
|
|
|
mutable BString fDaylightSavingName;
|
|
|
|
mutable BString fShortName;
|
|
|
|
mutable BString fShortDaylightSavingName;
|
|
|
|
mutable int fOffsetFromGMT;
|
|
|
|
mutable bool fSupportsDaylightSaving;
|
2010-07-23 17:19:33 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-07-30 00:10:26 +04:00
|
|
|
#endif // _TIME_ZONE_H
|