Tizen 2.0 Release
[platform/framework/native/social.git] / src / inc / FScl_CalEventInstanceImpl.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17 /**
18  * @file                FScl_CalEventInstanceImpl.h
19  * @brief       This is the header file for the _CalEventInstanceImpl class.
20  *
21  * This header file contains the declarations of the _CalEventInstanceImpl class.
22  */
23
24 #ifndef _FSCL_INTERNAL_CAL_EVENT_INSTANCE_IMPL_H_
25 #define _FSCL_INTERNAL_CAL_EVENT_INSTANCE_IMPL_H_
26
27 #include <FBaseObject.h>
28 #include <FSclTypes.h>
29
30 namespace Tizen { namespace Base
31 {
32 class String;
33 class DateTime;
34 } }
35
36 namespace Tizen { namespace Social
37 {
38
39 class CalEventInstance;
40
41 /**
42  *      @class  _CalEventInstanceImpl
43  *      @brief  This class provides
44  */
45 class _CalEventInstanceImpl
46         : public Tizen::Base::Object
47 {
48 public:
49         /**
50          * This is the default constructor for this class.
51          */
52         _CalEventInstanceImpl(void);
53
54         /**
55          * Copying of objects using this copy constructor is allowed.
56          *
57          * @param[in]   rhs             An instance of _CalEventInstanceImpl
58          */
59         _CalEventInstanceImpl(const _CalEventInstanceImpl& rhs);
60
61         /**
62          * This destructor overrides Tizen::Base::Object::~Object().
63          */
64         virtual ~_CalEventInstanceImpl(void);
65
66         /**
67          * Compares the input Object with the calling %_CalEventInstanceImpl instance.
68          *
69          * @return              @c true if the input object equals the calling %_CalEventInstanceImpl instance, @n
70          else @c false
71          * @param[in]   rhs     The object instance to compare with the calling object
72          */
73         virtual bool Equals(const Tizen::Base::Object& rhs) const;
74
75         /**
76          * Gets the hash value of the current instance.
77          *
78          * @return              The hash value of the current instance
79          */
80         virtual int GetHashCode(void) const;
81
82         /**
83          * Gets the original event ID.
84          *
85          * @since       2.0
86          *
87          * @return              The original event ID.
88          */
89         RecordId GetOriginalEventId(void) const;
90
91         /**
92          * Gets the calendar ID.
93          *
94          * @since       2.0
95          *
96          * @return              The calendar ID, @n
97          *                              else @c INVALID_RECORD_ID if the instance is not associated with any calendar.
98          */
99         RecordId GetCalendarId(void) const;
100
101         /**
102          * Gets the start time.
103          *
104          * @since       2.0
105          *
106          * @return              The start time.
107          */
108         Tizen::Base::DateTime GetStartTime(void) const;
109
110         /**
111          * Gets the end time.
112          *
113          * @since       2.0
114          *
115          * @return              The end time.
116          */
117         Tizen::Base::DateTime GetEndTime(void) const;
118
119         /**
120          * Gets the subject.
121          *
122          * @since       2.0
123          *
124          * @return              The subject.
125          */
126         Tizen::Base::String GetSubject(void) const;
127
128         /**
129          * Gets the description.
130          *
131          * @since       2.0
132          *
133          * @return              The description.
134          */
135         Tizen::Base::String GetDescription(void) const;
136
137         /**
138          * Gets the location.
139          *
140          * @since       2.0
141          *
142          * @return              The location.
143          */
144         Tizen::Base::String GetLocation(void) const;
145
146         /**
147          * Checks whether the original event of this instance  is an all day event.
148          *
149          * @since       2.0
150          *
151          * @return              @c true if the original event of this instance is an all day event, @n
152          *                              else @c false
153          */
154         bool IsAllDayEvent(void) const;
155
156         /**
157          * Gets the busy status.
158          *
159          * @since       2.0
160          *
161          * @return              The busy status.
162          */
163         BusyStatus GetBusyStatus(void) const;
164
165         /**
166          * Gets the event status of the original event.
167          *
168          * @since       2.0
169          *
170          * @return              The event status of the original event.
171          */
172         EventStatus GetStatus(void) const;
173
174         /**
175          * Gets the priority level of the original event.
176          *
177          * @since       2.0
178          *
179          * @return              The priority level
180          */
181         EventPriority GetPriority(void) const;
182
183         /**
184          * Gets the sensitivity of the original event.
185          *
186          * @since       2.0
187          *
188          * @return              The sensitivity of the original event
189          */
190         RecordSensitivity GetSensitivity(void) const;
191
192         /**
193          * Checks whether the event instance has a recurring pattern.
194          *
195          * @since       2.0
196          *
197          * @return              @c true if the event instance has a recurring pattern, @n
198          *                              else @c false
199          */
200         bool IsRecurring(void) const;
201
202         /**
203          * Checks whether the event instance has reminders.
204          *
205          * @since       2.0
206          *
207          * @return              @c true if the event instance has reminders, @n
208          *                              else @c false
209          */
210         bool HasReminder(void) const;
211
212         //
213         // Sets the original event ID
214         //
215         void SetOriginalEventId(RecordId originalEventId);
216
217         //
218         // Sets the calendar ID
219         //
220         void SetCalendarId(RecordId calendarId);
221
222         //
223         // Sets the start time
224         //
225         void SetStartTime(const Tizen::Base::DateTime& startTime);
226
227         //
228         // Sets the end time
229         //
230         void SetEndTime(const Tizen::Base::DateTime& endTime);
231
232         //
233         // Sets the subject
234         //
235         void SetSubject(const Tizen::Base::String& subject);
236
237         //
238         // Sets the description
239         //
240         void SetDescription(const Tizen::Base::String& description);
241
242         //
243         // Sets the location
244         //
245         void SetLocation(const Tizen::Base::String& location);
246
247         //
248         // Sets whether the event instance is all day event or not
249         //
250         void SetAllDayEvent(bool isAllDayEvent);
251
252         //
253         // Sets the busy status
254         //
255         void SetBusyStatus(BusyStatus busyStatus);
256
257         //
258         // Sets the status
259         //
260         void SetStatus(EventStatus status);
261
262         //
263         // Sets the priority
264         //
265         void SetPriority(EventPriority priority);
266
267         //
268         // Sets the sensitivity
269         //
270         void SetSensitivity(RecordSensitivity sensitivity);
271
272         //
273         // Sets whether the event instance is recurring or not
274         //
275         void SetRecurring(bool isRecurring);
276
277         //
278         // Sets whether the event instance is reminder or not
279         //
280         void SetHasReminder(bool hasReminder);
281
282         /**
283          * Gets the Impl instance.
284          *
285          * @return                      The pointer to _CalEventInstanceImpl
286          * @param[in]   eventInstance           An instance of %CalEventInstance class
287          */
288         static _CalEventInstanceImpl* GetInstance(CalEventInstance& eventInstance);
289
290         /**
291          * Gets the Impl instance.
292          *
293          * @return                      The pointer to const _CalEventInstanceImpl
294          * @param[in]   eventInstance           A const instance of %CalEventInstance class
295          */
296         static const _CalEventInstanceImpl* GetInstance(const CalEventInstance& eventInstance);
297
298         /**
299          * Copying of objects using this copy assignment operator is allowed.
300          *
301          * @param[in]   rhs             An instance of _CalEventInstanceImpl
302          */
303         _CalEventInstanceImpl& operator =(const _CalEventInstanceImpl& rhs);
304
305 private:
306         RecordId __originalEventId;
307         RecordId __calendarId;
308         Tizen::Base::DateTime __startDateTime;
309         Tizen::Base::DateTime __endDateTime;
310         Tizen::Base::String __subject;
311         Tizen::Base::String __description;
312         Tizen::Base::String __location;
313         bool __isAllDayEvent;
314         BusyStatus __busyStatus;
315         EventStatus __status;
316         EventPriority __priority;
317         RecordSensitivity __sensitivity;
318         bool __isRecurring;
319         bool __hasReminder;
320 };
321 // _CalEventInstanceImpl
322
323 }} // Tizen::Social
324
325 #endif//_FSCL_INTERNAL_CAL_EVENT_INSTANCE_IMPL_H_