2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @file FSclContactChangeInfo.cpp
19 * @brief This is the implementation for ContactChangeInfo class.
21 * This file contains definitions of @e ContactChangeInfo class.
25 #include <FBaseResult.h>
26 #include <FSclContactChangeInfo.h>
27 #include <FBaseSysLog.h>
28 #include "FScl_ContactChangeInfoImpl.h"
30 using namespace Tizen::Base;
31 using namespace Tizen::Base::Collection;
33 namespace Tizen { namespace Social
36 ContactChangeInfo::ContactChangeInfo(void)
38 __pContactChangeInfoImpl = new (std::nothrow) _ContactChangeInfoImpl();
39 SysTryReturnVoidResult(NID_SCL, __pContactChangeInfoImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
42 ContactChangeInfo::ContactChangeInfo(const ContactChangeInfo& rhs)
44 __pContactChangeInfoImpl = new (std::nothrow) _ContactChangeInfoImpl(*rhs.__pContactChangeInfoImpl);
45 SysTryReturnVoidResult(NID_SCL, __pContactChangeInfoImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
48 ContactChangeInfo::~ContactChangeInfo(void)
50 delete __pContactChangeInfoImpl;
54 ContactChangeInfo::operator =(const ContactChangeInfo& rhs)
61 *__pContactChangeInfoImpl = *rhs.__pContactChangeInfoImpl;
67 ContactChangeInfo::Equals(const Object& rhs) const
69 const ContactChangeInfo* pContactChangeInfo = dynamic_cast<const ContactChangeInfo*>(&rhs);
70 if (pContactChangeInfo == null)
75 return *__pContactChangeInfoImpl == *pContactChangeInfo->__pContactChangeInfoImpl;
79 ContactChangeInfo::GetHashCode(void) const
81 return __pContactChangeInfoImpl->GetHashCode();
85 ContactChangeInfo::GetAddressbookId(void) const
87 return __pContactChangeInfoImpl->GetAddressbookId();
91 ContactChangeInfo::GetContactId(void) const
93 return __pContactChangeInfoImpl->GetContactId();
97 ContactChangeInfo::GetVersion(void) const
99 return __pContactChangeInfoImpl->GetVersion();
103 ContactChangeInfo::GetChangeType(void) const
105 return __pContactChangeInfoImpl->GetChangeType();
109 ContactChangeInfo::IsThumbnailChanged(void) const
111 return __pContactChangeInfoImpl->IsThumbnailChanged();