1b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho/*
2b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho*******************************************************************************
3b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho* Copyright (C) 2011, International Business Machines Corporation and         *
4b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho* others. All Rights Reserved.                                                *
5b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho*******************************************************************************
6b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho*/
7b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho#ifndef __TZNAMES_H
8b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho#define __TZNAMES_H
9b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
10b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho/**
11b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho * \file
12b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho * \brief C API: Time zone names class
13b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho */
14b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho#include "unicode/utypes.h"
15b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
16b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho#if !UCONFIG_NO_FORMATTING
17b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
18b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho#include "unicode/uloc.h"
19b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho#include "unicode/unistr.h"
20b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
21b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CDECL_BEGIN
22b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
23b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehotypedef enum UTimeZoneNameType {
24b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    UTZNM_UNKNOWN           = 0x00,
25b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    UTZNM_LONG_GENERIC      = 0x01,
26b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    UTZNM_LONG_STANDARD     = 0x02,
27b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    UTZNM_LONG_DAYLIGHT     = 0x04,
28b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    UTZNM_SHORT_GENERIC     = 0x08,
29b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    UTZNM_SHORT_STANDARD    = 0x10,
30b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    UTZNM_SHORT_DAYLIGHT    = 0x20,
31b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    UTZNM_SHORT_STANDARD_COMMONLY_USED  = 0x40,
32b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    UTZNM_SHORT_DAYLIGHT_COMMONLY_USED  = 0x80
33b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho} UTimeZoneNameType;
34b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
35b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_CDECL_END
36b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
37b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_NAMESPACE_BEGIN
38b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
39b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoclass U_I18N_API TimeZoneNameMatchInfo : public UMemory {
40b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehopublic:
41b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    virtual ~TimeZoneNameMatchInfo();
42b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
43b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    virtual int32_t size() const = 0;
44b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    virtual UTimeZoneNameType getNameType(int32_t index) const = 0;
45b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    virtual int32_t getMatchLength(int32_t index) const = 0;
46b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    virtual UnicodeString& getTimeZoneID(int32_t index, UnicodeString& tzID) const = 0;
47b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    virtual UnicodeString& getMetaZoneID(int32_t index, UnicodeString& mzID) const = 0;
48b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho};
49b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
50b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoinline
51b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoTimeZoneNameMatchInfo::~TimeZoneNameMatchInfo() {
52b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho}
53b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
54b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoclass U_I18N_API TimeZoneNames : public UMemory {
55b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehopublic:
56b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    virtual ~TimeZoneNames();
57b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
58b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    static TimeZoneNames* U_EXPORT2 createInstance(const Locale& locale, UErrorCode& status);
59b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
60b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    virtual StringEnumeration* getAvailableMetaZoneIDs(UErrorCode& status) const = 0;
61b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    virtual StringEnumeration* getAvailableMetaZoneIDs(const UnicodeString& tzID, UErrorCode& status) const = 0;
62b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
63b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    virtual UnicodeString& getMetaZoneID(const UnicodeString& tzID, UDate date, UnicodeString& mzID) const = 0;
64b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    virtual UnicodeString& getReferenceZoneID(const UnicodeString& mzID, const char* region, UnicodeString& tzID) const = 0;
65b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
66b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    virtual UnicodeString& getMetaZoneDisplayName(const UnicodeString& mzID, UTimeZoneNameType type, UnicodeString& name) const = 0;
67b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    virtual UnicodeString& getTimeZoneDisplayName(const UnicodeString& tzID, UTimeZoneNameType type, UnicodeString& name) const = 0;
68b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
69b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    virtual UnicodeString& getExemplarLocationName(const UnicodeString& tzID, UnicodeString& name) const;
70b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    virtual UnicodeString& getDisplayName(const UnicodeString& tzID, UTimeZoneNameType type, UDate date, UnicodeString& name) const;
71b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
72b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho    virtual TimeZoneNameMatchInfo* find(const UnicodeString& text, int32_t start, uint32_t types, UErrorCode& status) const = 0;
73b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho};
74b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
75b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoinline
76b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoTimeZoneNames::~TimeZoneNames() {
77b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho}
78b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho
79b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2clairehoU_NAMESPACE_END
80b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho#endif
81b26ce3a7367e4ed2ee7ddddcdc3f3d3377a455c2claireho#endif
82