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 FSclCategoryChangeInfo.cpp
19 * @brief This is the implementation for CategoryChangeInfo class.
21 * This file contains definitions of @e CategoryChangeInfo class.
25 #include <FBaseResult.h>
26 #include <FSclCategoryChangeInfo.h>
27 #include <FBaseSysLog.h>
28 #include "FScl_CategoryChangeInfoImpl.h"
30 using namespace Tizen::Base;
31 using namespace Tizen::Base::Collection;
33 namespace Tizen { namespace Social
36 CategoryChangeInfo::CategoryChangeInfo(void)
38 __pCategoryChangeInfoImpl = new (std::nothrow) _CategoryChangeInfoImpl();
39 SysTryReturnVoidResult(NID_SCL, __pCategoryChangeInfoImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
42 CategoryChangeInfo::CategoryChangeInfo(const CategoryChangeInfo& rhs)
44 __pCategoryChangeInfoImpl = new (std::nothrow) _CategoryChangeInfoImpl(*rhs.__pCategoryChangeInfoImpl);
45 SysTryReturnVoidResult(NID_SCL, __pCategoryChangeInfoImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
48 CategoryChangeInfo::~CategoryChangeInfo(void)
50 delete __pCategoryChangeInfoImpl;
54 CategoryChangeInfo::operator =(const CategoryChangeInfo& rhs)
61 *__pCategoryChangeInfoImpl = *rhs.__pCategoryChangeInfoImpl;
67 CategoryChangeInfo::Equals(const Object& rhs) const
69 const CategoryChangeInfo* pCategoryChangeInfo = dynamic_cast<const CategoryChangeInfo*>(&rhs);
70 if (pCategoryChangeInfo == null)
75 return *__pCategoryChangeInfoImpl == *pCategoryChangeInfo->__pCategoryChangeInfoImpl;
79 CategoryChangeInfo::GetHashCode(void) const
81 return __pCategoryChangeInfoImpl->GetHashCode();
85 CategoryChangeInfo::GetAddressbookId(void) const
87 return __pCategoryChangeInfoImpl->GetAddressbookId();
91 CategoryChangeInfo::GetCategoryId(void) const
93 return __pCategoryChangeInfoImpl->GetCategoryId();
97 CategoryChangeInfo::GetVersion(void) const
99 return __pCategoryChangeInfoImpl->GetVersion();
103 CategoryChangeInfo::GetChangeType(void) const
105 return __pCategoryChangeInfoImpl->GetChangeType();