delete progress bar implementation
[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
22 #ifndef __GL_TIMER_BASE_H_
23 #define __GL_TIMER_BASE_H_
24
25 #include <FBase.h>
26 #include <FContent.h>
27 #include "GlFileOpInvalidateListener.h"
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         void SetActionMode(enum FileActionMode actionId);
47
48         virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
49
50         virtual void OnTimerExpired(Timer& timer);
51
52 protected:
53         virtual Tizen::Base::Collection::IList * TimerStart(void) = 0;
54         virtual result TimerExpired(const ContentId&) = 0;
55         virtual void TimerCancel(int, enum FileActionCancelRes res) = 0;
56         virtual void TimerComplete(int, enum FileActionCompleteRes res) = 0;
57
58 private:
59         void OnOpComplete(enum FileActionCompleteRes);
60         void OnOpCancelled(enum FileActionCancelRes res);
61
62 private:
63         Timer __moveTimer;
64         Tizen::Base::Collection::IList * __pContentIdList;
65         int __moveToCount;
66         GlProgressBar* __pMoveProBar;
67         IFileOpInvalidateListener* __pInvalidate;
68         enum FileActionMode __actionId;
69  };
70
71 #endif //__GL_TIMER_BASE_H_