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 FSclCalEventChangeInfo.cpp
18 * @brief This is the implementation for CalEventChangeInfo class.
20 * This file contains definitions of @e CalEventChangeInfo class.
24 #include <FBaseSysLog.h>
25 #include <FSclCalEventChangeInfo.h>
26 #include "FScl_CalEventChangeInfoImpl.h"
28 namespace Tizen { namespace Social
31 const static int _INVALID_VERSION = -1;
33 CalEventChangeInfo::CalEventChangeInfo(void)
34 : __pCalEventChangeInfoImpl(null)
36 __pCalEventChangeInfoImpl = new (std::nothrow) _CalEventChangeInfoImpl();
37 SysTryReturnVoidResult(NID_SCL, __pCalEventChangeInfoImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
40 CalEventChangeInfo::CalEventChangeInfo(const CalEventChangeInfo& rhs)
41 : __pCalEventChangeInfoImpl(null)
43 __pCalEventChangeInfoImpl = new (std::nothrow) _CalEventChangeInfoImpl(*(rhs.__pCalEventChangeInfoImpl));
44 SysTryReturnVoidResult(NID_SCL, __pCalEventChangeInfoImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
47 CalEventChangeInfo::~CalEventChangeInfo(void)
49 delete __pCalEventChangeInfoImpl;
53 CalEventChangeInfo::operator =(const CalEventChangeInfo& rhs)
60 *__pCalEventChangeInfoImpl = *rhs.__pCalEventChangeInfoImpl;
66 CalEventChangeInfo::Equals(const Object& rhs) const
68 const CalEventChangeInfo* pCalEventChangeInfo = dynamic_cast<const CalEventChangeInfo*>(&rhs);
69 if (pCalEventChangeInfo == null)
74 return __pCalEventChangeInfoImpl->Equals(*_CalEventChangeInfoImpl::GetInstance(*pCalEventChangeInfo));
78 CalEventChangeInfo::GetHashCode(void) const
80 return __pCalEventChangeInfoImpl->GetHashCode();
84 CalEventChangeInfo::GetChangeType(void) const
86 return __pCalEventChangeInfoImpl->GetChangeType();
90 CalEventChangeInfo::GetEventId(void) const
92 return __pCalEventChangeInfoImpl->GetEventId();
96 CalEventChangeInfo::GetCalendarId(void) const
98 return __pCalEventChangeInfoImpl->GetCalendarId();
102 CalEventChangeInfo::GetVersion(void) const
104 return __pCalEventChangeInfoImpl->GetVersion();