[SRUK] Initial copy from Tizen 2.2 version
[platform/core/uifw/dali-toolkit.git] / automated-tests / dali-toolkit-test-utils / toolkit-timer.h
1 #ifndef __DALI_TOOLKIT_TOOLKIT_TIMER_H__
2 #define __DALI_TOOLKIT_TOOLKIT_TIMER_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 //     http://floralicense.org/license/
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19
20 // EXTERNAL INCLUDES
21 #include <string>
22
23 // PUBLIC INCLUDES
24 #include <dali/public-api/adaptor-framework/common/timer.h>
25
26 namespace Dali
27 {
28
29 namespace Internal
30 {
31 namespace Adaptor
32 {
33 class Timer;
34
35 }
36 }
37
38 /**
39  * This creates a stubbed Timer so that internal Toolkit Adaptor calls work.
40  */
41 class ToolkitTimer
42 {
43 public: // Constants
44
45 public: // Construction & Destruction
46
47   ToolkitTimer();
48   ~ToolkitTimer();
49
50 public:
51
52   Timer GetTimer();
53
54 public: // Signal Emissions
55
56   Dali::Timer::TimerSignalV2& TickSignal();
57
58 public: // TEST FUNCTIONS
59
60 private:
61
62   Internal::Adaptor::Timer* mTimerStub;
63   friend class Internal::Adaptor::Timer;
64   Timer mTimer; // Hold a handle ourselves.
65 };
66
67 } // namespace Dali
68
69 #endif // __DALI_TOOLKIT_TOOLKIT_TIMER_H__