06cc4b0fd269495c66f068ab719a811c4ccc09ff
[framework/web/wrt-plugins-common.git] / src / modules / API / Task / TaskFilter.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  * @file        TaskFilter.h
18  * @author      Shi Hezhang (hezhang.shi@samsung.com)
19  * @author      Pan Rui (r.pan@samsung.com)
20  * @version     0.1
21  */
22
23 #ifndef WRTDEVICEAPIS_TASK_TASK_FILTER_H_
24 #define WRTDEVICEAPIS_TASK_TASK_FILTER_H_
25
26 #include <dpl/shared_ptr.h>
27 #include <Task/CalendarTask.h>
28
29 namespace WrtDeviceApis {
30 namespace Task {
31 namespace Api {
32
33 const int TASK_FILTER_UNDEFINED_ID = -1;
34 const int TASK_FILTER_UNDEFINED_TASK_ID = -1;
35 const int TASK_FILTER_UNDEFINED_TIME_T_MEMBERS = -1;
36
37 typedef std::vector<CalendarTask::TaskStatus> StatusList;
38 typedef DPL::SharedPtr<StatusList> StatusListPtr;
39
40 typedef std::vector<CalendarTask::TaskPriority> PriorityList;
41 typedef DPL::SharedPtr<PriorityList> PriorityListPtr;
42
43 class TaskFilter
44 {
45   public:
46
47     TaskFilter();
48     virtual ~TaskFilter();
49
50     int getIdFilter() const;
51     void setIdFilter(int value);
52
53     int getTaskIdFilter() const;
54     void setTaskIdFilter(int value);
55
56     std::string getDescriptionFilter() const;
57     void setDescriptionFilter(const std::string &value);
58
59     std::string getSubjectFilter() const;
60     void setSubjectFilter(const std::string &value);
61
62     time_t getDueDateMinFilter() const;
63     time_t getDueDateMaxFilter() const;
64     void setDueDateMinFilter(time_t value);
65     void setDueDateMaxFilter(time_t value);
66     void setDueDateFilter(time_t value);
67
68     //CalendarTask::TaskPriority getPriorityFilter() const;
69     // void setPriorityFilter(CalendarTask::TaskPriority value );
70
71     //  CalendarTask::TaskStatus getStatusFilter() const;
72     // void setStatusFilter(CalendarTask::TaskStatus value );
73
74     PriorityListPtr getPriorityFilter() const;
75     void setPriorityFilter(const PriorityListPtr &value);
76
77     StatusListPtr getStatusFilter() const;
78     void setStatusFilter(const StatusListPtr &value);
79
80     bool getIdIsSet() const;
81     bool getTaskIdIsSet() const;
82     bool getDescriptionIsSet() const;
83     bool getSubjectIsSet() const;
84     bool getDueDateIsSet() const;
85     bool getPriorityIsSet() const;
86     bool getStatusIsSet() const;
87
88   protected:
89     int m_id;
90     int m_taskId;
91     std::string m_description;
92     std::string m_subject;
93     time_t m_dueDateMin;
94     time_t m_dueDateMax;
95     StatusListPtr m_status;
96     PriorityListPtr m_priority;
97     //CalendarTask::TaskStatus   m_status;
98     //CalendarTask::TaskPriority m_priority;
99
100     bool m_descriptionIsSet;
101     bool m_subjectIsSet;
102     bool m_locationIsSet;
103 };
104
105 typedef DPL::SharedPtr<TaskFilter> TaskFilterPtr;
106
107 }
108 }
109 }
110
111 #endif // WRTDEVICEAPIS_TASK_EVENT_FILTER_H_