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