Fix AppControl spec
[apps/osp/Gallery.git] / inc / GlTimerBase.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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  * @file                GlTimerBase.h
19  * @brief               This is the header file for GlTimerBase class.
20  */
21 #ifndef __GL_TIMER_BASE_H_
22 #define __GL_TIMER_BASE_H_
23
24 #include <FBase.h>
25 #include <FContent.h>
26 #include "GlFileOpInvalidateListener.h"
27
28
29 using namespace Tizen::Base;
30 using namespace Tizen::Base::Runtime;
31 using namespace Tizen::Content;
32
33 class GlProgressBar;
34
35 class GlTimerBase
36         :public Tizen::Ui::IActionEventListener
37         , public ITimerEventListener
38  {
39         public:
40
41         GlTimerBase(IFileOpInvalidateListener*, enum FileActionMode actionId);
42         virtual ~GlTimerBase(void);
43
44         bool StartTimer(void);
45         void CancelTimer(void);
46
47         //From IActionEventListener
48         void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
49
50         //From ITimerEventListener
51         void OnTimerExpired(Timer& timer);
52
53         protected:
54         virtual Tizen::Base::Collection::IList * TimerStart(void) = 0;
55         virtual result TimerExpired(const ContentId&) = 0;
56         virtual void TimerCancel(int, enum FileActionCancelRes res) = 0;
57         virtual void TimerComplete(int, enum FileActionCompleteRes res) = 0;
58
59
60         private:
61         void OnOpComplete(enum FileActionCompleteRes);
62         void OnOpCancelled(enum FileActionCancelRes res);
63
64
65         private:
66         Timer __moveTimer;
67         Tizen::Base::Collection::IList * __pContentIdList;
68         int __moveToCount;
69         GlProgressBar* __pMoveProBar;
70         IFileOpInvalidateListener* __pInvalidate;
71         enum FileActionMode __actionId;
72
73  };
74
75
76 #endif //__GL_TIMER_BASE_H_