Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /*
2 *******************************************************************************
3 * Copyright (C) 2011-2012, International Business Machines Corporation and *
4 * others. All Rights Reserved. *
5 *******************************************************************************
6 */
7 #ifndef __TZGNAMES_H
8 #define __TZGNAMES_H
10 /**
11 * \file
12 * \brief C API: Time zone generic names classe
13 */
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"
24 U_CDECL_BEGIN
26 typedef enum UTimeZoneGenericNameType {
27 UTZGNM_UNKNOWN = 0x00,
28 UTZGNM_LOCATION = 0x01,
29 UTZGNM_LONG = 0x02,
30 UTZGNM_SHORT = 0x04
31 } UTimeZoneGenericNameType;
33 U_CDECL_END
35 U_NAMESPACE_BEGIN
37 class TimeZone;
38 struct TZGNCoreRef;
40 class U_I18N_API TimeZoneGenericNames : public UMemory {
41 public:
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;
58 private:
59 TimeZoneGenericNames();
60 TZGNCoreRef* fRef;
61 };
63 U_NAMESPACE_END
64 #endif
65 #endif