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.
17 * @file EventWrapper.h
18 * @author Lukasz Marek (l.marek@samsung.com)
22 #ifndef WRTDEVICEAPIS_CALENDAR_EVENT_WRAPPER_H_
23 #define WRTDEVICEAPIS_CALENDAR_EVENT_WRAPPER_H_
26 #include <calendar-svc-provider.h>
27 #include <dpl/shared_ptr.h>
28 #include <Calendar/CalendarEvent.h>
29 #include <Calendar/EventFilter.h>
31 namespace WrtDeviceApis {
38 explicit EventWrapper(const Api::CalendarEventPtr &event);
39 virtual ~EventWrapper();
40 cal_struct *convertAbstractEventToPlatformEvent();
41 Api::CalendarEventPtr convertPlatformEventToAbstractEvent();
42 cal_struct *getPlatformEvent() const;
43 Api::CalendarEventPtr getAbstractEvent() const;
44 void freePlatformEvent();
46 void loadEvent(int id);
48 bool matchFilters(Api::EventFilterPtr filter);
51 int getIDFromPlatformEvent() const;
52 void setDescriptionToPlatformEvent();
53 void setSubjectToPlatformEvent();
54 void setStartTimeToPlatformEvent();
55 void setEndTimeToPlatformEvent();
56 void setLocationToPlatformEvent();
57 void setRecurrenceToPlatformEvent();
58 void setAlarmToPlatformEvent();
59 void setStatusToPlatformEvent();
60 void setCategoriesToPlatformEvent();
61 void setIDToPlatformEvent();
62 void setExpiresToPlatformEvent();
63 void setIntervalToPlatformEvent();
65 void setDescriptionFromPlatformEvent();
66 void setSubjectFromPlatformEvent();
67 void setStartTimeFromPlatformEvent();
68 void setEndTimeFromPlatformEvent();
69 void setLocationFromPlatformEvent();
70 void setRecurrenceFromPlatformEvent();
71 void setAlarmFromPlatformEvent();
72 void setStatusFromPlatformEvent();
73 void setCategoriesFromPlatformEvent();
74 void setIDFromPlatformEvent();
75 void setExpiresFromPlatformEvent();
76 void setIntervalFromPlatformEvent();
78 void displayAbstractEvent(); //only for debugging
79 void displayPlatformEvent(); //only for debugging
81 cal_struct *m_platformEvent;
82 Api::CalendarEventPtr m_abstractEvent;
85 typedef DPL::SharedPtr<EventWrapper> EventWrapperPtr;
88 #endif // WRTDEVICEAPIS_CALENDAR_EVENT_WRAPPER_H_