2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.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
9 // http://www.apache.org/licenses/LICENSE-2.0/
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.
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"
27 namespace Tizen { namespace Ui { namespace Controls {
29 _GalleryItemProvider::_GalleryItemProvider(_GalleryCoreEvent& coreEvent, _GalleryItemProviderAdaptorImpl* pGalleryItemProviderAdaptor)
30 : __coreEvent(coreEvent)
31 , __pItemProviderAdaptor(pGalleryItemProviderAdaptor)
36 _GalleryItemProvider::~_GalleryItemProvider(void)
42 _GalleryItemProvider::CreateItem(int index)
44 _GalleryItem* pItem = __pItemProviderAdaptor->CreateItem(index);
46 SetLastResult(E_SUCCESS);
51 _GalleryItemProvider::DeleteItem(int index, _GalleryItem* pItem)
53 SetLastResult(E_SUCCESS);
54 return __pItemProviderAdaptor->DeleteItem(index, pItem);
58 _GalleryItemProvider::UnloadItem(int index, _GalleryItem* pItem)
60 SetLastResult(E_SUCCESS);
61 return __pItemProviderAdaptor->UnloadItem(index, pItem);
65 _GalleryItemProvider::GetItemCount(void) const
67 SetLastResult(E_SUCCESS);
68 return __pItemProviderAdaptor->GetItemCount();
71 }}} // Tizen::Ui::Controls