2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 #ifndef _ABSTRACT_LAYER_CALENDAR_EVENT_H_
20 #define _ABSTRACT_LAYER_CALENDAR_EVENT_H_
25 #include <dpl/shared_ptr.h>
27 #include "EventAlarm.h"
28 #include "EventAttendee.h"
29 #include "EventRecurrenceRule.h"
34 #define UNDEFINED_CALENDAR_ID -1
35 #define UNDEFINED_ITEM_ID -1
36 #define UNDEFINED_GEO -1
37 #define UNDEFINED_ID "-1"
39 typedef std::vector<std::string> AttributeList;
40 typedef DPL::SharedPtr<AttributeList> AttributeListPtr;
42 /* This object represents a single calendar event */
61 CONFIDENTIAL_VISIBILITY,
71 UNDEFINED_AVAILABILITY
98 CalendarEvent(const CalendarEvent &original); // copy constructor for clone operation
99 virtual ~CalendarEvent();
102 void setId(int value);
104 bool getIdIsSet() const;
106 int getParentId() const;
107 void setParentId(int value);
109 int getCalendarId() const;
110 void setCalendarId(int value);
112 std::string getDescription() const;
113 void setDescription(const std::string &value);
115 std::string getSubject() const;
116 void setSubject(const std::string &value);
118 long long int getStartTime() const;
119 void setStartTime(long long int value);
121 long long int getEndTime() const;
122 void setEndTime(long long int value);
124 std::string getLocation() const;
125 void setLocation(const std::string &value);
127 EventRecurrenceRulePtr getRecurrenceRule() const;
128 void setRecurrenceRule(EventRecurrenceRulePtr value);
130 EventStatus getStatus() const;
131 void setStatus(EventStatus value);
133 EventAlarmListPtr getAlarms() const;
134 void setAlarms(const EventAlarmListPtr value);
136 StringArrayPtr getCategories() const;
137 void setCategories(const StringArrayPtr value);
139 void display() const;
140 bool validate() const;
142 bool getIsAllDay() const;
143 void setIsAllDay(bool value);
145 long long int getLastModifiedDate() const;
146 void setLastModifiedDate(long long int value);
148 std::string getOrganizer() const;
149 void setOrganizer(const std::string &value);
151 EventVisibility getVisibility() const;
152 void setVisibility(EventVisibility value);
154 EventAvailability getAvailability() const;
155 void setAvailability(EventAvailability value);
157 std::string getUId() const;
158 void setUId(const std::string &value);
160 long long int getRecurrenceId() const;
161 void setRecurrenceId(long long int value);
163 EventAttendeeListPtr getAttendees() const;
164 void setAttendees(const EventAttendeeListPtr value);
166 bool getIsDetached() const;
167 void setIsDetached(bool value);
169 void setAttributesOfInterest(AttributeListPtr value);
170 AttributeListPtr getAttributesOfInterest() const;
172 double getLatitude() const;
173 void setLatitude(double value);
175 double getLongitude() const;
176 void setLongitude(double value);
178 void setTimeZone(std::string value);
179 std::string getTimeZone() const;
181 TaskPriority getPriority() const;
182 void setPriority(TaskPriority value);
184 long long int getCreatedDate() const;
185 void setCreatedDate(long long int value);
187 long long int getCompletedDate() const;
188 void setCompletedDate(long long int value);
190 int getProgress() const;
191 void setProgress(int value);
193 CalendarType getCalendarType() const;
194 void setCalendarType(CalendarType type);
198 int m_parentId; // the parent id if it's detached.
200 std::string m_description;
201 std::string m_subject;
202 long long int m_startTime;
203 long long int m_endTime;
204 std::string m_location;
205 EventRecurrenceRulePtr m_recurrence;
206 EventStatus m_status;
207 EventAlarmListPtr m_alarms;
208 StringArrayPtr m_categories;
210 std::string m_organizer;
211 long long int m_lastModifiedDate;
212 EventVisibility m_visibility;
213 EventAvailability m_availability;
214 std::string m_uid; // uid is same with id.
215 long long int m_recurrenceId;
216 EventAttendeeListPtr m_attendees;
218 AttributeListPtr m_attributesOfInterest;
221 std::string m_timeZone;
222 TaskPriority m_priority;
223 long long int m_createdDate;
224 long long int m_completedDate;
226 CalendarType m_calendarType;
229 typedef DPL::SharedPtr<CalendarEvent> CalendarEventPtr;
230 typedef std::vector<CalendarEventPtr> CalendarEventList;
231 typedef DPL::SharedPtr<CalendarEventList> CalendarEventListPtr;
236 #endif /* _ABSTRACT_LAYER_CALENDAR_EVENT_H_ */