gecko-dev/intl/icu/source/i18n/tzgnames.h
Norbert Lindenberg c0b65e4a8f Bug 724531 - Import ICU library into the mozilla tree. r=dmandelin for importing the ICU sources
--HG--
extra : rebase_source : 2561787b6f9ae3dc626cb6bf76e6f78f6cd15664
2013-03-01 20:58:49 -08:00

66 lines
1.8 KiB
C++

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