Modify the spec file for secure log
[framework/osp/social.git] / src / FSclCalEventInstance.cpp
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
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
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
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.
15 //
16 /**
17  * @file                FSclCalEventInstance.cpp
18  * @brief               This is the implementation for CalEventInstance class.
19  *
20  * This file contains definitions of @e CalEventInstance class.
21  */
22
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"
29
30 using namespace Tizen::Base;
31
32 namespace Tizen { namespace Social {
33
34 CalEventInstance::CalEventInstance(void)
35         : __pCalEventInstanceImpl(null)
36 {
37         __pCalEventInstanceImpl = new (std::nothrow) _CalEventInstanceImpl();
38         SysTryReturnVoidResult(NID_SCL, __pCalEventInstanceImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
39 }
40
41 CalEventInstance::CalEventInstance(const CalEventInstance& rhs)
42         : __pCalEventInstanceImpl(null)
43 {
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.");
46 }
47
48 CalEventInstance::~CalEventInstance(void)
49 {
50         delete __pCalEventInstanceImpl;
51 }
52
53 CalEventInstance&
54 CalEventInstance::operator =(const CalEventInstance& rhs)
55 {
56         if (this == &rhs)
57         {
58                 return *this;
59         }
60
61         *__pCalEventInstanceImpl = *rhs.__pCalEventInstanceImpl;
62
63         return *this;
64 }
65
66 bool
67 CalEventInstance::Equals(const Object& rhs) const
68 {
69         const CalEventInstance* pCalEventInstance = dynamic_cast<const CalEventInstance*>(&rhs);
70         if (pCalEventInstance == null)
71         {
72                 return false;
73         }
74
75         return __pCalEventInstanceImpl->Equals(*_CalEventInstanceImpl::GetInstance(*pCalEventInstance));
76 }
77
78 int
79 CalEventInstance::GetHashCode(void) const
80 {
81         return __pCalEventInstanceImpl->GetHashCode();
82 }
83
84 RecordId
85 CalEventInstance::GetOriginalEventId(void) const
86 {
87         return __pCalEventInstanceImpl->GetOriginalEventId();
88 }
89
90 RecordId
91 CalEventInstance::GetCalendarId(void) const
92 {
93         return __pCalEventInstanceImpl->GetCalendarId();
94 }
95
96 DateTime
97 CalEventInstance::GetStartTime(void) const
98 {
99         return __pCalEventInstanceImpl->GetStartTime();
100 }
101
102 DateTime
103 CalEventInstance::GetEndTime(void) const
104 {
105         return __pCalEventInstanceImpl->GetEndTime();
106 }
107
108 String
109 CalEventInstance::GetSubject(void) const
110 {
111         return __pCalEventInstanceImpl->GetSubject();
112 }
113
114 String
115 CalEventInstance::GetDescription(void) const
116 {
117         return __pCalEventInstanceImpl->GetDescription();
118 }
119
120 String
121 CalEventInstance::GetLocation(void) const
122 {
123         return __pCalEventInstanceImpl->GetLocation();
124 }
125
126 bool
127 CalEventInstance::IsAllDayEvent(void) const
128 {
129         return __pCalEventInstanceImpl->IsAllDayEvent();
130 }
131
132 BusyStatus
133 CalEventInstance::GetBusyStatus(void) const
134 {
135         return __pCalEventInstanceImpl->GetBusyStatus();
136 }
137
138 EventStatus
139 CalEventInstance::GetStatus(void) const
140 {
141         return __pCalEventInstanceImpl->GetStatus();
142 }
143
144 EventPriority
145 CalEventInstance::GetPriority(void) const
146 {
147         return __pCalEventInstanceImpl->GetPriority();
148 }
149
150 RecordSensitivity
151 CalEventInstance::GetSensitivity(void) const
152 {
153         return __pCalEventInstanceImpl->GetSensitivity();
154 }
155
156 bool
157 CalEventInstance::IsRecurring(void) const
158 {
159         return __pCalEventInstanceImpl->IsRecurring();
160 }
161
162 bool
163 CalEventInstance::HasReminder(void) const
164 {
165         return __pCalEventInstanceImpl->HasReminder();
166 }
167
168 }} // Tizen::Social