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 FSclCalEventInstance.cpp
19 * @brief This is the implementation for CalEventInstance class.
21 * This file contains definitions of @e CalEventInstance class.
24 #include <FBaseResult.h>
25 #include <FBaseString.h>
26 #include <FBaseDateTime.h>
27 #include <FSclCalEventInstance.h>
28 #include <FBaseSysLog.h>
29 #include "FScl_CalEventInstanceImpl.h"
31 using namespace Tizen::Base;
33 namespace Tizen { namespace Social {
35 CalEventInstance::CalEventInstance(void)
36 : __pCalEventInstanceImpl(null)
38 __pCalEventInstanceImpl = new (std::nothrow) _CalEventInstanceImpl();
39 SysTryReturnVoidResult(NID_SCL, __pCalEventInstanceImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
42 CalEventInstance::CalEventInstance(const CalEventInstance& rhs)
43 : __pCalEventInstanceImpl(null)
45 __pCalEventInstanceImpl = new (std::nothrow) _CalEventInstanceImpl(*rhs.__pCalEventInstanceImpl);
46 SysTryReturnVoidResult(NID_SCL, __pCalEventInstanceImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
49 CalEventInstance::~CalEventInstance(void)
51 delete __pCalEventInstanceImpl;
55 CalEventInstance::operator =(const CalEventInstance& rhs)
62 *__pCalEventInstanceImpl = *rhs.__pCalEventInstanceImpl;
68 CalEventInstance::Equals(const Object& rhs) const
70 const CalEventInstance* pCalEventInstance = dynamic_cast<const CalEventInstance*>(&rhs);
71 if (pCalEventInstance == null)
76 return __pCalEventInstanceImpl->Equals(*_CalEventInstanceImpl::GetInstance(*pCalEventInstance));
80 CalEventInstance::GetHashCode(void) const
82 return __pCalEventInstanceImpl->GetHashCode();
86 CalEventInstance::GetOriginalEventId(void) const
88 return __pCalEventInstanceImpl->GetOriginalEventId();
92 CalEventInstance::GetCalendarId(void) const
94 return __pCalEventInstanceImpl->GetCalendarId();
98 CalEventInstance::GetStartTime(void) const
100 return __pCalEventInstanceImpl->GetStartTime();
104 CalEventInstance::GetEndTime(void) const
106 return __pCalEventInstanceImpl->GetEndTime();
110 CalEventInstance::GetSubject(void) const
112 return __pCalEventInstanceImpl->GetSubject();
116 CalEventInstance::GetDescription(void) const
118 return __pCalEventInstanceImpl->GetDescription();
122 CalEventInstance::GetLocation(void) const
124 return __pCalEventInstanceImpl->GetLocation();
128 CalEventInstance::IsAllDayEvent(void) const
130 return __pCalEventInstanceImpl->IsAllDayEvent();
134 CalEventInstance::GetBusyStatus(void) const
136 return __pCalEventInstanceImpl->GetBusyStatus();
140 CalEventInstance::GetStatus(void) const
142 return __pCalEventInstanceImpl->GetStatus();
146 CalEventInstance::GetPriority(void) const
148 return __pCalEventInstanceImpl->GetPriority();
152 CalEventInstance::GetSensitivity(void) const
154 return __pCalEventInstanceImpl->GetSensitivity();
158 CalEventInstance::IsRecurring(void) const
160 return __pCalEventInstanceImpl->IsRecurring();
164 CalEventInstance::HasReminder(void) const
166 return __pCalEventInstanceImpl->HasReminder();