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/optional.h>
25 #include <dpl/shared_ptr.h>
27 #include "CalendarItemGeo.h"
28 #include "EventAttendee.h"
29 #include "EventRecurrenceRule.h"
35 typedef std::vector<std::string> CategoryList;
36 typedef DPL::SharedPtr<CategoryList> CategoryListPtr;
38 typedef std::vector<std::string> AttributeList;
39 typedef DPL::SharedPtr<AttributeList> AttributeListPtr;
41 /* This object represents a single calendar event */
46 static const int UNDEFINED_CALENDAR_ID = -1;
56 INVALID_STATUS = 10000,
65 INVALID_ALARM_TYPE = 10000,
73 CONFIDENTIAL_VISIBILITY,
74 INVALID_VISIBILITY = 10000,
84 INVALID_AVAILABILITY = 10000,
85 UNDEFINED_AVAILABILITY
93 INVALID_PRIORITY = 10000,
101 INVALID_FORMAT = 10000,
113 CalendarEvent(const CalendarEvent &original); // copy constructor for clone operation
114 virtual ~CalendarEvent();
117 void setId(int value);
119 bool getIdIsSet() const;
121 int getCalendarId() const;
122 void setCalendarId(int value);
124 std::string getDescription() const;
125 void setDescription(const std::string &value);
127 std::string getSubject() const;
128 void setSubject(const std::string &value);
130 std::time_t getStartTime() const;
131 void setStartTime(std::time_t value);
133 std::time_t getEndTime() const;
134 void setEndTime(std::time_t value);
136 std::string getLocation() const;
137 void setLocation(const std::string &value);
139 EventRecurrenceRulePtr getRecurrenceRule() const;
140 void setRecurrenceRule(EventRecurrenceRulePtr value);
142 EventStatus getStatus() const;
143 void setStatus(EventStatus value);
145 std::vector<long> getAlarmsTick() const;
146 void setAlarmsTick(std::vector<long> &value);
148 std::vector<EventAlarmType> getAlarmsType() const;
149 void setAlarmsType(std::vector<EventAlarmType> &value);
151 std::vector<std::string> getAlarmsDescription() const;
152 void setAlarmsDescription(std::vector<std::string> &value);
154 CategoryListPtr getCategories() const;
155 void setCategories(const CategoryListPtr &value);
157 void display() const;
158 bool validate() const;
160 bool getIsAllDay() const;
161 void setIsAllDay(bool value);
163 std::time_t getLastModifiedDate() const;
164 void setLastModifiedDate(std::time_t value);
166 std::string getOrganizer() const;
167 void setOrganizer(const std::string &value);
169 EventVisibility getVisibility() const;
170 void setVisibility(EventVisibility value);
172 EventAvailability getAvailability() const;
173 void setAvailability(EventAvailability value);
175 std::string getUId() const;
176 void setUId(const std::string &value);
178 std::time_t getRecurrenceId() const;
179 void setRecurrenceId(std::time_t value);
181 EventAttendeeListPtr getAttendees() const;
182 void setAttendees(const EventAttendeeListPtr &value);
184 bool getIsDetached() const;
185 void setIsDetached(bool value);
187 void setAttributesOfInterest(AttributeListPtr value);
188 AttributeListPtr getAttributesOfInterest() const;
190 void setGeolocation(CalendarItemGeoPtr value);
191 CalendarItemGeoPtr getGeolocation() const;
193 void setTimeZone(std::string value);
194 std::string getTimeZone() const;
196 TaskPriority getPriority() const;
197 void setPriority(TaskPriority value);
199 std::time_t getCreatedDate() const;
200 void setCreatedDate(std::time_t value);
202 std::time_t getCompletedDate() const;
203 void setCompletedDate(std::time_t value);
205 int getProgress() const;
206 void setProgress(int value);
208 CalendarType getCalendarType() const;
209 void setCalendarType(CalendarType type);
212 DPL::Optional<int> m_id;
214 std::string m_description;
215 std::string m_subject;
216 std::time_t m_startTime;
217 std::time_t m_endTime;
218 std::string m_location;
219 EventRecurrenceRulePtr m_recurrence;
220 EventStatus m_status;
221 std::vector<long> m_alarmsTick;
222 std::vector<EventAlarmType> m_alarmsType;
223 std::vector<std::string> m_alarmsDescription;
224 CategoryListPtr m_categories;
226 std::string m_organizer;
227 std::time_t m_lastModifiedDate;
228 EventVisibility m_visibility;
229 EventAvailability m_availability;
231 std::time_t m_recurrenceId;
232 EventAttendeeListPtr m_attendees;
234 AttributeListPtr m_attributesOfInterest;
235 CalendarItemGeoPtr m_geolocation;
236 std::string m_timeZone;
237 TaskPriority m_priority;
238 std::time_t m_createdDate;
239 std::time_t m_completedDate;
241 CalendarType m_calendarType;
244 typedef DPL::SharedPtr<CalendarEvent> CalendarEventPtr;
245 typedef std::vector<CalendarEventPtr> CalendarEventList;
246 typedef DPL::SharedPtr<CalendarEventList> CalendarEventListPtr;
252 #endif /* _ABSTRACT_LAYER_CALENDAR_EVENT_H_ */