Revert " modify license, permission and remove ^M char"
[framework/osp/uifw.git] / src / ui / controls / FUiCtrl_GalleryItemProvider.cpp
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (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 #include <FBaseErrors.h>
18 #include <FGrpRectangle.h>
19 #include <FBaseSysLog.h>
20 #include "FUiCtrl_GalleryItemProvider.h"
21 #include "FUiCtrl_GalleryCoreEvent.h"
22 #include "FUiCtrl_GalleryCoreEventArg.h"
23 #include "FUiCtrl_GalleryItem.h"
24 #include "FUiCtrl_GalleryItemProviderAdaptorImpl.h"
25 #include "FUiCtrl_GalleryBitmap.h"
26
27 namespace Tizen { namespace Ui { namespace Controls {
28
29 _GalleryItemProvider::_GalleryItemProvider(_GalleryCoreEvent& coreEvent, _GalleryItemProviderAdaptorImpl* pGalleryItemProviderAdaptor)
30         : __coreEvent(coreEvent)
31         , __pItemProviderAdaptor(pGalleryItemProviderAdaptor)
32 {
33         // Do nothing.
34 }
35
36 _GalleryItemProvider::~_GalleryItemProvider(void)
37 {
38         // Do nothing.
39 }
40
41 _GalleryItem*
42 _GalleryItemProvider::CreateItem(int index)
43 {
44         _GalleryItem* pItem = __pItemProviderAdaptor->CreateItem(index);
45
46         SetLastResult(E_SUCCESS);
47         return pItem;
48 }
49
50 bool
51 _GalleryItemProvider::DeleteItem(int index, _GalleryItem* pItem)
52 {
53         SetLastResult(E_SUCCESS);
54         return __pItemProviderAdaptor->DeleteItem(index, pItem);
55 }
56
57 bool
58 _GalleryItemProvider::UnloadItem(int index, _GalleryItem* pItem)
59 {
60         SetLastResult(E_SUCCESS);
61         return __pItemProviderAdaptor->UnloadItem(index, pItem);
62 }
63
64 int
65 _GalleryItemProvider::GetItemCount(void) const
66 {
67         SetLastResult(E_SUCCESS);
68         return __pItemProviderAdaptor->GetItemCount();
69 }
70
71 }}} // Tizen::Ui::Controls