haiku/headers/os/locale/TimeZone.h
Jérôme Duval 73de58376a Update icu x86_64 package with namespace renaming enabled.
"Renaming" means the icu namespace is suffixed with the version number,
atm icu_55. Using "renaming" allows to use two different versions of ICU,
thus easing upgrades. For instance haikuwebkit uses a current version of ICU,
while the system uses a newer one after an upgrade.

* Replace all uses of the icu namespace in our public headers, with a macro
defaulting to icu. As the namespace is only used for private fields pointers,
there should be no impact.
* Locale kit *.cpp have to import the macro from <unicode/uversion.h> *before*
including any locale headers. Ditto for a Time preferences cpp file. This way,
the correct current icu namespace is referenced.
* Fixes bug #12057.
2015-05-10 21:52:36 +02:00

68 lines
1.5 KiB
C++

/*
* Copyright 2010-2011, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _TIME_ZONE_H
#define _TIME_ZONE_H
#include <String.h>
#ifndef U_ICU_NAMESPACE
#define U_ICU_NAMESPACE icu
#endif
namespace U_ICU_NAMESPACE {
class Locale;
class TimeZone;
}
class BLanguage;
class BTimeZone {
public:
BTimeZone(const char* zoneID = NULL,
const BLanguage* language = NULL);
BTimeZone(const BTimeZone& other);
~BTimeZone();
BTimeZone& operator=(const BTimeZone& source);
const BString& ID() const;
const BString& Name() const;
const BString& DaylightSavingName() const;
const BString& ShortName() const;
const BString& ShortDaylightSavingName() const;
int OffsetFromGMT() const;
bool SupportsDaylightSaving() const;
status_t InitCheck() const;
status_t SetTo(const char* zoneID,
const BLanguage* language = NULL);
status_t SetLanguage(const BLanguage* language);
static const char* kNameOfGmtZone;
class Private;
private:
friend class Private;
U_ICU_NAMESPACE::TimeZone* fICUTimeZone;
U_ICU_NAMESPACE::Locale* fICULocale;
status_t fInitStatus;
mutable uint32 fInitializedFields;
mutable BString fZoneID;
mutable BString fName;
mutable BString fDaylightSavingName;
mutable BString fShortName;
mutable BString fShortDaylightSavingName;
mutable int fOffsetFromGMT;
mutable bool fSupportsDaylightSaving;
};
#endif // _TIME_ZONE_H