Modify the spec file for secure log
[framework/osp/social.git] / src / FScl_PersonImpl.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
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
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
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.
15 //
16 /**
17  * @file                FScl_PersonImpl.h
18  * @brief               This is the header file for the %_PersonImpl class.
19  *
20  * This header file contains the declarations of the %_PersonImpl class.
21  */
22 #ifndef _FSCL_PERSON_IMPL_H_
23 #define _FSCL_PERSON_IMPL_H_
24
25 #include <unique_ptr.h>
26 #include <contacts.h>
27 #include <FBaseObject.h>
28 #include <FSclRecord.h>
29
30 namespace Tizen { namespace Base
31 {
32 class String;
33
34 namespace Collection
35 {
36 template<typename Type>
37 class IListT;
38
39 template<typename Type>
40 class ArrayListT;
41 }
42
43 } }
44
45 namespace Tizen { namespace Graphics
46 {
47 class Bitmap;
48 } }
49
50 namespace Tizen { namespace Social
51 {
52
53 class PhoneNumber;
54 class Email;
55
56 class _OSP_EXPORT_ _PersonImpl
57         : public Tizen::Base::Object
58 {
59 public:
60         _PersonImpl(void);
61
62         virtual ~_PersonImpl(void);
63
64         virtual bool Equals(const Tizen::Base::Object& rhs) const;
65
66         virtual int GetHashCode(void) const;
67
68         // setter
69         void SetId(int personId);
70         
71         void SetDisplayName(const Tizen::Base::String& displayName);
72         
73         void SetThumbnailPath(const Tizen::Base::String& thumbnailPath);
74         
75         void SetRingtonePath(const Tizen::Base::String& ringtonePath);
76
77         void SetHasPhoneNumber(bool hasPhoneNumber);
78
79         void SetHasEmail(bool hasEmail);
80
81         void SetIsFavorite(bool isFavorite);
82
83         void SetAddressbookIdString(const Tizen::Base::String& addressbookIdString);
84
85         // getter
86         Tizen::Base::String GetDisplayName(void) const;
87
88         Tizen::Base::String GetThumbnailPath(void) const;
89
90         Tizen::Base::String GetRingtonePath(void) const;
91
92         bool HasPhoneNumber(void) const;
93
94         bool HasEmail(void) const;
95
96         bool IsFavorite(void) const;
97
98         Tizen::Base::Collection::IListT<AccountId>* GetAccountIdsN(void) const;
99
100         PersonId GetId(void) const;
101
102         result SetAsFavorite(bool isFavorite);
103
104         result SetAsPrimaryPhoneNumber(const PhoneNumber& phoneNumber);
105
106         result SetAsPrimaryEmail(const Email& email);
107
108         PhoneNumber GetPrimaryPhoneNumber(void) const;
109
110         Email GetPrimaryEmail(void) const;
111
112         static _PersonImpl* GetInstance(Person& person);
113
114         static const _PersonImpl* GetInstance(const Person& person);
115
116 private:
117         _PersonImpl(const _PersonImpl& rhs);
118
119         _PersonImpl& operator =(const _PersonImpl& rhs);
120
121 private:
122         bool __isFavorite;
123         bool __hasPhoneNumber;
124         bool __hasEmail;
125         int __personId;
126         int __accountId1;
127         int __accountId2;
128         int __accountId3;
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;
134                 
135         friend class _AddressbookManagerImpl;
136 };      // _PersonImpl
137
138 }}      // Tizen::Social
139
140 #endif // _FSCL_PERSON_IMPL_H_