Update wrt-plugins-common_0.3.53
[framework/web/wrt-plugins-common.git] / src / modules / tizen / DEPRACATED / System / Date.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  * @author       Zbigniew Kostrzewa (z.kostrzewa@samsung.com)
18  */
19
20 #ifndef WRTDEVICEAPIS_SYSTEM_DATE_H_
21 #define WRTDEVICEAPIS_SYSTEM_DATE_H_
22
23 #include <ctime>
24 #include <API/System/IDate.h>
25
26 namespace WrtPlugins {
27 namespace Platform {
28 namespace System {
29 class Date : public Api::System::IDate
30 {
31   public:
32     Date();
33
34     /**
35      * @see WrtPlugins::Api::System::IDate::toString()
36      */
37     std::string toString() const;
38
39     /**
40      * @see WrtPlugins::Api::System::IDate::toString()
41      */
42     std::string toString(const Format& format) const;
43
44   protected:
45     static Format m_defualtFormat; ///< Default format for to string conversion.
46
47   protected:
48     std::time_t m_timestamp; ///< Timestamp, number of seconds since UNIX epoch.
49 };
50 } // System
51 } // Platform
52 } // WrtPlugins
53
54 #endif // WRTDEVICEAPIS_SYSTEM_DATE_H_