2 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @file FSclContactAppLaunchData.cpp
19 * @brief This is the implementation for ContactAppLaunchData class.
21 * This file contains definitions of @e ContactAppLaunchData class.
24 #include <FBaseSysLog.h>
25 #include <FSclContactAppLaunchData.h>
26 #include "FScl_ContactAppLaunchDataImpl.h"
28 using namespace Tizen::Base;
29 using namespace Tizen::Base::Collection;
31 namespace Tizen { namespace Social
34 ContactAppLaunchData::ContactAppLaunchData(void)
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));
40 ContactAppLaunchData::ContactAppLaunchData(const ContactAppLaunchData& rhs)
41 :__pContactAppLaunchDataImpl(null)
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));
47 ContactAppLaunchData::~ContactAppLaunchData(void)
49 delete __pContactAppLaunchDataImpl;
53 ContactAppLaunchData::operator =(const ContactAppLaunchData& rhs)
60 *__pContactAppLaunchDataImpl = *rhs.__pContactAppLaunchDataImpl;
65 bool operator ==(const ContactAppLaunchData& lhs, const ContactAppLaunchData& rhs)
67 return *lhs.__pContactAppLaunchDataImpl == *rhs.__pContactAppLaunchDataImpl;
70 bool operator !=(const ContactAppLaunchData& lhs, const ContactAppLaunchData& rhs)
76 ContactAppLaunchData::Equals(const Object& rhs) const
78 const ContactAppLaunchData* pContactAppLaunchData = dynamic_cast<const ContactAppLaunchData*>(&rhs);
79 if (pContactAppLaunchData == null)
84 return __pContactAppLaunchDataImpl->Equals(*pContactAppLaunchData->__pContactAppLaunchDataImpl);
88 ContactAppLaunchData::GetHashCode(void) const
90 return __pContactAppLaunchDataImpl->GetHashCode();
94 ContactAppLaunchData::GetDisplayText(void) const
96 return __pContactAppLaunchDataImpl->GetDisplayText();
100 ContactAppLaunchData::GetAppId(void) const
102 return __pContactAppLaunchDataImpl->GetAppId();
106 ContactAppLaunchData::GetOperationId(void) const
108 return __pContactAppLaunchDataImpl->GetOperationId();
112 ContactAppLaunchData::GetUri(void) const
114 return __pContactAppLaunchDataImpl->GetUri();
118 ContactAppLaunchData::GetMime(void) const
120 return __pContactAppLaunchDataImpl->GetMime();
124 ContactAppLaunchData::GetExtraDataN(void) const
126 return __pContactAppLaunchDataImpl->GetExtraDataN();
130 ContactAppLaunchData::SetDisplayText(const String& displayText)
132 __pContactAppLaunchDataImpl->SetDisplayText(displayText);
136 ContactAppLaunchData::SetAppId(const String& appId)
138 __pContactAppLaunchDataImpl->SetAppId(appId);
142 ContactAppLaunchData::SetOperationId(const String& operationId)
144 __pContactAppLaunchDataImpl->SetOperationId(operationId);
148 ContactAppLaunchData::SetUri(const String& uri)
150 __pContactAppLaunchDataImpl->SetUri(uri);
154 ContactAppLaunchData::SetMime(const String& mime)
156 __pContactAppLaunchDataImpl->SetMime(mime);
160 ContactAppLaunchData::SetExtraData(const IMap* pExtraData)
162 return __pContactAppLaunchDataImpl->SetExtraData(pExtraData);