2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (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://www.apache.org/licenses/LICENSE-2.0
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.
17 * @file FScl_PersonImpl.h
18 * @brief This is the header file for the %_PersonImpl class.
20 * This header file contains the declarations of the %_PersonImpl class.
22 #ifndef _FSCL_PERSON_IMPL_H_
23 #define _FSCL_PERSON_IMPL_H_
25 #include <unique_ptr.h>
27 #include <FBaseObject.h>
28 #include <FSclRecord.h>
30 namespace Tizen { namespace Base
36 template<typename Type>
39 template<typename Type>
45 namespace Tizen { namespace Graphics
50 namespace Tizen { namespace Social
56 class _OSP_EXPORT_ _PersonImpl
57 : public Tizen::Base::Object
62 virtual ~_PersonImpl(void);
64 virtual bool Equals(const Tizen::Base::Object& rhs) const;
66 virtual int GetHashCode(void) const;
69 void SetId(int personId);
71 void SetDisplayName(const Tizen::Base::String& displayName);
73 void SetThumbnailPath(const Tizen::Base::String& thumbnailPath);
75 void SetRingtonePath(const Tizen::Base::String& ringtonePath);
77 void SetHasPhoneNumber(bool hasPhoneNumber);
79 void SetHasEmail(bool hasEmail);
81 void SetIsFavorite(bool isFavorite);
83 void SetAddressbookIdString(const Tizen::Base::String& addressbookIdString);
86 Tizen::Base::String GetDisplayName(void) const;
88 Tizen::Base::String GetThumbnailPath(void) const;
90 Tizen::Base::String GetRingtonePath(void) const;
92 bool HasPhoneNumber(void) const;
94 bool HasEmail(void) const;
96 bool IsFavorite(void) const;
98 Tizen::Base::Collection::IListT<AccountId>* GetAccountIdsN(void) const;
100 PersonId GetId(void) const;
102 result SetAsFavorite(bool isFavorite);
104 result SetAsPrimaryPhoneNumber(const PhoneNumber& phoneNumber);
106 result SetAsPrimaryEmail(const Email& email);
108 PhoneNumber GetPrimaryPhoneNumber(void) const;
110 Email GetPrimaryEmail(void) const;
112 static _PersonImpl* GetInstance(Person& person);
114 static const _PersonImpl* GetInstance(const Person& person);
117 _PersonImpl(const _PersonImpl& rhs);
119 _PersonImpl& operator =(const _PersonImpl& rhs);
123 bool __hasPhoneNumber;
129 Tizen::Base::String __displayName;
130 Tizen::Base::String __thumbnailPath;
131 Tizen::Base::String __ringtonePath;
132 Tizen::Base::String __addressbookIdString;
133 mutable std::unique_ptr<Tizen::Base::Collection::ArrayListT<AccountId> > __pAccountIds;
135 friend class _AddressbookManagerImpl;
140 #endif // _FSCL_PERSON_IMPL_H_