2 // Copyright (c) 2012 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.
17 * @file FSclContactChangeInfo.cpp
18 * @brief This is the implementation for ContactChangeInfo class.
20 * This file contains definitions of @e ContactChangeInfo class.
24 #include <FBaseResult.h>
25 #include <FSclContactChangeInfo.h>
26 #include <FBaseSysLog.h>
27 #include "FScl_ContactChangeInfoImpl.h"
29 using namespace Tizen::Base;
30 using namespace Tizen::Base::Collection;
32 namespace Tizen { namespace Social
35 ContactChangeInfo::ContactChangeInfo(void)
37 __pContactChangeInfoImpl = new (std::nothrow) _ContactChangeInfoImpl();
38 SysTryReturnVoidResult(NID_SCL, __pContactChangeInfoImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
41 ContactChangeInfo::ContactChangeInfo(const ContactChangeInfo& rhs)
43 __pContactChangeInfoImpl = new (std::nothrow) _ContactChangeInfoImpl(*rhs.__pContactChangeInfoImpl);
44 SysTryReturnVoidResult(NID_SCL, __pContactChangeInfoImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
47 ContactChangeInfo::~ContactChangeInfo(void)
49 delete __pContactChangeInfoImpl;
53 ContactChangeInfo::operator =(const ContactChangeInfo& rhs)
60 *__pContactChangeInfoImpl = *rhs.__pContactChangeInfoImpl;
66 ContactChangeInfo::Equals(const Object& rhs) const
68 const ContactChangeInfo* pContactChangeInfo = dynamic_cast<const ContactChangeInfo*>(&rhs);
69 if (pContactChangeInfo == null)
74 return *__pContactChangeInfoImpl == *pContactChangeInfo->__pContactChangeInfoImpl;
78 ContactChangeInfo::GetHashCode(void) const
80 return __pContactChangeInfoImpl->GetHashCode();
84 ContactChangeInfo::GetAddressbookId(void) const
86 return __pContactChangeInfoImpl->GetAddressbookId();
90 ContactChangeInfo::GetContactId(void) const
92 return __pContactChangeInfoImpl->GetContactId();
96 ContactChangeInfo::GetVersion(void) const
98 return __pContactChangeInfoImpl->GetVersion();
102 ContactChangeInfo::GetChangeType(void) const
104 return __pContactChangeInfoImpl->GetChangeType();
108 ContactChangeInfo::IsThumbnailChanged(void) const
110 return __pContactChangeInfoImpl->IsThumbnailChanged();