2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (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
8 // http://floralicense.org/license/
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.
18 * @file CtGroupContactListPresentationModel.h
19 * @brief This is the header file for the GroupContactListPresentationModel class.
22 #ifndef _CT_GROUP_CONTACT_LIST_PRESENTATION_MODEL_H_
23 #define _CT_GROUP_CONTACT_LIST_PRESENTATION_MODEL_H_
27 #include "CtContactListPresentationModel.h"
30 class IContactEventListener;
32 class GroupContactListPresentationModel
33 : public ContactListPresentationModel
36 virtual ~GroupContactListPresentationModel(void);
37 result InitializeGroupContactList(Tizen::Social::RecordId categoryId, GroupContactLaunchType launchType = GROUP_CONTACT_LAUNCH_TYPE_NONE);
39 Tizen::Base::String GetName(int groupIndex, int itemIndex);
40 Tizen::Base::Collection::IList* GetAllPhoneNumbersN(int groupIndex, int itemIndex);
41 Tizen::Base::Collection::IList* GetAllEmailsN(int groupIndex, int itemIndex);
43 Tizen::Base::String GetCategoryName(void);
44 int GetAllContactsCount(void);
46 bool IsCategoryValid(void);
48 result AddContactToCategory(Tizen::Base::Collection::IList* pList);
49 result RemoveContactFromCategory(int groupIndex, int itemIndex);
51 virtual void OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList);
52 virtual void OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList);
54 virtual Tizen::Base::Collection::IList* GetSearchedContactListN(const Tizen::Base::String& searchText, SearchType searchType);
56 static GroupContactListPresentationModel* GetInstance(void);
59 GroupContactListPresentationModel(void);
60 virtual Tizen::Social::Person* GetPersonAt(int groupIndex, int itemIndex);
61 virtual result Construct(void);
62 virtual result CreateContactList(void);
63 virtual result TrimListForAppControl(Tizen::Base::Collection::IList*& pContactList);
64 result TrimListForLaunch(Tizen::Base::Collection::IList*& pContactList);
66 static void CreateInstance(void);
67 static void DestroyInstance(void);
70 Tizen::Social::RecordId __categoryId;
71 GroupContactLaunchType __groupContactLaunchType;
73 static GroupContactListPresentationModel* __pInstance;
76 #endif /* _CT_GROUP_CONTACT_LIST_PRESENTATION_MODEL_H_ */