[Release] wrt-plugins-common_0.3.74
[platform/framework/web/wrt-plugins-common.git] / src / modules / API / DEPRACATED / Telephony / IEventFindLogEntries.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  * @author      Lukasz Marek (l.marek@samsung.com)
18  * @version     0.1
19  * @brief
20  */
21
22 #ifndef _ABSTRACT_LAYER_IEVENT_FIND_LOG_ENTRIES_H_
23 #define _ABSTRACT_LAYER_IEVENT_FIND_LOG_ENTRIES_H_
24
25 #include <vector>
26 #include <dpl/shared_ptr.h>
27 #include <commons/IEvent.h>
28 #include "LogEntry.h"
29 #include "LogFilter.h"
30
31 namespace WrtPlugins {
32 namespace Api {
33 class IEventFindLogEntries : public WrtPlugins::Platform::IEvent<
34         IEventFindLogEntries>
35 {
36     bool m_result;
37     std::vector<Api::LogEntryPtr> m_logs;
38     LogFilterPtr m_filter;
39     int m_firstCall;
40     int m_lastCall;
41
42   public:
43     void                        setFirstCall(int value)
44     {
45         m_firstCall = value;
46     }
47     int                         getFirstCall() const
48     {
49         return m_firstCall;
50     }
51     void                        setLastCall(int value)
52     {
53         m_lastCall = value;
54     }
55     int                         getLastCall() const
56     {
57         return m_lastCall;
58     }
59     void                        setFilter(LogFilterPtr value)
60     {
61         m_filter = value;
62     }
63     LogFilterPtr                getFilter() const
64     {
65         return m_filter;
66     }
67     std::vector<Api::LogEntryPtr> getLogs() const
68     {
69         return m_logs;
70     }
71     void                        addLog(Api::LogEntryPtr log)
72     {
73         m_logs.push_back(log);
74     }
75     void                        setResult(bool value)
76     {
77         m_result = value;
78     }
79     bool                        getResult() const
80     {
81         return m_result;
82     }
83     virtual void                clearOnCancel()
84     {}
85     IEventFindLogEntries() : m_result(false),
86         m_firstCall(0),
87         m_lastCall(-1)
88     {}
89     ~IEventFindLogEntries()
90     {}
91 };
92
93 typedef DPL::SharedPtr<IEventFindLogEntries> IEventFindLogEntriesPtr;
94 }
95 }
96
97 #endif /* _ABSTRACT_LAYER_IEVENT_FIND_LOG_ENTRIES_H_ */