8c4fb9dd22043e7603332fe4357da87c78682425
[framework/osp/social.git] / src / FScl_EmailContactImpl.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_EmailContactImpl.h
19  * @brief               This is the header file for the %_EmailContactImpl class.
20  *
21  * This header file contains the declarations of the %_EmailContactImpl class.
22  */
23 #ifndef _FSCL_INTERNAL_EMAIL_CONTACT_IMPL_H_
24 #define _FSCL_INTERNAL_EMAIL_CONTACT_IMPL_H_
25
26 #include <FBaseObject.h>
27 #include <FBaseString.h>
28 #include <FSclTypes.h>
29 #include <FSclEmail.h>
30
31 namespace Tizen { namespace Social
32 {
33
34 class EmailContact;
35
36 /**
37  * @class       _EmailContactImpl
38  * @brief       This class provides summarized contact information.
39  *
40  * @since       2.0
41  *
42  */
43 class _EmailContactImpl
44         : public Tizen::Base::Object
45 {
46 public:
47         /**
48          * This is default constructor for the class.
49          *
50          * @since       2.0
51          */
52         _EmailContactImpl(void);
53
54         /**
55          * Copying of objects using this copy constructor is allowed.
56          *
57          * @since       2.0
58          */
59         _EmailContactImpl(const _EmailContactImpl& rhs);
60
61         /**
62          * This destructor overrides Tizen::Base::Object::~Object().
63          *
64          * @since       2.0
65          */
66         virtual ~_EmailContactImpl(void);
67
68         virtual bool Equals(const Tizen::Base::Object& rhs) const;
69
70         virtual int GetHashCode(void) const;
71
72         RecordId GetContactId(void) const;
73
74         PersonId GetPersonId(void) const;
75
76         Tizen::Base::String GetDisplayName(void) const;
77
78         Tizen::Base::String GetThumbnailPath(void) const;
79
80         Tizen::Base::String GetRingtonePath(void) const;
81
82         Email GetEmail(void) const;
83
84         void SetPersonId(PersonId personId);
85
86         void SetAddressbookId(AddressbookId addressbookId);
87
88         AddressbookId GetAddressbookId(void) const;
89
90         void SetContactId(RecordId contactId);
91
92         void SetDisplayName(const Tizen::Base::String& displayName);
93
94         void SetThumbnailPath(const Tizen::Base::String& thumbnail);
95
96         void SetRingtonePath(const Tizen::Base::String& ringtone);
97
98         void SetEmailData(int recordId, EmailType type, const Tizen::Base::String& label, const Tizen::Base::String& email);
99
100         static _EmailContactImpl* GetInstance(EmailContact& simpleContact);
101
102         static const _EmailContactImpl* GetInstance(const EmailContact& simpleContact);
103
104         _EmailContactImpl& operator =(const _EmailContactImpl& rhs);
105
106         bool operator ==(const _EmailContactImpl& rhs) const;
107
108 private:
109         AddressbookId __addressbookId;
110         RecordId        __contactId;
111         PersonId        __personId;
112         Tizen::Base::String __displayName;
113         Tizen::Base::String __thumbnail;
114         Tizen::Base::String __ringtone;
115         Email __email;
116 };      // _EmailContactImpl
117
118 }}      // Tizen::Social
119
120 #endif // _FSCL_INTERNAL_EMAIL_CONTACT_IMPL_H_