Git Init
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Calendar / EventFilter.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17
18 #ifndef _ABSTRACT_LAYER_IEVENT_FILTER_H_
19 #define _ABSTRACT_LAYER_IEVENT_FILTER_H_
20
21 #include <ctime>
22 #include <string>
23 #include <vector>
24 #include <dpl/shared_ptr.h>
25 #include <dpl/optional.h>
26 #include "CalendarEvent.h"
27 #include "EventRecurrenceRule.h"
28
29 namespace TizenApis {
30 namespace Api {
31 namespace Calendar {
32
33 class EventFilter
34 {
35   public:
36
37     EventFilter();
38     virtual ~EventFilter();
39
40     std::string getIdFilter() const;
41     void setIdFilter(const std::string &value);
42
43     int getCalendarIdFilter() const;
44     void setCalendarIdFilter(int value);
45
46     std::string getDescriptionFilter() const;
47     void setDescriptionFilter(const std::string &value);
48
49     std::string getSubjectFilter() const;
50     void setSubjectFilter(const std::string &value);
51
52     std::time_t getStartTimeMinFilter() const;
53     std::time_t getStartTimeMaxFilter() const;
54     void setStartTimeMinFilter(std::time_t value);
55     void setStartTimeMaxFilter(std::time_t value);
56     void setStartTimeFilter(std::time_t value);
57
58     std::time_t getEndTimeMinFilter() const;
59     std::time_t getEndTimeMaxFilter() const;
60     void setEndTimeMinFilter(std::time_t value);
61     void setEndTimeMaxFilter(std::time_t value);
62     void setEndTimeFilter(std::time_t value);
63
64     std::string getLocationFilter() const;
65     void setLocationFilter(const std::string &value);
66
67     std::vector<EventRecurrenceRule::EventRecurrence> getRecurrenceFilter() const;
68     void addRecurrenceFilter(EventRecurrenceRule::EventRecurrence value);
69
70     std::vector<CalendarEvent::EventStatus> getStatusFilter() const;
71     void addStatusFilter(CalendarEvent::EventStatus value);
72
73     std::time_t getAlarmTimeMinFilter() const;
74     std::time_t getAlarmTimeMaxFilter() const;
75     void setAlarmTimeMinFilter(std::time_t value);
76     void setAlarmTimeMaxFilter(std::time_t value);
77     void setAlarmTimeFilter(std::time_t value);
78
79     std::vector<CalendarEvent::EventAlarmType> getAlarmTypeFilter() const;
80     void addAlarmTypeFilter(CalendarEvent::EventAlarmType value);
81
82     std::string getCategoryFilter() const;
83     void setCategoryFilter(const std::string &category);
84
85     bool getIdIsSet() const;
86     bool getCalendarIdIsSet() const;
87     bool getDescriptionIsSet() const;
88     bool getSubjectIsSet() const;
89     bool getStartTimeMinIsSet() const;
90     bool getStartTimeMaxIsSet() const;
91     bool getEndTimeMinIsSet() const;
92     bool getEndTimeMaxIsSet() const;
93     bool getLocationIsSet() const;
94     bool getRecurrenceIsSet() const;
95     bool getStatusIsSet() const;
96     bool getAlarmTimeMinIsSet() const;
97     bool getAlarmTimeMaxIsSet() const;
98     bool getAlarmTypeIsSet() const;
99     bool getCategoryIsSet() const;
100
101   protected:
102     DPL::Optional<std::string> m_id;
103     DPL::Optional<int>         m_calendarId;
104     DPL::Optional<std::string> m_description;
105     DPL::Optional<std::string> m_subject;
106     DPL::Optional<std::time_t> m_startTimeMin;
107     DPL::Optional<std::time_t> m_startTimeMax;
108     DPL::Optional<std::time_t> m_endTimeMin;
109     DPL::Optional<std::time_t> m_endTimeMax;
110     DPL::Optional<std::string> m_location;
111     std::vector<EventRecurrenceRule::EventRecurrence> m_recurrence;
112     std::vector<CalendarEvent::EventStatus>     m_status;
113     std::vector<CalendarEvent::EventAlarmType>  m_alarmType;
114     DPL::Optional<std::time_t> m_alarmTimeMin;
115     DPL::Optional<std::time_t> m_alarmTimeMax;
116     DPL::Optional<std::string> m_category;
117 };
118
119 typedef DPL::SharedPtr<EventFilter> EventFilterPtr;
120
121 }
122 }
123 }
124
125 #endif /* _ABSTRACT_LAYER_IEVENT_FILTER_H_ */