Fix N_SE-50875 for getOffset of TZ.
[platform/framework/native/appfw.git] / src / locales / FLcl_LocaleData.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file        FLcl_LocaleData.h
19  * @brief       This is the header file for _LocaleData class.
20  */
21 #ifndef _FLCL_INTERNAL_LOCALE_DATA_H_
22 #define _FLCL_INTERNAL_LOCALE_DATA_H_
23
24 // Includes
25 #include <unicode/locid.h>
26 #include <unicode/decimfmt.h>
27 #include <unicode/calendar.h>
28 #include <unicode/gregocal.h>
29 #include <FLclLocale.h>
30 #include <FBaseDateTime.h>
31 #include <FBaseString.h>
32 #include <FBaseColHashMap.h>
33 #include <FBaseColArrayList.h>
34 #include "FLcl_NumberFormatterImpl.h"
35 #include "FLcl_FieldPosition.h"
36
37
38 typedef UParseError IcuUParseError;
39 typedef UDate IcuUDate;
40 typedef UChar IcuUChar;
41
42 typedef U_ICU_NAMESPACE::UnicodeString IcuUnicodeString;
43 typedef U_ICU_NAMESPACE::StringEnumeration IcuStringEnumeration;
44 typedef U_ICU_NAMESPACE::Locale IcuLocale;
45 typedef U_ICU_NAMESPACE::DecimalFormatSymbols IcuDecimalFormatSymbols;
46 typedef U_ICU_NAMESPACE::Calendar IcuCalendar;
47 typedef U_ICU_NAMESPACE::GregorianCalendar IcuGregorianCalendar;
48 typedef U_ICU_NAMESPACE::NumberFormat IcuNumberFormat;
49 typedef U_ICU_NAMESPACE::DecimalFormat IcuDecimalFormat;
50 typedef U_ICU_NAMESPACE::FieldPosition IcuFieldPosition;
51
52 namespace Tizen { namespace Locales
53 {
54
55 /**
56  * @class       _LocaleData
57  * @brief       This class is for loading the @e locale data.
58  * @since       1.0
59  *
60  * _LocaleData is represented locale data which is specific localized.
61  * This class is used by other classed in locale namespace to load the localized data.
62  *
63  */
64
65 class _LocaleData
66         : public Tizen::Base::Object
67 {
68 public:
69         static Tizen::Base::String GetOspString(const IcuUnicodeString& icuStr);
70         static U_ICU_NAMESPACE::UnicodeString GetIcuString(const Tizen::Base::String& ospString);
71
72         static IcuUnicodeString* ConvertOspArrayToIcuStringArrayN(const Tizen::Base::Collection::IList* pIcuStrList, int& count);
73         static Tizen::Base::Collection::ArrayList* ConvertIcuStringArrayToOspArrayN(const IcuUnicodeString* pIcuStrList, int count);
74
75         static IcuUDate GetIcuDate(Tizen::Base::DateTime date);
76         static IcuFieldPosition GetIcuFieldPosition(_FieldPosition pos);
77         static IcuLocale GetIcuLocale(const Tizen::Locales::Locale& ospLocale);
78
79 private:
80         _LocaleData(void);
81         virtual ~_LocaleData(void);
82         _LocaleData(const _LocaleData& localeData);
83         _LocaleData& operator =(const _LocaleData& localeData);
84
85 }; // LocaleData
86
87 }} // Tizen::Locales
88
89 #endif // _FLCL_INTERNAL_LOCALE_DATA_H_
90