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 FSclCalEventInstance.cpp
18 * @brief This is the implementation for CalEventInstance class.
20 * This file contains definitions of @e CalEventInstance class.
23 #include <FBaseResult.h>
24 #include <FBaseString.h>
25 #include <FBaseDateTime.h>
26 #include <FSclCalEventInstance.h>
27 #include <FBaseSysLog.h>
28 #include "FScl_CalEventInstanceImpl.h"
30 using namespace Tizen::Base;
32 namespace Tizen { namespace Social {
34 CalEventInstance::CalEventInstance(void)
35 : __pCalEventInstanceImpl(null)
37 __pCalEventInstanceImpl = new (std::nothrow) _CalEventInstanceImpl();
38 SysTryReturnVoidResult(NID_SCL, __pCalEventInstanceImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
41 CalEventInstance::CalEventInstance(const CalEventInstance& rhs)
42 : __pCalEventInstanceImpl(null)
44 __pCalEventInstanceImpl = new (std::nothrow) _CalEventInstanceImpl(*rhs.__pCalEventInstanceImpl);
45 SysTryReturnVoidResult(NID_SCL, __pCalEventInstanceImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
48 CalEventInstance::~CalEventInstance(void)
50 delete __pCalEventInstanceImpl;
54 CalEventInstance::operator =(const CalEventInstance& rhs)
61 *__pCalEventInstanceImpl = *rhs.__pCalEventInstanceImpl;
67 CalEventInstance::Equals(const Object& rhs) const
69 const CalEventInstance* pCalEventInstance = dynamic_cast<const CalEventInstance*>(&rhs);
70 if (pCalEventInstance == null)
75 return __pCalEventInstanceImpl->Equals(*_CalEventInstanceImpl::GetInstance(*pCalEventInstance));
79 CalEventInstance::GetHashCode(void) const
81 return __pCalEventInstanceImpl->GetHashCode();
85 CalEventInstance::GetOriginalEventId(void) const
87 return __pCalEventInstanceImpl->GetOriginalEventId();
91 CalEventInstance::GetCalendarId(void) const
93 return __pCalEventInstanceImpl->GetCalendarId();
97 CalEventInstance::GetStartTime(void) const
99 return __pCalEventInstanceImpl->GetStartTime();
103 CalEventInstance::GetEndTime(void) const
105 return __pCalEventInstanceImpl->GetEndTime();
109 CalEventInstance::GetSubject(void) const
111 return __pCalEventInstanceImpl->GetSubject();
115 CalEventInstance::GetDescription(void) const
117 return __pCalEventInstanceImpl->GetDescription();
121 CalEventInstance::GetLocation(void) const
123 return __pCalEventInstanceImpl->GetLocation();
127 CalEventInstance::IsAllDayEvent(void) const
129 return __pCalEventInstanceImpl->IsAllDayEvent();
133 CalEventInstance::GetBusyStatus(void) const
135 return __pCalEventInstanceImpl->GetBusyStatus();
139 CalEventInstance::GetStatus(void) const
141 return __pCalEventInstanceImpl->GetStatus();
145 CalEventInstance::GetPriority(void) const
147 return __pCalEventInstanceImpl->GetPriority();
151 CalEventInstance::GetSensitivity(void) const
153 return __pCalEventInstanceImpl->GetSensitivity();
157 CalEventInstance::IsRecurring(void) const
159 return __pCalEventInstanceImpl->IsRecurring();
163 CalEventInstance::HasReminder(void) const
165 return __pCalEventInstanceImpl->HasReminder();