Git Init
[profile/ivi/wrt-plugins-tizen.git] / src / platform / Tizen / TimeUtil / TimeUtilTools.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
19
20 #ifndef _TIMEUTILTOOLS_H_
21 #define _TIMEUTILTOOLS_H_
22
23 #include <unicode/unistr.h>
24 #include <unicode/timezone.h>
25 #include <unicode/calendar.h>
26 #include <ctime>
27
28 namespace TizenApis {
29 namespace Platform {
30 namespace TimeUtil {
31
32 #define MILLISTOSEC 1000
33
34 class TimeUtilTools 
35 {
36
37     public:
38                 TimeUtilTools() {}
39         virtual  ~TimeUtilTools() {}
40         UChar* uastrcpy(const char *chars);
41         char* strtoutf8(const UChar* unichars);
42         long tolong(const int32_t num);
43         int32_t toint32_t(const long long num);
44         int32_t toint32_t(const long num);
45         int32_t toint32_t(const int num);
46         UnicodeString *toUnicodeString(const std::string str);
47         std::string toString(UnicodeString uniStr);
48         TimeZone *makeTimeZone(const std::string &name);
49         void printDate(Calendar *cal);
50
51 };
52
53 }
54 }
55 }
56
57 #endif /* _TIMEUTILTOOLS_H_ */