michael@0: /* michael@0: ******************************************************************************* michael@0: * Copyright (C) 2011-2012, International Business Machines Corporation and * michael@0: * others. All Rights Reserved. * michael@0: ******************************************************************************* michael@0: */ michael@0: #ifndef __TZGNAMES_H michael@0: #define __TZGNAMES_H michael@0: michael@0: /** michael@0: * \file michael@0: * \brief C API: Time zone generic names classe michael@0: */ michael@0: michael@0: #include "unicode/utypes.h" michael@0: michael@0: #if !UCONFIG_NO_FORMATTING michael@0: michael@0: #include "unicode/locid.h" michael@0: #include "unicode/unistr.h" michael@0: #include "unicode/tzfmt.h" michael@0: #include "unicode/tznames.h" michael@0: michael@0: U_CDECL_BEGIN michael@0: michael@0: typedef enum UTimeZoneGenericNameType { michael@0: UTZGNM_UNKNOWN = 0x00, michael@0: UTZGNM_LOCATION = 0x01, michael@0: UTZGNM_LONG = 0x02, michael@0: UTZGNM_SHORT = 0x04 michael@0: } UTimeZoneGenericNameType; michael@0: michael@0: U_CDECL_END michael@0: michael@0: U_NAMESPACE_BEGIN michael@0: michael@0: class TimeZone; michael@0: struct TZGNCoreRef; michael@0: michael@0: class U_I18N_API TimeZoneGenericNames : public UMemory { michael@0: public: michael@0: virtual ~TimeZoneGenericNames(); michael@0: michael@0: static TimeZoneGenericNames* createInstance(const Locale& locale, UErrorCode& status); michael@0: michael@0: virtual UBool operator==(const TimeZoneGenericNames& other) const; michael@0: virtual UBool operator!=(const TimeZoneGenericNames& other) const {return !operator==(other);}; michael@0: virtual TimeZoneGenericNames* clone() const; michael@0: michael@0: UnicodeString& getDisplayName(const TimeZone& tz, UTimeZoneGenericNameType type, michael@0: UDate date, UnicodeString& name) const; michael@0: michael@0: UnicodeString& getGenericLocationName(const UnicodeString& tzCanonicalID, UnicodeString& name) const; michael@0: michael@0: int32_t findBestMatch(const UnicodeString& text, int32_t start, uint32_t types, michael@0: UnicodeString& tzID, UTimeZoneFormatTimeType& timeType, UErrorCode& status) const; michael@0: michael@0: private: michael@0: TimeZoneGenericNames(); michael@0: TZGNCoreRef* fRef; michael@0: }; michael@0: michael@0: U_NAMESPACE_END michael@0: #endif michael@0: #endif