Fixed update instance
[framework/osp/social.git] / src / FScl_EmailImpl.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_EmailImpl.h
19 * @brief        This is the header file for the %_EmailImpl class.
20 *
21 * This header file contains the declarations of the %_EmailImpl class.
22 */
23 #ifndef _FSCL_EMAIL_IMPL_H_
24 #define _FSCL_EMAIL_IMPL_H_
25
26 #include <contacts.h>
27 #include <FBaseResult.h>
28 #include <FBaseObject.h>
29 #include <FBaseString.h>
30 #include <FSclTypes.h>
31
32 namespace Tizen { namespace Social
33 {
34
35 class Email;
36
37 class _OSP_EXPORT_ _EmailImpl
38         : public Tizen::Base::Object
39 {
40 public:
41         _EmailImpl(void);
42
43         _EmailImpl(EmailType type, const Tizen::Base::String& email);
44
45         _EmailImpl(const _EmailImpl& rhs);
46
47         virtual ~_EmailImpl(void);
48
49         virtual bool Equals(const Tizen::Base::Object& rhs) const;
50
51         virtual int GetHashCode(void) const;
52
53         void SetRecordId(int recordId);
54
55         int GetRecordId(void) const;
56
57         EmailType GetType(void) const;
58
59         void SetType(EmailType type);
60
61         Tizen::Base::String GetEmail(void) const;
62
63         result SetEmail(const Tizen::Base::String& email);
64
65         Tizen::Base::String GetLabel(void) const;
66
67         void SetLabel(const Tizen::Base::String& label);
68
69         bool IsEmpty(void) const;
70
71         _EmailImpl& operator =(const _EmailImpl& rhs);
72
73         bool operator ==(const _EmailImpl& rhs) const;
74
75         bool operator !=(const _EmailImpl& rhs) const;
76
77         static const _EmailImpl* GetInstance(const Email& email);
78
79         static _EmailImpl* GetInstance(Email& email);
80
81 private:
82         int __recordId;
83         EmailType __type;
84         Tizen::Base::String __label;
85         Tizen::Base::String __email;
86 }; // _EmailImpl
87
88 }} // Tizen::Social
89
90 #endif // _FSCL_EMAIL_H_