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 virtual ~CalendarEvent();
116 void setId(int value);
118 bool getIdIsSet() const;
120 int getCalendarId() const;
121 void setCalendarId(int value);
123 std::string getDescription() const;
124 void setDescription(const std::string &value);
126 std::string getSubject() const;
127 void setSubject(const std::string &value);
129 std::time_t getStartTime() const;
130 void setStartTime(std::time_t value);
132 std::time_t getEndTime() const;
133 void setEndTime(std::time_t value);
135 std::string getLocation() const;
136 void setLocation(const std::string &value);
138 EventRecurrenceRulePtr getRecurrenceRule() const;
139 void setRecurrenceRule(EventRecurrenceRulePtr value);
141 EventStatus getStatus() const;
142 void setStatus(EventStatus value);
144 std::vector<long> getAlarmsTick() const;
145 void setAlarmsTick(std::vector<long> &value);
147 std::vector<EventAlarmType> getAlarmsType() const;
148 void setAlarmsType(std::vector<EventAlarmType> &value);
150 CategoryListPtr getCategories() const;
151 void setCategories(const CategoryListPtr &value);
153 void display() const;
154 bool validate() const;
156 bool getIsAllDay() const;
157 void setIsAllDay(bool value);
159 std::time_t getLastModifiedDate() const;
160 void setLastModifiedDate(std::time_t value);
162 std::string getOrganizer() const;
163 void setOrganizer(const std::string &value);
165 EventVisibility getVisibility() const;
166 void setVisibility(EventVisibility value);
168 EventAvailability getAvailability() const;
169 void setAvailability(EventAvailability value);
171 std::string getUId() const;
172 void setUId(const std::string &value);
174 std::time_t getRecurrenceId() const;
175 void setRecurrenceId(std::time_t value);
177 EventAttendeeListPtr getAttendees() const;
178 void setAttendees(const EventAttendeeListPtr &value);
180 bool getIsDetached() const;
181 void setIsDetached(bool value);
183 void setAttributesOfInterest(AttributeListPtr value);
184 AttributeListPtr getAttributesOfInterest() const;
186 void setGeolocation(CalendarItemGeoPtr value);
187 CalendarItemGeoPtr getGeolocation() const;
189 void setTimeZone(std::string value);
190 std::string getTimeZone() const;
192 TaskPriority getPriority() const;
193 void setPriority(TaskPriority value);
195 std::time_t getCreatedDate() const;
196 void setCreatedDate(std::time_t value);
198 std::time_t getCompletedDate() const;
199 void setCompletedDate(std::time_t value);
201 int getProgress() const;
202 void setProgress(int value);
204 CalendarType getCalendarType() const;
205 void setCalendarType(CalendarType type);
208 DPL::Optional<int> m_id;
210 std::string m_description;
211 std::string m_subject;
212 std::time_t m_startTime;
213 std::time_t m_endTime;
214 std::string m_location;
215 EventRecurrenceRulePtr m_recurrence;
216 EventStatus m_status;
217 std::vector<long> m_alarmsTick;
218 std::vector<EventAlarmType> m_alarmsType;
219 CategoryListPtr m_categories;
221 std::string m_organizer;
222 std::time_t m_lastModifiedDate;
223 EventVisibility m_visibility;
224 EventAvailability m_availability;
226 std::time_t m_recurrenceId;
227 EventAttendeeListPtr m_attendees;
229 AttributeListPtr m_attributesOfInterest;
230 CalendarItemGeoPtr m_geolocation;
231 std::string m_timeZone;
232 TaskPriority m_priority;
233 std::time_t m_createdDate;
234 std::time_t m_completedDate;
236 CalendarType m_calendarType;
239 typedef DPL::SharedPtr<CalendarEvent> CalendarEventPtr;
240 typedef std::vector<CalendarEventPtr> CalendarEventList;
241 typedef DPL::SharedPtr<CalendarEventList> CalendarEventListPtr;
247 #endif /* _ABSTRACT_LAYER_CALENDAR_EVENT_H_ */