blob: ea2728e703b2ee024665ed40520d030aa168d3c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
//
// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
/**
* @file FScl_CalEventChangeInfoImpl.cpp
* @brief This is the implementation for _CalEventChangeInfoImpl class.
*
* This file contains definitions of @e _CalEventChangeInfoImpl class.
*/
#include <FSclCalEventChangeInfo.h>
#include <FSclRecord.h>
#include "FScl_CalEventChangeInfoImpl.h"
#include "FScl_RecordImpl.h"
using namespace Tizen::Base;
namespace Tizen { namespace Social
{
const static int _INVALID_VERSION = -1;
_CalEventChangeInfoImpl::_CalEventChangeInfoImpl(void)
: __changeType(RECORD_CHANGE_TYPE_ADDED)
, __eventId(INVALID_RECORD_ID)
, __calendarId(INVALID_RECORD_ID)
, __version(_INVALID_VERSION)
{
}
_CalEventChangeInfoImpl::_CalEventChangeInfoImpl(const _CalEventChangeInfoImpl& rhs)
: __changeType(rhs.__changeType)
, __eventId(rhs.__eventId)
, __calendarId(rhs.__calendarId)
, __version(rhs.__version)
{
}
_CalEventChangeInfoImpl::~_CalEventChangeInfoImpl(void)
{
}
_CalEventChangeInfoImpl&
_CalEventChangeInfoImpl::operator =(const _CalEventChangeInfoImpl& rhs)
{
if (this == &rhs)
{
return *this;
}
__changeType = rhs.__changeType;
__eventId = rhs.__eventId;
__calendarId = rhs.__calendarId;
__version = rhs.__version;
return *this;
}
bool
_CalEventChangeInfoImpl::Equals(const Object& rhs) const
{
const _CalEventChangeInfoImpl* pCalEventChangeInfoImpl = dynamic_cast<const _CalEventChangeInfoImpl*>(&rhs);
if (pCalEventChangeInfoImpl == null)
{
return false;
}
return (__changeType == pCalEventChangeInfoImpl->__changeType && __eventId == pCalEventChangeInfoImpl->__eventId
&& __calendarId == pCalEventChangeInfoImpl->__calendarId && __version == pCalEventChangeInfoImpl->__version);
}
int
_CalEventChangeInfoImpl::GetHashCode(void) const
{
int hashCode = 17;
hashCode = ( hashCode << 4 ) ^ ( hashCode >> 28 ) ^ __changeType;
hashCode = static_cast<int>(( hashCode << 4 ) ^ ( hashCode >> 28 ) ^ __eventId);
hashCode = static_cast<int>(( hashCode << 4 ) ^ ( hashCode >> 28 ) ^ __calendarId);
hashCode = ( hashCode << 4 ) ^ ( hashCode >> 28 ) ^ __version;
return hashCode;
}
RecordChangeType
_CalEventChangeInfoImpl::GetChangeType(void) const
{
return __changeType;
}
RecordId
_CalEventChangeInfoImpl::GetEventId(void) const
{
return __eventId;
}
RecordId
_CalEventChangeInfoImpl::GetCalendarId(void) const
{
return __calendarId;
}
int
_CalEventChangeInfoImpl::GetVersion(void) const
{
return __version;
}
void
_CalEventChangeInfoImpl::SetChangeType(RecordChangeType changeType)
{
__changeType = changeType;
}
void
_CalEventChangeInfoImpl::SetEventId(RecordId eventId)
{
__eventId = eventId;
}
void
_CalEventChangeInfoImpl::SetCalendarId(RecordId calendarId)
{
__calendarId = calendarId;
}
void
_CalEventChangeInfoImpl::SetVersion(int version)
{
__version = version;
}
_CalEventChangeInfoImpl*
_CalEventChangeInfoImpl::GetInstance(CalEventChangeInfo& calEventChangeInfo)
{
return calEventChangeInfo.__pCalEventChangeInfoImpl;
}
const _CalEventChangeInfoImpl*
_CalEventChangeInfoImpl::GetInstance(const CalEventChangeInfo& calEventChangeInfo)
{
return calEventChangeInfo.__pCalEventChangeInfoImpl;
}
}} // Tizen::Social
|