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 FScl_ContactEventImpl.cpp
19 * @brief This is the implementation for _ContactEventImpl class.
21 * This file contains definitions of @e _ContactEventImpl class.
24 #include <FSclContactEvent.h>
25 #include <FBaseSysLog.h>
26 #include "FScl_ContactEventImpl.h"
28 using namespace Tizen::Base;
30 namespace Tizen { namespace Social
33 _ContactEventImpl::_ContactEventImpl(void)
37 _ContactEventImpl::_ContactEventImpl(const _ContactEventImpl& rhs)
41 __label = rhs.__label;
44 _ContactEventImpl::~_ContactEventImpl(void)
50 _ContactEventImpl::operator =(const _ContactEventImpl& rhs)
59 __label = rhs.__label;
65 _ContactEventImpl::operator ==(const _ContactEventImpl& rhs) const
67 if (__date != rhs.__date)
72 if (__type != rhs.__type)
77 if (__label != rhs.__label)
86 _ContactEventImpl::operator !=(const _ContactEventImpl& rhs) const
88 return !(*this == rhs);
92 _ContactEventImpl::Equals(const Object& rhs) const
94 const _ContactEventImpl* pContactEvent = dynamic_cast<const _ContactEventImpl*>(&rhs);
95 if (pContactEvent == null)
100 return *this == *pContactEvent;
104 _ContactEventImpl::GetHashCode(void) const
106 int hash = __date.GetHashCode() + __label.GetHashCode() + __type;
112 _ContactEventImpl::GetType(void) const
118 _ContactEventImpl::GetDate(void) const
124 _ContactEventImpl::GetLabel(void) const
130 _ContactEventImpl::SetType(ContactEventType type)
136 _ContactEventImpl::SetDate(const DateTime& date)
142 _ContactEventImpl::SetLabel(const String& label)
147 const _ContactEventImpl*
148 _ContactEventImpl::GetInstance(const ContactEvent& contactEvent)
150 return contactEvent.__pContactEventImpl;
154 _ContactEventImpl::GetInstance(ContactEvent& contactEvent)
156 return contactEvent.__pContactEventImpl;