upload tizen1.0 source
[framework/system/sync-agent.git] / framework / include / Utility / fw_time.h
1 /*
2  * sync-agent-framework
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: JuHak Park <juhaki.park@samsung.com>,
7  *          JuneHyuk Lee <junhyuk7.lee@samsung.com>,
8  *          SunBong Ha <sunbong.ha@samsung.com>
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */
23
24
25
26
27 /*
28  * For any sort of issue you concern as to this software,
29  * you may use following point of contact.
30  * All resources contributed on this software
31  * are orinigally written by S-Core Inc., a member of Samsung Group.
32  *
33  * JungWook Ryu <jungwook.ryu@samsung.com>
34  */
35
36 #ifndef FW_TIME_H_
37 #define FW_TIME_H_
38
39 #include <time.h>
40
41 /**
42  * @file fw_time.h
43  * @brief Provides time manipulation functionality 
44  */
45
46 #define FW_TIME_T       time_t
47
48 #define fw_time(t)                      time(t)
49
50 #define FW_TM                   struct tm
51
52 #define fw_localtime(time) localtime(time)
53
54 #define fw_mktime(tm_time)      mktime(tm_time)
55
56 /**
57  * @brief Convert time stamp in second to UTC time stampĂ 
58  * @param[in]   seconds Time stamp in second
59  * @return UTC time stamp
60  */
61 int FW_Convert_Seconds_To_UTC(int seconds);
62
63 #endif /* FW_TIME_H_ */