b0418a79bcfcf47d77d584979ce2686c9f24ed7c
[platform/framework/web/wrt-plugins-common.git] / src / modules / API / DEPRACATED / Telephony / LogFilter.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        LogFilter.h
18  * @author      Lukasz Marek (l.marek@samsung.com)
19  * @version     0.1
20  */
21
22 #ifndef _ABSTRACT_LAYER_LOG_FILTER_H_
23 #define _ABSTRACT_LAYER_LOG_FILTER_H_
24
25 #include <ctime>
26 #include <list>
27 #include <dpl/shared_ptr.h>
28 #include "LogEntry.h"
29
30 namespace WrtPlugins {
31 namespace Api {
32 const int LOG_FILTER_UNDEFINED_ID = -1;
33 const int LOG_FILTER_UNDEFINED_TIME_T_MEMBERS = -1;
34 const int LOG_FILTER_UNDEFINED_DURATION = -1;
35
36 class LogFilter
37 {
38   public:
39
40     LogFilter();
41     virtual ~LogFilter();
42
43     int getIdFilter() const;
44     void setIdFilter(int value);
45
46     std::string getPhoneNumberFilter() const;
47     void setPhoneNumberFilter(const std::string &value);
48
49     time_t getStartTimeMinFilter() const;
50     time_t getStartTimeMaxFilter() const;
51     void setStartTimeMinFilter(time_t value);
52     void setStartTimeMaxFilter(time_t value);
53     void setStartTimeFilter(time_t value);
54
55     int getDurationMinFilter() const;
56     int getDurationMaxFilter() const;
57     void setDurationMinFilter(int value);
58     void setDurationMaxFilter(int value);
59     void setDurationFilter(int value);
60
61     std::list<LogEntry::LogFolder> getFolderFilter() const;
62     void addFolderFilter(LogEntry::LogFolder value);
63
64     std::string getDescriptionFilter() const;
65     void setDescriptionFilter(const std::string &value);
66
67     bool getIdIsSet() const;
68     bool getPhoneNumberIsSet() const;
69     bool getStartTimeIsSet() const;
70     bool getDurationIsSet() const;
71     bool getFolderIsSet() const;
72     bool checkIfFolderIsSet(LogEntry::LogFolder folder) const;
73     bool getDescriptionIsSet() const;
74
75   protected:
76     int m_id;
77     std::string m_phoneNumber;
78     time_t m_startTimeMin;
79     time_t m_startTimeMax;
80     int m_durationMin;
81     int m_durationMax;
82     std::list<LogEntry::LogFolder> m_folder;
83     std::string m_description;
84
85     bool m_phoneNumberIsSet;
86     bool m_descriptionIsSet;
87 };
88
89 typedef DPL::SharedPtr<LogFilter> LogFilterPtr;
90 }
91 }
92
93 #endif /* _ABSTRACT_LAYER_IEVENT_FILTER_H_ */