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 FScl_ReminderImpl.cpp
18 * @brief This is the implementation for _ReminderImpl class.
20 * This file contains definitions of @e _ReminderImpl class.
23 #include <FBaseSysLog.h>
24 #include <FBaseDateTime.h>
25 #include <FSclReminder.h>
26 #include "FScl_CalendarbookUtil.h"
27 #include "FScl_ReminderImpl.h"
29 using namespace Tizen::App;
30 using namespace Tizen::Base;
32 namespace Tizen { namespace Social
35 _ReminderImpl::_ReminderImpl(void)
39 _ReminderImpl::_ReminderImpl(const _ReminderImpl& rhs)
40 : __absoluteTime(rhs.__absoluteTime)
45 _ReminderImpl::~_ReminderImpl(void)
50 _ReminderImpl::operator =(const _ReminderImpl& rhs)
57 __absoluteTime = rhs.__absoluteTime;
58 __isAbsolute = rhs.__isAbsolute;
64 _ReminderImpl::Equals(const Object& rhs) const
66 const _ReminderImpl* pReminderImpl = dynamic_cast<const _ReminderImpl*>(&rhs);
68 if (pReminderImpl == null)
73 return (__absoluteTime.Equals(pReminderImpl->__absoluteTime) && __isAbsolute == pReminderImpl->__isAbsolute);
77 _ReminderImpl::GetHashCode(void) const
81 hashCode = ( hashCode << 4 ) ^ ( hashCode >> 28 ) ^ __absoluteTime.GetHashCode();
82 hashCode = ( hashCode << 4 ) ^ ( hashCode >> 28 ) ^ __isAbsolute;
88 _ReminderImpl::SetAbsoluteTime(const DateTime& time)
90 SysTryReturnResult(NID_SCL, _CalendarbookUtil::CheckValidDateTime(time), E_INVALID_ARG, "Invalid argument is used. time = %S", time.ToString().GetPointer());
92 __absoluteTime = time;
99 _ReminderImpl::GetAbsoluteTime(void) const
101 return __absoluteTime;
105 _ReminderImpl::IsAbsolute(void) const
111 _ReminderImpl::GetInstance(Reminder& reminder)
113 return reminder.__pReminderImpl;
117 _ReminderImpl::GetInstance(const Reminder& reminder)
119 return reminder.__pReminderImpl;