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;
40 /* generic filter parameters */
41 Tizen::FilterPtr m_genericFilter;
42 Tizen::SortModeArrayPtr m_sortModes;
43 std::vector<std::string> m_attributesOfInterest;
44 bool m_genericFilterIsSet;
45 bool m_sortModesIsSet;
46 bool m_attributesOfInterestIsSet;
49 void setFilter(EventFilterPtr value)
53 EventFilterPtr getFilter() const
58 void setResult(bool value)
62 bool getResult() const
67 void addEvent(CalendarEventPtr value)
69 m_events->push_back(value);
72 CalendarEventListPtr getEvents()
77 Tizen::FilterPtr getGenericFilter() const
79 return m_genericFilter;
82 void setGenericFilter(const Tizen::FilterPtr &value)
84 m_genericFilter = value;
85 m_genericFilterIsSet = true;
88 Tizen::SortModeArrayPtr getSortModes() const
93 void setSortModes(const Tizen::SortModeArrayPtr &value)
96 m_sortModesIsSet = true;
99 std::vector<std::string> getAttributesOfInterest() const
101 return m_attributesOfInterest;
104 void setAttributesOfInterest(const std::vector<std::string> &value)
106 m_attributesOfInterest = value;
107 m_attributesOfInterestIsSet = true;
110 bool getGenericFilterIsSet() const
112 return m_genericFilterIsSet;
115 bool getSortModesIsSet() const
117 return m_sortModesIsSet;
120 bool getAttributesOfInterestIsSet() const
122 return m_attributesOfInterestIsSet;
125 IEventFindEvents() : m_result(false),
126 m_genericFilterIsSet(false),
127 m_sortModesIsSet(false),
128 m_attributesOfInterestIsSet(false)
130 CalendarEventListPtr events(new CalendarEventList());
136 virtual void clearOnCancel()
141 typedef DPL::SharedPtr<IEventFindEvents> IEventFindEventsPtr;
146 #endif /* _ABSTRACT_LAYER_IEVENT_FIND_EVENTS_H_ */