Initialize Tizen 2.3
[apps/osp/MusicPlayer.git] / inc / MpThumbnailBase.h
1 //\r
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.\r
3 //\r
4 // Licensed under the Flora License, Version 1.1 (the License);\r
5 // you may not use this file except in compliance with the License.\r
6 // You may obtain a copy of the License at\r
7 //\r
8 //     http://floralicense.org/license/\r
9 //\r
10 // Unless required by applicable law or agreed to in writing, software\r
11 // distributed under the License is distributed on an AS IS BASIS,\r
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13 // See the License for the specific language governing permissions and\r
14 // limitations under the License.\r
15 //\r
16 \r
17 /**\r
18  * @file                MpThumbnailBase.h\r
19  * @brief               This is the header file for ThumbnailBase class.\r
20  */\r
21 \r
22 #ifndef _MP_THUMBNAIL_BASE_H_\r
23 #define _MP_THUMBNAIL_BASE_H_\r
24 \r
25 #include <FBase.h>\r
26 #include <FContent.h>\r
27 #include <FGraphics.h>\r
28 #include "MpThumbnailEvent.h"\r
29 #include "MpThumbnailEventListener.h"\r
30 \r
31 class ThumbnailInfo;\r
32 class IThumbnailProviderHandler;\r
33 \r
34 class ThumbnailBase\r
35         : public IThumbnailEventListener\r
36 {\r
37 public:\r
38         ThumbnailBase(void);\r
39         virtual ~ThumbnailBase(void);\r
40 \r
41         result Construct(void);\r
42         void Stop(void);\r
43         void RequestThumbnail(const Tizen::Content::ContentId& contentId, Tizen::Base::Object* pParam = null) const;\r
44         void CancelAllThumbnailRequest(void);\r
45         const Tizen::Graphics::Bitmap* GetDefaultThumbnail(void) const;\r
46 \r
47         virtual void OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo) = 0;\r
48 \r
49 private:\r
50         void SetThumbnailEventListner(void);\r
51         void RemoveThumbnailEventListner(void);\r
52         ThumbnailInfo* GetThumbnailInfo(Tizen::Base::Runtime::IEventArg& eventArg);\r
53 \r
54         void OnThumbnailReceivedN(Tizen::Base::Runtime::IEventArg& eventArg);\r
55 \r
56 private:\r
57         IThumbnailProviderHandler* __pIThumbnailProviderHandler;\r
58         ThumbnailEvent* __pThumbnailEvent;\r
59         bool __isForceStop;\r
60 };\r
61 \r
62 #endif // _MP_THUMBNAIL_BASE_H_\r