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_IEVENT_FIND_EVENTS_H_
20 #define _ABSTRACT_LAYER_IEVENT_FIND_EVENTS_H_
23 #include <Commons/IEvent.h>
24 #include "CalendarEvent.h"
27 #include <dpl/shared_ptr.h>
33 class IEventFindEvents : public WrtDeviceApis::Commons::IEvent<IEventFindEvents>, public DeviceAPI::Common::SecurityAccessor
35 /* user is responsible to free objects inside list */
36 CalendarEventListPtr m_events;
38 CalendarEvent::CalendarType m_calendarType;
39 DeviceAPI::Tizen::FilterPtr m_genericFilter;
40 DeviceAPI::Tizen::SortModeArrayPtr m_sortModes;
41 std::vector<std::string> m_attributesOfInterest;
42 bool m_genericFilterIsSet;
43 bool m_sortModesIsSet;
44 bool m_attributesOfInterestIsSet;
47 void setResult(bool value)
51 bool getResult() const
56 void setCalendarType(CalendarEvent::CalendarType value)
58 m_calendarType = value;
60 CalendarEvent::CalendarType getCalendarType() const
62 return m_calendarType;
65 void addEvent(CalendarEventPtr value)
67 m_events->push_back(value);
70 CalendarEventListPtr getEvents()
75 DeviceAPI::Tizen::FilterPtr getGenericFilter() const
77 return m_genericFilter;
80 void setGenericFilter(const DeviceAPI::Tizen::FilterPtr &value)
82 m_genericFilter = value;
83 m_genericFilterIsSet = true;
86 DeviceAPI::Tizen::SortModeArrayPtr getSortModes() const
91 void setSortModes(const DeviceAPI::Tizen::SortModeArrayPtr &value)
94 m_sortModesIsSet = true;
97 std::vector<std::string> getAttributesOfInterest() const
99 return m_attributesOfInterest;
102 void setAttributesOfInterest(const std::vector<std::string> &value)
104 m_attributesOfInterest = value;
105 m_attributesOfInterestIsSet = true;
108 bool getGenericFilterIsSet() const
110 return m_genericFilterIsSet;
113 bool getSortModesIsSet() const
115 return m_sortModesIsSet;
118 bool getAttributesOfInterestIsSet() const
120 return m_attributesOfInterestIsSet;
123 IEventFindEvents() : m_result(false),
124 m_calendarType(CalendarEvent::EVENT_TYPE),
125 m_genericFilterIsSet(false),
126 m_sortModesIsSet(false),
127 m_attributesOfInterestIsSet(false)
129 CalendarEventListPtr events(new CalendarEventList());
135 virtual void clearOnCancel()
140 typedef DPL::SharedPtr<IEventFindEvents> IEventFindEventsPtr;
144 #endif /* _ABSTRACT_LAYER_IEVENT_FIND_EVENTS_H_ */