tizen beta release
[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   public:
42     void                        setFirstCall(int value)
43     {
44         m_firstCall = value;
45     }
46     int                         getFirstCall() const
47     {
48         return m_firstCall;
49     }
50     void                        setLastCall(int value)
51     {
52         m_lastCall = value;
53     }
54     int                         getLastCall() const
55     {
56         return m_lastCall;
57     }
58     void                        setFilter(LogFilterPtr value)
59     {
60         m_filter = value;
61     }
62     LogFilterPtr                getFilter() const
63     {
64         return m_filter;
65     }
66     std::vector<Api::LogEntryPtr> getLogs() const
67     {
68         return m_logs;
69     }
70     void                        addLog(Api::LogEntryPtr log)
71     {
72         m_logs.push_back(log);
73     }
74     void                        setResult(bool value)
75     {
76         m_result = value;
77     }
78     bool                        getResult() const
79     {
80         return m_result;
81     }
82     virtual void                clearOnCancel()
83     {
84     }
85     IEventFindLogEntries() : m_result(false),
86         m_firstCall(0),
87         m_lastCall(-1)
88     {
89     }
90     ~IEventFindLogEntries()
91     {
92     }
93 };
94
95 typedef DPL::SharedPtr<IEventFindLogEntries> IEventFindLogEntriesPtr;
96 }
97 }
98
99 #endif /* _ABSTRACT_LAYER_IEVENT_FIND_LOG_ENTRIES_H_ */