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_PersonImpl.h
19 * @brief This is the header file for the %_PersonImpl class.
21 * This header file contains the declarations of the %_PersonImpl class.
23 #ifndef _FSCL_PERSON_IMPL_H_
24 #define _FSCL_PERSON_IMPL_H_
26 #include <unique_ptr.h>
28 #include <FBaseObject.h>
29 #include <FSclRecord.h>
31 namespace Tizen { namespace Base
37 template<typename Type>
40 template<typename Type>
46 namespace Tizen { namespace Graphics
51 namespace Tizen { namespace Social
57 class _OSP_EXPORT_ _PersonImpl
58 : public Tizen::Base::Object
63 virtual ~_PersonImpl(void);
65 virtual bool Equals(const Tizen::Base::Object& rhs) const;
67 virtual int GetHashCode(void) const;
70 void SetId(int personId);
72 void SetDisplayName(const Tizen::Base::String& displayName);
74 void SetThumbnailPath(const Tizen::Base::String& thumbnailPath);
76 void SetRingtonePath(const Tizen::Base::String& ringtonePath);
78 void SetHasPhoneNumber(bool hasPhoneNumber);
80 void SetHasEmail(bool hasEmail);
82 void SetIsFavorite(bool isFavorite);
84 void SetAddressbookIdString(const Tizen::Base::String& addressbookIdString);
87 Tizen::Base::String GetDisplayName(void) const;
89 Tizen::Base::String GetThumbnailPath(void) const;
91 Tizen::Base::String GetRingtonePath(void) const;
93 bool HasPhoneNumber(void) const;
95 bool HasEmail(void) const;
97 bool IsFavorite(void) const;
99 Tizen::Base::Collection::IListT<AccountId>* GetAccountIdsN(void) const;
101 PersonId GetId(void) const;
103 result SetAsFavorite(bool isFavorite);
105 result SetAsPrimaryPhoneNumber(const PhoneNumber& phoneNumber);
107 result SetAsPrimaryEmail(const Email& email);
109 PhoneNumber GetPrimaryPhoneNumber(void) const;
111 Email GetPrimaryEmail(void) const;
113 static _PersonImpl* GetInstance(Person& person);
115 static const _PersonImpl* GetInstance(const Person& person);
118 _PersonImpl(const _PersonImpl& rhs);
120 _PersonImpl& operator =(const _PersonImpl& rhs);
124 bool __hasPhoneNumber;
130 Tizen::Base::String __displayName;
131 Tizen::Base::String __thumbnailPath;
132 Tizen::Base::String __ringtonePath;
133 Tizen::Base::String __addressbookIdString;
134 mutable std::unique_ptr<Tizen::Base::Collection::ArrayListT<AccountId> > __pAccountIds;
136 friend class _AddressbookManagerImpl;
141 #endif // _FSCL_PERSON_IMPL_H_