597b1b9379ceefa12ceaa91143e53c6c804c460e
[framework/web/wrt-plugins-tizen.git] / src / Contact / ContactOrganization.cpp
1 //
2 // Tizen Web Device API
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 /**
19  * @file        ContactOrganization.cpp
20  * @author      Kisub Song (kisubs.song@samsung.com)
21  * @version     0.1
22  * @brief
23  */
24
25 #include "ContactOrganization.h"
26
27 namespace DeviceAPI {
28 namespace Contact {
29
30 ContactOrganization::ContactOrganization() :
31                 m_nameIsSet(false),
32                 m_departmentIsSet(false),
33                 m_titleIsSet(false),
34                 m_roleIsSet(false),
35                 m_logoURIIsSet(false)
36 {
37 }
38
39 ContactOrganization::~ContactOrganization()
40 {
41 }
42
43 std::string ContactOrganization::getName() const
44 {
45         return m_name;
46 }
47
48 void ContactOrganization::setName(const std::string &value)
49 {
50         m_name = value;
51         m_nameIsSet = true;
52 }
53
54 void ContactOrganization::unsetName()
55 {
56         m_name = "";
57         m_nameIsSet = false;
58 }
59
60 bool ContactOrganization::getNameIsSet() const
61 {
62         return m_nameIsSet;
63 }
64
65 std::string ContactOrganization::getDepartment() const
66 {
67         return m_department;
68 }
69
70 void ContactOrganization::setDepartment(const std::string &value)
71 {
72         m_department = value;
73         m_departmentIsSet = true;
74 }
75
76 void ContactOrganization::unsetDepartment()
77 {
78         m_department = "";
79         m_departmentIsSet = false;
80 }
81
82 bool ContactOrganization::getDepartmentIsSet() const
83 {
84         return m_departmentIsSet;
85 }
86
87 std::string ContactOrganization::getTitle() const
88 {
89         return m_title;
90 }
91
92 void ContactOrganization::setTitle(const std::string &value)
93 {
94         m_title = value;
95         m_titleIsSet = true;
96 }
97
98 void ContactOrganization::unsetTitle()
99 {
100         m_title = "";
101         m_titleIsSet = false;
102 }
103
104 bool ContactOrganization::getTitleIsSet() const
105 {
106         return m_titleIsSet;
107 }
108
109 std::string ContactOrganization::getRole() const
110 {
111         return m_role;
112 }
113
114 void ContactOrganization::setRole(const std::string &value)
115 {
116         m_role = value;
117         m_roleIsSet = true;
118 }
119
120 void ContactOrganization::unsetRole()
121 {
122         m_role = "";
123         m_roleIsSet = false;
124 }
125
126 bool ContactOrganization::getRoleIsSet() const
127 {
128         return m_roleIsSet;
129 }
130
131 std::string ContactOrganization::getLogoURI() const
132 {
133         return m_logoURI;
134 }
135
136 void ContactOrganization::setLogoURI(const std::string &value)
137 {
138         m_logoURI = value;
139         m_logoURIIsSet = true;
140 }
141
142 void ContactOrganization::unsetLogoURI()
143 {
144         m_logoURI = "";
145         m_logoURIIsSet = false;
146 }
147
148 bool ContactOrganization::getLogoURIIsSet() const
149 {
150         return m_logoURIIsSet;
151 }
152
153 void ContactOrganization::clear()
154 {
155         m_name = "";
156         m_nameIsSet = false;
157
158         m_department = "";
159         m_departmentIsSet = false;
160
161         m_title = "";
162         m_titleIsSet = false;
163
164         m_role = "";
165         m_roleIsSet = false;
166
167         m_logoURI = "";
168         m_logoURIIsSet = false;
169 }
170
171 ContactOrganizationPtr ContactOrganization::clone() const
172 {
173         ContactOrganizationPtr result(new ContactOrganization());
174
175         result->m_name = m_name;
176         result->m_nameIsSet = m_nameIsSet;
177
178         result->m_department = m_department;
179         result->m_departmentIsSet = m_departmentIsSet;
180
181         result->m_title = m_title;
182         result->m_titleIsSet = m_titleIsSet;
183
184         result->m_role = m_role;
185         result->m_roleIsSet = m_roleIsSet;
186
187         result->m_logoURI = m_logoURI;
188         result->m_logoURIIsSet = m_logoURIIsSet;
189
190         return result;
191 }
192
193 } // Contact
194 } // DeviceAPI