Applied latest source code
[apps/native/preloaded/Clock.git] / inc / ClkTimerPresentationModel.h
1 //
2 // Tizen Native SDK
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.1 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18
19 /*
20  * @file                ClkTimerPresentationModel.h
21  * @brief       This header file contains the declarations of the TimerPresentationModel Class.
22  */
23
24 #ifndef CLKTIMERPRESENTATIONMODEL_H_
25 #define CLKTIMERPRESENTATIONMODEL_H_
26
27 class TimerPresentationModel
28 {
29 public:
30         /**
31          * This function returns the instance of TimerPresentationModel
32          *
33          * @return      The instance of TimerPresentationModel
34          */
35         static TimerPresentationModel* GetInstance();
36
37         /**
38          * This function gets the timer value and its status
39          *
40          * @return      No return type
41          * @param               timerValue                              The current Timer value
42          *                              status                                  The status of Timer
43          *                              startTick                               Time at which start button is clicked
44          *                              tempTick                                difference between stopTick and restartTick
45          *                              restartTick                             Time at which restart button is clicked
46          *                              stopTick                                Time at which stop button is clicked
47          *                              userSetValue                    The timer value set by user
48          */
49         void GetTimerValue(Tizen::Base::DateTime& timerValue, Tizen::Base::String& remainingTime, int& status, Tizen::Base::String& startTick, Tizen::Base::String& tempTick, Tizen::Base::String& restartTick, Tizen::Base::String& stopTick, Tizen::Base::String& userSetValue, Tizen::Base::String& registeredValue);
50
51         /**
52          * This function sets the timer value and its status
53          *
54          * @return      No return type
55          * @param               remainingTime                   The remaining time of Timer
56          *                              status                                  The status of Timer
57          *                              startTick                               Time at which start button is clicked
58          *                              tempTick                                difference between stopTick and restartTick
59          *                              restartTick                             Time at which restart button is clicked
60          *                              stopTick                                Time at which stop button is clicked
61          *                              userSetValue                    The timer value set by user
62          */
63         void SetTimerValue(const Tizen::Base::DateTime& remainingTime, int& status, Tizen::Base::String& startTick, Tizen::Base::String& tempTick, Tizen::Base::String& restartTick, Tizen::Base::String& stopTick, Tizen::Base::String& userSetValue, Tizen::Base::String& registeredValue);
64
65         void SetStatus(int& status);
66
67         void SetTimerTime(const Tizen::Base::DateTime& dateTime);
68
69         void SetRegisteredTime(Tizen::Base::DateTime& dateTime);
70
71         void SetFocus(const int& value);
72 private:
73         /**
74          * Default constructor
75          */
76         TimerPresentationModel(void);
77
78         /**
79          * Default destructor
80          */
81         ~TimerPresentationModel(void);
82
83         /**
84          * This function constructs the instance of TimerPresentationModel
85          *
86          */
87         result Construct(void);
88
89         /**
90          * This function creates the instance of TimerPresentationModel
91          *
92          * @return      No return value
93          */
94         static void CreateInstance(void);
95
96         /**
97          * This function destroys the instance of TimerPresentationModel
98          *
99          * @return      No return value
100          */
101         static void DestroyInstance(void);
102
103 private:
104         Tizen::Base::String __focusKey;
105         Tizen::Base::String __nameKey;
106         Tizen::App::AppRegistry* __pAppRegistry;
107         static TimerPresentationModel* __pInstance;
108         Tizen::Base::String __remainingTimeKey;
109         Tizen::Base::String __restartTickKey;
110         Tizen::Base::String __statusKey;
111         Tizen::Base::String __startTickKey;
112         Tizen::Base::String __stopTickKey;
113         Tizen::Base::String __tempTickKey;
114         Tizen::Base::String __userSetValueKey;
115         Tizen::Base::String __registeredValueKey;
116
117 public:
118         Tizen::Base::String userValue;
119 };
120
121 #endif /* CLKTIMERPRESENTATIONMODEL_H_ */