2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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.
18 #ifndef _ABSTRACT_LAYER_CALENDAR_EVENT_H_
19 #define _ABSTRACT_LAYER_CALENDAR_EVENT_H_
24 #include <dpl/shared_ptr.h>
26 #include "EventAttendee.h"
27 #include "EventRecurrenceRule.h"
33 #define UNDEFINED_CALENDAR_ID 0
34 #define UNDEFINED_ITEM_ID 0
35 #define UNDEFINED_GEO 0
36 #define UNDEFINED_ID "0"
38 typedef std::vector<std::string> CategoryList;
39 typedef DPL::SharedPtr<CategoryList> CategoryListPtr;
41 typedef std::vector<std::string> AttributeList;
42 typedef DPL::SharedPtr<AttributeList> AttributeListPtr;
44 /* This object represents a single calendar event */
71 CONFIDENTIAL_VISIBILITY,
81 UNDEFINED_AVAILABILITY
108 CalendarEvent(const CalendarEvent &original); // copy constructor for clone operation
109 virtual ~CalendarEvent();
112 void setId(int value);
114 bool getIdIsSet() const;
116 int getParentId() const;
117 void setParentId(int value);
119 int getCalendarId() const;
120 void setCalendarId(int value);
122 std::string getDescription() const;
123 void setDescription(const std::string &value);
125 std::string getSubject() const;
126 void setSubject(const std::string &value);
128 std::time_t getStartTime() const;
129 void setStartTime(std::time_t value);
131 std::time_t getEndTime() const;
132 void setEndTime(std::time_t value);
134 std::string getLocation() const;
135 void setLocation(const std::string &value);
137 EventRecurrenceRulePtr getRecurrenceRule() const;
138 void setRecurrenceRule(EventRecurrenceRulePtr value);
140 EventStatus getStatus() const;
141 void setStatus(EventStatus value);
143 std::vector<long> getAlarmsTick() const;
144 void setAlarmsTick(std::vector<long> &value);
146 std::vector<EventAlarmType> getAlarmsType() const;
147 void setAlarmsType(std::vector<EventAlarmType> &value);
149 std::vector<std::string> getAlarmsDescription() const;
150 void setAlarmsDescription(std::vector<std::string> &value);
152 CategoryListPtr getCategories() const;
153 void setCategories(const CategoryListPtr &value);
155 void display() const;
156 bool validate() const;
158 bool getIsAllDay() const;
159 void setIsAllDay(bool value);
161 std::time_t getLastModifiedDate() const;
162 void setLastModifiedDate(std::time_t value);
164 std::string getOrganizer() const;
165 void setOrganizer(const std::string &value);
167 EventVisibility getVisibility() const;
168 void setVisibility(EventVisibility value);
170 EventAvailability getAvailability() const;
171 void setAvailability(EventAvailability value);
173 std::string getUId() const;
174 void setUId(const std::string &value);
176 std::time_t getRecurrenceId() const;
177 void setRecurrenceId(std::time_t value);
179 EventAttendeeListPtr getAttendees() const;
180 void setAttendees(const EventAttendeeListPtr &value);
182 bool getIsDetached() const;
183 void setIsDetached(bool value);
185 void setAttributesOfInterest(AttributeListPtr value);
186 AttributeListPtr getAttributesOfInterest() const;
188 double getLatitude() const;
189 void setLatitude(double value);
191 double getLongitude() const;
192 void setLongitude(double value);
194 void setTimeZone(std::string value);
195 std::string getTimeZone() const;
197 TaskPriority getPriority() const;
198 void setPriority(TaskPriority value);
200 std::time_t getCreatedDate() const;
201 void setCreatedDate(std::time_t value);
203 std::time_t getCompletedDate() const;
204 void setCompletedDate(std::time_t value);
206 int getProgress() const;
207 void setProgress(int value);
209 CalendarType getCalendarType() const;
210 void setCalendarType(CalendarType type);
214 int m_parentId; // the parent id if it's detached.
216 std::string m_description;
217 std::string m_subject;
218 std::time_t m_startTime;
219 std::time_t m_endTime;
220 std::string m_location;
221 EventRecurrenceRulePtr m_recurrence;
222 EventStatus m_status;
223 std::vector<long> m_alarmsTick;
224 std::vector<EventAlarmType> m_alarmsType;
225 std::vector<std::string> m_alarmsDescription;
226 CategoryListPtr m_categories;
228 std::string m_organizer;
229 std::time_t m_lastModifiedDate;
230 EventVisibility m_visibility;
231 EventAvailability m_availability;
232 std::string m_uid; // uid is same with id.
233 std::time_t m_recurrenceId;
234 EventAttendeeListPtr m_attendees;
236 AttributeListPtr m_attributesOfInterest;
239 std::string m_timeZone;
240 TaskPriority m_priority;
241 std::time_t m_createdDate;
242 std::time_t m_completedDate;
244 CalendarType m_calendarType;
247 typedef DPL::SharedPtr<CalendarEvent> CalendarEventPtr;
248 typedef std::vector<CalendarEventPtr> CalendarEventList;
249 typedef DPL::SharedPtr<CalendarEventList> CalendarEventListPtr;
255 #endif /* _ABSTRACT_LAYER_CALENDAR_EVENT_H_ */