2010-07-23 17:19:33 +04:00
|
|
|
/*
|
2010-07-30 00:10:26 +04:00
|
|
|
* Copyright 2010, Haiku, Inc. All rights reserved.
|
|
|
|
* 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
|
|
|
|
|
|
|
|
2010-08-23 19:17:49 +04:00
|
|
|
namespace icu_44 {
|
2010-08-24 19:03:54 +04:00
|
|
|
class Locale;
|
2010-08-23 19:17:49 +04:00
|
|
|
class TimeZone;
|
|
|
|
}
|
2010-08-24 19:03:54 +04:00
|
|
|
class BLocale;
|
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,
|
|
|
|
const BLocale* locale = 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,
|
|
|
|
const BLocale* locale = NULL);
|
|
|
|
|
|
|
|
status_t SetLocale(const BLocale* locale);
|
2010-08-02 00:28:19 +04:00
|
|
|
|
|
|
|
static const char* kNameOfGmtZone;
|
2010-07-23 17:19:33 +04:00
|
|
|
|
2010-08-02 00:28:19 +04:00
|
|
|
private:
|
2010-08-23 19:17:49 +04:00
|
|
|
icu_44::TimeZone* fIcuTimeZone;
|
2010-08-24 19:03:54 +04:00
|
|
|
icu_44::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
|