Fix code for TDIS-5396
[framework/osp/social.git] / src / FScl_PhoneNumberContactImpl.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17 /**
18  * @file                FScl_PhoneNumberContactImpl.h
19  * @brief               This is the header file for the %_PhoneNumberContactImpl class.
20  *
21  * This header file contains the declarations of the %_PhoneNumberContactImpl class.
22  */
23 #ifndef _FSCL_INTERNAL_PHONE_NUMBER_CONTACT_IMPL_H_
24 #define _FSCL_INTERNAL_PHONE_NUMBER_CONTACT_IMPL_H_
25
26 #include <FBaseObject.h>
27 #include <FBaseString.h>
28 #include <FSclTypes.h>
29 #include <FSclPhoneNumber.h>
30
31 namespace Tizen { namespace Social
32 {
33
34 class PhoneNumberContact;
35
36 /**
37  * @class       _PhoneNumberContactImpl
38  * @brief       This class provides summarized contact information.
39  *
40  * @since       2.0
41  *
42  */
43 class _PhoneNumberContactImpl
44         : public Tizen::Base::Object
45 {
46 public:
47         _PhoneNumberContactImpl(void);
48
49         _PhoneNumberContactImpl(const _PhoneNumberContactImpl& rhs);
50
51         virtual ~_PhoneNumberContactImpl(void);
52
53         virtual bool Equals(const Tizen::Base::Object& rhs) const;
54
55         virtual int GetHashCode(void) const;
56
57         RecordId GetContactId(void) const;
58
59         PersonId GetPersonId(void) const;
60
61         Tizen::Base::String GetDisplayName(void) const;
62
63         Tizen::Base::String GetThumbnailPath(void) const;
64
65         Tizen::Base::String GetRingtonePath(void) const;
66
67         PhoneNumber GetPhoneNumber(void) const;
68
69         void SetPersonId(PersonId personId);
70
71         void SetAddressbookId(AddressbookId addressbookId);
72
73         AddressbookId GetAddressbookId(void) const;
74
75         void SetContactId(RecordId contactId);
76
77         void SetDisplayName(const Tizen::Base::String& displayName);
78
79         void SetThumbnailPath(const Tizen::Base::String& thumbnail);
80
81         void SetRingtonePath(const Tizen::Base::String& ringtone);
82
83         void SetPhoneNumberData(int recordId, PhoneNumberType type, const Tizen::Base::String& label, const Tizen::Base::String& number);
84
85         static _PhoneNumberContactImpl* GetInstance(PhoneNumberContact& simpleContact);
86
87         static const _PhoneNumberContactImpl* GetInstance(const PhoneNumberContact& simpleContact);
88
89         _PhoneNumberContactImpl& operator =(const _PhoneNumberContactImpl& rhs);
90
91         bool operator ==(const _PhoneNumberContactImpl& rhs) const;
92
93 private:
94         AddressbookId __addressbookId;
95         RecordId        __contactId;
96         PersonId        __personId;
97         Tizen::Base::String __displayName;
98         Tizen::Base::String __thumbnail;
99         Tizen::Base::String __ringtone;
100         PhoneNumber __phoneNumber;
101 };      // _PhoneNumberContactImpl
102
103 }}      // Tizen::Social
104
105 #endif // _FSCL_INTERNAL_PHONE_NUMBER_CONTACT_IMPL_H_