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_IEVENT_FIND_EVENTS_H_
19 #define _ABSTRACT_LAYER_IEVENT_FIND_EVENTS_H_
22 #include <Commons/IEvent.h>
23 #include "CalendarEvent.h"
24 #include "EventFilter.h"
25 #include <API/Filter/IFilter.h>
26 #include <API/Filter/SortMode.h>
27 #include <dpl/shared_ptr.h>
33 class IEventFindEvents : public WrtDeviceApis::Commons::IEvent<IEventFindEvents>
35 /* user is responsible to free objects inside list */
36 CalendarEventListPtr m_events;
38 EventFilterPtr m_filter;
39 CalendarEvent::CalendarType m_calendarType;
41 /* generic filter parameters */
42 Tizen::FilterPtr m_genericFilter;
43 Tizen::SortModeArrayPtr m_sortModes;
44 std::vector<std::string> m_attributesOfInterest;
45 bool m_genericFilterIsSet;
46 bool m_sortModesIsSet;
47 bool m_attributesOfInterestIsSet;
50 void setFilter(EventFilterPtr value)
54 EventFilterPtr getFilter() const
59 void setResult(bool value)
63 bool getResult() const
68 void setCalendarType(CalendarEvent::CalendarType value)
70 m_calendarType = value;
72 CalendarEvent::CalendarType getCalendarType() const
74 return m_calendarType;
77 void addEvent(CalendarEventPtr value)
79 m_events->push_back(value);
82 CalendarEventListPtr getEvents()
87 Tizen::FilterPtr getGenericFilter() const
89 return m_genericFilter;
92 void setGenericFilter(const Tizen::FilterPtr &value)
94 m_genericFilter = value;
95 m_genericFilterIsSet = true;
98 Tizen::SortModeArrayPtr getSortModes() const
103 void setSortModes(const Tizen::SortModeArrayPtr &value)
106 m_sortModesIsSet = true;
109 std::vector<std::string> getAttributesOfInterest() const
111 return m_attributesOfInterest;
114 void setAttributesOfInterest(const std::vector<std::string> &value)
116 m_attributesOfInterest = value;
117 m_attributesOfInterestIsSet = true;
120 bool getGenericFilterIsSet() const
122 return m_genericFilterIsSet;
125 bool getSortModesIsSet() const
127 return m_sortModesIsSet;
130 bool getAttributesOfInterestIsSet() const
132 return m_attributesOfInterestIsSet;
135 IEventFindEvents() : m_result(false),
136 m_calendarType(CalendarEvent::EVENT_TYPE),
137 m_genericFilterIsSet(false),
138 m_sortModesIsSet(false),
139 m_attributesOfInterestIsSet(false)
141 CalendarEventListPtr events(new CalendarEventList());
147 virtual void clearOnCancel()
152 typedef DPL::SharedPtr<IEventFindEvents> IEventFindEventsPtr;
157 #endif /* _ABSTRACT_LAYER_IEVENT_FIND_EVENTS_H_ */