2 // Open Service Platform
3 // Copyright (c) 2012 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.
18 * @file FScl_CategoryImpl.h
19 * @brief This is the header file for the %_CategoryImpl class.
21 * This header file contains the declarations of the %_CategoryImpl class.
24 #ifndef _FSCL_INTERNAL_CATEGORY_IMPL_H_
25 #define _FSCL_INTERNAL_CATEGORY_IMPL_H_
29 #include <unique_ptr.h>
30 #include <FBaseObject.h>
32 namespace Tizen { namespace Base {
39 template <typename Type>
43 namespace Tizen { namespace Social
49 * @class _CategoryImpl
54 : public Tizen::Base::Object
58 * This is default constructor.
65 * Copying of objects using this copy constructor is allowed.
69 _CategoryImpl(const _CategoryImpl& rhs);
72 * This destructor overrides Tizen::Base::Object::~Object().
76 virtual ~_CategoryImpl(void);
78 void SetRecordHandle(contacts_record_h recordHandle);
80 contacts_record_h GetRecordHandle(void) const;
82 result AddMember(RecordId contactId);
84 int GetMemberCount(void) const;
86 Tizen::Base::String GetName(void) const;
88 bool HasMember(RecordId contactId) const;
90 result RemoveMember(RecordId contactId);
92 result SetName(const Tizen::Base::String& name);
94 result SetRingtonePath(const Tizen::Base::String& ringtone);
96 Tizen::Base::String GetRingtonePath(void) const;
98 void SetAddressbookId(AddressbookId addressbookId);
100 AddressbookId GetAddressbookId(void) const;
102 result SetThumbnail(const Tizen::Base::String& filePath);
104 Tizen::Base::String GetThumbnailPath(void) const;
106 bool IsDefault(void) const;
108 void SetMemberCount(int memberCount);
110 void SetRecord(const Record& record);
112 void ClearAddedMemberList(void);
114 void ClearRemovedMemberList(void);
116 Tizen::Base::Collection::IListT<int>* GetMembersN(void) const;
118 Tizen::Base::Collection::IListT<int>* GetAddedMembersN(void) const;
120 Tizen::Base::Collection::IListT<int>* GetRemovedMembersN(void) const;
122 result Invalidate(void);
124 static const _CategoryImpl* GetInstance(const Category& category);
126 static _CategoryImpl* GetInstance(Category& category);
129 * Copying of objects using this copy assignment operator is allowed.
133 _CategoryImpl& operator =(const _CategoryImpl& rhs);
136 result LoadMemberList(void);
139 contacts_record_h __recordHandle;
140 bool __hasMemberList;
142 std::unique_ptr< Tizen::Base::Collection::IListT<int> > __pMembers;
143 std::unique_ptr< Tizen::Base::Collection::IListT<int> > __pAddedMembers;
144 std::unique_ptr< Tizen::Base::Collection::IListT<int> > __pRemovedMembers;
149 #endif //_FSCL_INTERNAL_CATEGORY_IMPL_H_