2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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 #ifndef _FUI_CTRL_INTERNAL_GALLERY_MODEL_H_
18 #define _FUI_CTRL_INTERNAL_GALLERY_MODEL_H_
20 #include <FBaseObject.h>
21 #include "FUiCtrl_ListViewModel.h"
23 namespace Tizen { namespace Ui { namespace Controls {
26 class _IGalleryItemProvider;
27 class _GalleryItemProviderAdaptor;
30 : public Tizen::Base::Object
33 virtual ~_GalleryModel(void);
35 static _GalleryModel* CreateGalleryModelN(_IGalleryItemProvider& galleryItemProvider);
37 result RegisterItemProviderAdaptor(_GalleryItemProviderAdaptor* pGalleryItemProviderAdaptor);
39 _GalleryItem* GetItem(int index) const;
40 result SetItemProvider(_IGalleryItemProvider& provider);
41 int GetItemCount(void) const;
42 int GetItemCountFromProvider(void) const;
43 void UpdateItemCount(void);
45 result RequestToLoadItem(int index);
46 result RequestToUnloadItem(int index);
47 result RequestToUnloadAllItems(void);
48 result RequestToUpdateItem(int itemIndex);
49 result RequestToUpdateAllItems(void);
50 result SetCacheSize(int size);
51 int GetCacheSize(void) const;
53 result AddGroup(void);
59 _GalleryModel(const _GalleryModel& rhs);
60 _GalleryModel& operator=(const _GalleryModel& rhs);
63 _ListViewModel __listViewModel;
64 _GalleryItemProviderAdaptor* __pGalleryItemProviderAdaptor;
68 }}} // Tizen::Ui::Controls
70 #endif // _FUI_CTRL_INTERNAL_GALLERY_MODEL_H_