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 FSclCalEventChangeInfo.cpp
19 * @brief This is the implementation for CalEventChangeInfo class.
21 * This file contains definitions of @e CalEventChangeInfo class.
25 #include <FBaseSysLog.h>
26 #include <FSclCalEventChangeInfo.h>
27 #include "FScl_CalEventChangeInfoImpl.h"
29 namespace Tizen { namespace Social
32 const static int _INVALID_VERSION = -1;
34 CalEventChangeInfo::CalEventChangeInfo(void)
35 : __pCalEventChangeInfoImpl(null)
37 __pCalEventChangeInfoImpl = new (std::nothrow) _CalEventChangeInfoImpl();
38 SysTryReturnVoidResult(NID_SCL, __pCalEventChangeInfoImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
41 CalEventChangeInfo::CalEventChangeInfo(const CalEventChangeInfo& rhs)
42 : __pCalEventChangeInfoImpl(null)
44 __pCalEventChangeInfoImpl = new (std::nothrow) _CalEventChangeInfoImpl(*(rhs.__pCalEventChangeInfoImpl));
45 SysTryReturnVoidResult(NID_SCL, __pCalEventChangeInfoImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
48 CalEventChangeInfo::~CalEventChangeInfo(void)
50 delete __pCalEventChangeInfoImpl;
54 CalEventChangeInfo::operator =(const CalEventChangeInfo& rhs)
61 *__pCalEventChangeInfoImpl = *rhs.__pCalEventChangeInfoImpl;
67 CalEventChangeInfo::Equals(const Object& rhs) const
69 const CalEventChangeInfo* pCalEventChangeInfo = dynamic_cast<const CalEventChangeInfo*>(&rhs);
70 if (pCalEventChangeInfo == null)
75 return __pCalEventChangeInfoImpl->Equals(*_CalEventChangeInfoImpl::GetInstance(*pCalEventChangeInfo));
79 CalEventChangeInfo::GetHashCode(void) const
81 return __pCalEventChangeInfoImpl->GetHashCode();
85 CalEventChangeInfo::GetChangeType(void) const
87 return __pCalEventChangeInfoImpl->GetChangeType();
91 CalEventChangeInfo::GetEventId(void) const
93 return __pCalEventChangeInfoImpl->GetEventId();
97 CalEventChangeInfo::GetCalendarId(void) const
99 return __pCalEventChangeInfoImpl->GetCalendarId();
103 CalEventChangeInfo::GetVersion(void) const
105 return __pCalEventChangeInfoImpl->GetVersion();