2 *******************************************************************************
3 * Copyright (C) 2011-2012, International Business Machines Corporation and *
4 * others. All Rights Reserved. *
5 *******************************************************************************
12 * \brief C API: Time zone generic names classe
15 #include "unicode/utypes.h"
17 #if !UCONFIG_NO_FORMATTING
19 #include "unicode/locid.h"
20 #include "unicode/unistr.h"
21 #include "unicode/tzfmt.h"
22 #include "unicode/tznames.h"
26 typedef enum UTimeZoneGenericNameType
{
27 UTZGNM_UNKNOWN
= 0x00,
28 UTZGNM_LOCATION
= 0x01,
31 } UTimeZoneGenericNameType
;
40 class U_I18N_API TimeZoneGenericNames
: public UMemory
{
42 virtual ~TimeZoneGenericNames();
44 static TimeZoneGenericNames
* createInstance(const Locale
& locale
, UErrorCode
& status
);
46 virtual UBool
operator==(const TimeZoneGenericNames
& other
) const;
47 virtual UBool
operator!=(const TimeZoneGenericNames
& other
) const {return !operator==(other
);};
48 virtual TimeZoneGenericNames
* clone() const;
50 UnicodeString
& getDisplayName(const TimeZone
& tz
, UTimeZoneGenericNameType type
,
51 UDate date
, UnicodeString
& name
) const;
53 UnicodeString
& getGenericLocationName(const UnicodeString
& tzCanonicalID
, UnicodeString
& name
) const;
55 int32_t findBestMatch(const UnicodeString
& text
, int32_t start
, uint32_t types
,
56 UnicodeString
& tzID
, UTimeZoneFormatTimeType
& timeType
, UErrorCode
& status
) const;
59 TimeZoneGenericNames();