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 _CALENDAR_EVENT_WRAPPER_H_
19 #define _CALENDAR_EVENT_WRAPPER_H_
22 #include <calendar-svc-provider.h>
23 #include <dpl/shared_ptr.h>
24 #include <API/Calendar/CalendarEvent.h>
25 #include <API/Calendar/EventAlarm.h>
26 #include <API/Calendar/EventAttendee.h>
27 #include <API/Calendar/EventRecurrenceRule.h>
29 using namespace TizenApis::Api::Calendar;
38 EventWrapper(CalendarEvent::CalendarType type = CalendarEvent::EVENT_TYPE);
39 explicit EventWrapper(const CalendarEventPtr &event, CalendarEvent::CalendarType type = CalendarEvent::EVENT_TYPE);
40 explicit EventWrapper(cal_struct *event, CalendarEvent::CalendarType type = CalendarEvent::EVENT_TYPE);
41 virtual ~EventWrapper();
42 cal_struct *convertAbstractEventToPlatformEvent();
43 CalendarEventPtr convertPlatformEventToAbstractEvent();
44 cal_struct* getPlatformEvent() const;
45 CalendarEventPtr getAbstractEvent() const;
46 void freePlatformEvent();
48 void loadEvent(int id);
50 void createEventFromString(std::string value);
51 std::string exportEventToString();
53 void setCalendarId(const std::string &value);
54 void setCalendarAccountId(const int value);
56 void displayAbstractEvent(); //only for debugging
57 void displayPlatformEvent(); //only for debugging
60 int getIdFromPlatformEvent() const;
62 void setDescriptionToPlatformEvent();
63 void setSummaryToPlatformEvent();
64 void setStartTimeToPlatformEvent();
65 void setEndTimeToPlatformEvent();
66 void setLocationToPlatformEvent();
67 void setRecurrenceRuleToPlatformEvent();
68 void setAlarmsToPlatformEvent();
69 void setStatusToPlatformEvent();
70 void setCategoriesToPlatformEvent();
71 void setIdToPlatformEvent();
72 void setParentIdToPlatformEvent();
73 void setIsAllDayToPlatformEvent();
74 void setOrganizerToPlatformEvent();
75 void setLastModifiedDateToPlatformEvent();
76 void setVisibilityToPlatformEvent();
77 void setAvailabilityToPlatformEvent();
78 void setUIdToPlatformEvent();
79 void setAttendeesToPlatformEvent();
80 void setPositionToPlatformEvent();
81 void setPriorityToPlatformEvent();
82 void setCreatedDateToPlatformEvent();
83 void setCompletedDateToPlatformEvent();
84 void setProgressToPlatformEvent();
86 void setDescriptionFromPlatformEvent();
87 void setSummaryFromPlatformEvent();
88 void setStartTimeFromPlatformEvent();
89 void setEndTimeFromPlatformEvent();
90 void setLocationFromPlatformEvent();
91 void setRecurrenceRuleFromPlatformEvent();
92 void setAlarmsFromPlatformEvent();
93 void setStatusFromPlatformEvent();
94 void setCategoriesFromPlatformEvent();
95 void setIdFromPlatformEvent();
96 void setParentIdFromPlatformEvent();
97 void setIsAllDayFromPlatformEvent();
98 void setOrganizerFromPlatformEvent();
99 void setLastModifiedDateFromPlatformEvent();
100 void setVisibilityFromPlatformEvent();
101 void setAvailabilityFromPlatformEvent();
102 void setUIdFromPlatformEvent();
103 void setAttendeesFromPlatformEvent();
104 void setPositionFromPlatformEvent();
105 void setPriorityFromPlatformEvent();
106 void setCreatedDateFromPlatformEvent();
107 void setCompletedDateFromPlatformEvent();
108 void setProgressFromPlatformEvent();
109 void setIsDetachedFromPlatformEvent();
112 CalendarEvent::CalendarType getType();
114 cal_struct *m_platformEvent;
115 CalendarEventPtr m_abstractEvent;
116 CalendarEvent::CalendarType m_calendarType;
117 std::string m_calendarId;
118 int m_calendarAccountId;
121 typedef DPL::SharedPtr<EventWrapper> EventWrapperPtr;
126 #endif /* _CALENDAR_EVENT_WRAPPER_H_ */