Fix for CompatTC Fail
[framework/osp/social.git] / src / FSclContactAppLaunchData.cpp
1 //
2 // Copyright (c) 2013 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 /**
18  * @file                FSclContactAppLaunchData.cpp
19  * @brief               This is the implementation for ContactAppLaunchData class.
20  *
21  * This file contains definitions of @e ContactAppLaunchData class.
22  */
23
24 #include <FBaseSysLog.h>
25 #include <FSclContactAppLaunchData.h>
26 #include "FScl_ContactAppLaunchDataImpl.h"
27
28 using namespace Tizen::Base;
29 using namespace Tizen::Base::Collection;
30
31 namespace Tizen { namespace Social
32 {
33
34 ContactAppLaunchData::ContactAppLaunchData(void)
35 {
36         __pContactAppLaunchDataImpl = new (std::nothrow) _ContactAppLaunchDataImpl();
37         SysTryReturnVoidResult(NID_SCL, __pContactAppLaunchDataImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
38 }
39
40 ContactAppLaunchData::ContactAppLaunchData(const ContactAppLaunchData& rhs)
41 :__pContactAppLaunchDataImpl(null)
42 {
43         __pContactAppLaunchDataImpl = new (std::nothrow) _ContactAppLaunchDataImpl(*rhs.__pContactAppLaunchDataImpl);
44         SysTryReturnVoidResult(NID_SCL, __pContactAppLaunchDataImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
45 }
46
47 ContactAppLaunchData::~ContactAppLaunchData(void)
48 {
49         delete __pContactAppLaunchDataImpl;
50 }
51
52 ContactAppLaunchData&
53 ContactAppLaunchData::operator =(const ContactAppLaunchData& rhs)
54 {
55         if (this == &rhs)
56         {
57                 return *this;
58         }
59
60         *__pContactAppLaunchDataImpl = *rhs.__pContactAppLaunchDataImpl;
61
62         return *this;
63 }
64
65 bool operator ==(const ContactAppLaunchData& lhs, const ContactAppLaunchData& rhs)
66 {
67         return *lhs.__pContactAppLaunchDataImpl == *rhs.__pContactAppLaunchDataImpl;
68 }
69
70 bool operator !=(const ContactAppLaunchData& lhs, const ContactAppLaunchData& rhs)
71 {
72         return !(lhs == rhs);
73 }
74
75 bool
76 ContactAppLaunchData::Equals(const Object& rhs) const
77 {
78         const ContactAppLaunchData* pContactAppLaunchData = dynamic_cast<const ContactAppLaunchData*>(&rhs);
79         if (pContactAppLaunchData == null)
80         {
81                 return false;
82         }
83
84         return __pContactAppLaunchDataImpl->Equals(*pContactAppLaunchData->__pContactAppLaunchDataImpl);
85 }
86
87 int
88 ContactAppLaunchData::GetHashCode(void) const
89 {
90         return __pContactAppLaunchDataImpl->GetHashCode();
91 }
92
93 String
94 ContactAppLaunchData::GetDisplayText(void) const
95 {
96         return __pContactAppLaunchDataImpl->GetDisplayText();
97 }
98
99 String
100 ContactAppLaunchData::GetAppId(void) const
101 {
102         return __pContactAppLaunchDataImpl->GetAppId();
103 }
104
105 String
106 ContactAppLaunchData::GetOperationId(void) const
107 {
108         return __pContactAppLaunchDataImpl->GetOperationId();
109 }
110
111 String
112 ContactAppLaunchData::GetUri(void) const
113 {
114         return __pContactAppLaunchDataImpl->GetUri();
115 }
116
117 String
118 ContactAppLaunchData::GetMime(void) const
119 {
120         return __pContactAppLaunchDataImpl->GetMime();
121 }
122
123 IMap*
124 ContactAppLaunchData::GetExtraDataN(void) const
125 {
126         return __pContactAppLaunchDataImpl->GetExtraDataN();
127 }
128
129 void
130 ContactAppLaunchData::SetDisplayText(const String& displayText)
131 {
132         __pContactAppLaunchDataImpl->SetDisplayText(displayText);
133 }
134
135 void
136 ContactAppLaunchData::SetAppId(const String& appId)
137 {
138         __pContactAppLaunchDataImpl->SetAppId(appId);
139 }
140
141 void
142 ContactAppLaunchData::SetOperationId(const String& operationId)
143 {
144         __pContactAppLaunchDataImpl->SetOperationId(operationId);
145 }
146
147 void
148 ContactAppLaunchData::SetUri(const String& uri)
149 {
150         __pContactAppLaunchDataImpl->SetUri(uri);
151 }
152
153 void
154 ContactAppLaunchData::SetMime(const String& mime)
155 {
156         __pContactAppLaunchDataImpl->SetMime(mime);
157 }
158
159 result
160 ContactAppLaunchData::SetExtraData(const IMap* pExtraData)
161 {
162         return __pContactAppLaunchDataImpl->SetExtraData(pExtraData);
163 }
164
165 }} // Tizen::Social