1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/icu/source/i18n/tzgnames.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,65 @@ 1.4 +/* 1.5 +******************************************************************************* 1.6 +* Copyright (C) 2011-2012, International Business Machines Corporation and * 1.7 +* others. All Rights Reserved. * 1.8 +******************************************************************************* 1.9 +*/ 1.10 +#ifndef __TZGNAMES_H 1.11 +#define __TZGNAMES_H 1.12 + 1.13 +/** 1.14 + * \file 1.15 + * \brief C API: Time zone generic names classe 1.16 + */ 1.17 + 1.18 +#include "unicode/utypes.h" 1.19 + 1.20 +#if !UCONFIG_NO_FORMATTING 1.21 + 1.22 +#include "unicode/locid.h" 1.23 +#include "unicode/unistr.h" 1.24 +#include "unicode/tzfmt.h" 1.25 +#include "unicode/tznames.h" 1.26 + 1.27 +U_CDECL_BEGIN 1.28 + 1.29 +typedef enum UTimeZoneGenericNameType { 1.30 + UTZGNM_UNKNOWN = 0x00, 1.31 + UTZGNM_LOCATION = 0x01, 1.32 + UTZGNM_LONG = 0x02, 1.33 + UTZGNM_SHORT = 0x04 1.34 +} UTimeZoneGenericNameType; 1.35 + 1.36 +U_CDECL_END 1.37 + 1.38 +U_NAMESPACE_BEGIN 1.39 + 1.40 +class TimeZone; 1.41 +struct TZGNCoreRef; 1.42 + 1.43 +class U_I18N_API TimeZoneGenericNames : public UMemory { 1.44 +public: 1.45 + virtual ~TimeZoneGenericNames(); 1.46 + 1.47 + static TimeZoneGenericNames* createInstance(const Locale& locale, UErrorCode& status); 1.48 + 1.49 + virtual UBool operator==(const TimeZoneGenericNames& other) const; 1.50 + virtual UBool operator!=(const TimeZoneGenericNames& other) const {return !operator==(other);}; 1.51 + virtual TimeZoneGenericNames* clone() const; 1.52 + 1.53 + UnicodeString& getDisplayName(const TimeZone& tz, UTimeZoneGenericNameType type, 1.54 + UDate date, UnicodeString& name) const; 1.55 + 1.56 + UnicodeString& getGenericLocationName(const UnicodeString& tzCanonicalID, UnicodeString& name) const; 1.57 + 1.58 + int32_t findBestMatch(const UnicodeString& text, int32_t start, uint32_t types, 1.59 + UnicodeString& tzID, UTimeZoneFormatTimeType& timeType, UErrorCode& status) const; 1.60 + 1.61 +private: 1.62 + TimeZoneGenericNames(); 1.63 + TZGNCoreRef* fRef; 1.64 +}; 1.65 + 1.66 +U_NAMESPACE_END 1.67 +#endif 1.68 +#endif