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 "EventAlarm.h"
27 #include "EventAttendee.h"
28 #include "EventRecurrenceRule.h"
34 #define UNDEFINED_CALENDAR_ID 0
35 #define UNDEFINED_ITEM_ID 0
36 #define UNDEFINED_PARENT_ID -1
37 #define UNDEFINED_GEO 0
38 #define UNDEFINED_ID "0"
40 typedef std::vector<std::string> AttributeList;
41 typedef DPL::SharedPtr<AttributeList> AttributeListPtr;
43 /* This object represents a single calendar event */
62 CONFIDENTIAL_VISIBILITY,
72 UNDEFINED_AVAILABILITY
99 CalendarEvent(const CalendarEvent &original); // copy constructor for clone operation
100 virtual ~CalendarEvent();
103 void setId(int value);
105 bool getIdIsSet() const;
107 int getParentId() const;
108 void setParentId(int value);
110 int getCalendarId() const;
111 void setCalendarId(int value);
113 std::string getDescription() const;
114 void setDescription(const std::string &value);
116 std::string getSubject() const;
117 void setSubject(const std::string &value);
119 long long int getStartTime() const;
120 void setStartTime(long long int value);
122 long long int getEndTime() const;
123 void setEndTime(long long int value);
125 std::string getLocation() const;
126 void setLocation(const std::string &value);
128 EventRecurrenceRulePtr getRecurrenceRule() const;
129 void setRecurrenceRule(EventRecurrenceRulePtr value);
131 EventStatus getStatus() const;
132 void setStatus(EventStatus value);
134 EventAlarmListPtr getAlarms() const;
135 void setAlarms(const EventAlarmListPtr value);
137 StringArrayPtr getCategories() const;
138 void setCategories(const StringArrayPtr value);
140 void display() const;
141 bool validate() const;
143 bool getIsAllDay() const;
144 void setIsAllDay(bool value);
146 long long int getLastModifiedDate() const;
147 void setLastModifiedDate(long long int value);
149 std::string getOrganizer() const;
150 void setOrganizer(const std::string &value);
152 EventVisibility getVisibility() const;
153 void setVisibility(EventVisibility value);
155 EventAvailability getAvailability() const;
156 void setAvailability(EventAvailability value);
158 std::string getUId() const;
159 void setUId(const std::string &value);
161 long long int getRecurrenceId() const;
162 void setRecurrenceId(long long int value);
164 EventAttendeeListPtr getAttendees() const;
165 void setAttendees(const EventAttendeeListPtr value);
167 bool getIsDetached() const;
168 void setIsDetached(bool value);
170 void setAttributesOfInterest(AttributeListPtr value);
171 AttributeListPtr getAttributesOfInterest() const;
173 double getLatitude() const;
174 void setLatitude(double value);
176 double getLongitude() const;
177 void setLongitude(double value);
179 void setTimeZone(std::string value);
180 std::string getTimeZone() const;
182 TaskPriority getPriority() const;
183 void setPriority(TaskPriority value);
185 long long int getCreatedDate() const;
186 void setCreatedDate(long long int value);
188 long long int getCompletedDate() const;
189 void setCompletedDate(long long int value);
191 int getProgress() const;
192 void setProgress(int value);
194 CalendarType getCalendarType() const;
195 void setCalendarType(CalendarType type);
199 int m_parentId; // the parent id if it's detached.
201 std::string m_description;
202 std::string m_subject;
203 long long int m_startTime;
204 long long int m_endTime;
205 std::string m_location;
206 EventRecurrenceRulePtr m_recurrence;
207 EventStatus m_status;
208 EventAlarmListPtr m_alarms;
209 StringArrayPtr m_categories;
211 std::string m_organizer;
212 long long int m_lastModifiedDate;
213 EventVisibility m_visibility;
214 EventAvailability m_availability;
215 std::string m_uid; // uid is same with id.
216 long long int m_recurrenceId;
217 EventAttendeeListPtr m_attendees;
219 AttributeListPtr m_attributesOfInterest;
222 std::string m_timeZone;
223 TaskPriority m_priority;
224 long long int m_createdDate;
225 long long int m_completedDate;
227 CalendarType m_calendarType;
230 typedef DPL::SharedPtr<CalendarEvent> CalendarEventPtr;
231 typedef std::vector<CalendarEventPtr> CalendarEventList;
232 typedef DPL::SharedPtr<CalendarEventList> CalendarEventListPtr;
238 #endif /* _ABSTRACT_LAYER_CALENDAR_EVENT_H_ */