Merge "Export internal APIs needed by samsung-socil" into tizen_2.1
[framework/osp/social.git] / src / FSclOrganization.cpp
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         FSclOrganization.cpp
18 * @brief        This is the implementation for Organization class.
19 *
20 * This file contains definitions of @e Organization class.
21 */
22
23 #include <FBaseSysLog.h>
24 #include <FSclOrganization.h>
25 #include <FBaseString.h>
26 #include "FScl_OrganizationImpl.h"
27
28 using namespace Tizen::Base;
29
30 namespace Tizen { namespace Social
31 {
32
33 Organization::Organization(void)
34 {
35         __pOrganizationImpl = new (std::nothrow) _OrganizationImpl();
36         SysTryReturnVoidResult(NID_SCL, __pOrganizationImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
37 }
38
39 Organization::Organization(const Organization& rhs)
40 :__pOrganizationImpl(null)
41 {
42         __pOrganizationImpl = new (std::nothrow) _OrganizationImpl(*rhs.__pOrganizationImpl);
43         SysTryReturnVoidResult(NID_SCL, __pOrganizationImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
44 }
45
46 Organization::~Organization(void)
47 {
48         delete __pOrganizationImpl;
49 }
50
51 Organization&
52 Organization::operator =(const Organization& rhs)
53 {
54         if (this == &rhs)
55         {
56                 return *this;
57         }
58
59         *__pOrganizationImpl = *rhs.__pOrganizationImpl;
60
61         return *this;
62 }
63
64 bool
65 Organization::operator ==(const Organization& rhs) const
66 {
67         return *__pOrganizationImpl == *rhs.__pOrganizationImpl;
68 }
69
70 bool
71 Organization::operator !=(const Organization& rhs) const
72 {
73         return !(*this == rhs);
74 }
75
76 bool
77 Organization::Equals(const Object& rhs) const
78 {
79         const Organization* pOrganization = dynamic_cast<const Organization*>(&rhs);
80         if (pOrganization == null)
81         {
82                 return false;
83         }
84
85         return __pOrganizationImpl->Equals(*pOrganization->__pOrganizationImpl);
86 }
87
88 int
89 Organization::GetHashCode(void) const
90 {
91         return __pOrganizationImpl->GetHashCode();
92 }
93
94 String
95 Organization::GetName(void) const
96 {
97         return __pOrganizationImpl->GetName();
98 }
99
100 String
101 Organization::GetJobTitle(void) const
102 {
103         return __pOrganizationImpl->GetJobTitle();
104 }
105
106 String
107 Organization::GetDepartment(void) const
108 {
109         return __pOrganizationImpl->GetDepartment();
110 }
111
112 String
113 Organization::GetRole(void) const
114 {
115         return __pOrganizationImpl->GetRole();
116 }
117
118 String
119 Organization::GetAgent(void) const
120 {
121         return __pOrganizationImpl->GetAgent();
122 }
123
124 OrganizationType
125 Organization::GetType(void) const
126 {
127         return __pOrganizationImpl->GetType();
128 }
129
130 String
131 Organization::GetLabel(void) const
132 {
133         return __pOrganizationImpl->GetLabel();
134 }
135
136 String
137 Organization::GetLocation(void) const
138 {
139         return __pOrganizationImpl->GetLocation();
140 }
141
142 String
143 Organization::GetDescription(void) const
144 {
145         return __pOrganizationImpl->GetDescription();
146 }
147
148 String
149 Organization::GetPhoneticName(void) const
150 {
151         return __pOrganizationImpl->GetPhoneticName();
152 }
153
154 String
155 Organization::GetLogoPath(void) const
156 {
157         return __pOrganizationImpl->GetLogoPath();
158 }
159
160 void
161 Organization::SetName(const String& name)
162 {
163         __pOrganizationImpl->SetName(name);
164 }
165
166 void
167 Organization::SetJobTitle(const String& jobTitle)
168 {
169         __pOrganizationImpl->SetJobTitle(jobTitle);
170 }
171
172 void
173 Organization::SetDepartment(const String& department)
174 {
175         __pOrganizationImpl->SetDepartment(department);
176 }
177
178 void
179 Organization::SetRole(const String& role)
180 {
181         __pOrganizationImpl->SetRole(role);
182 }
183
184 void
185 Organization::SetAgent(const String& agent)
186 {
187         __pOrganizationImpl->SetAgent(agent);
188 }
189
190 void
191 Organization::SetType(OrganizationType type)
192 {
193         __pOrganizationImpl->SetType(type);
194 }
195
196 void
197 Organization::SetLabel(const String& label)
198 {
199         __pOrganizationImpl->SetLabel(label);
200 }
201
202 void
203 Organization::SetLocation(const String& location)
204 {
205         __pOrganizationImpl->SetLocation(location);
206 }
207
208 void
209 Organization::SetDescription(const String& description)
210 {
211         __pOrganizationImpl->SetDescription(description);
212 }
213
214 void
215 Organization::SetPhoneticName(const String& phoneticName)
216 {
217         __pOrganizationImpl->SetPhoneticName(phoneticName);
218 }
219
220 result
221 Organization::SetLogo(const String& filePath)
222 {
223         return __pOrganizationImpl->SetLogo(filePath);
224 }
225
226 }} // Tizen::Social