Update wrt-plugins-common_0.3.53
[framework/web/wrt-plugins-common.git] / src / modules / tizen / DEPRACATED / Telephony / LogManager.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        LogManager.h
18  * @author      Lukasz Marek (l.marek@samsung.com)
19  * @version     0.2
20  */
21
22 #ifndef _SLP20__LOG_MANAGER_H_
23 #define _SLP20__LOG_MANAGER_H_
24
25 #include <vector>
26 #include <dpl/mutex.h>
27 #include <dpl/shared_ptr.h>
28 #include <API/Telephony/ILogManager.h>
29 #include <API/Telephony/LogEntry.h>
30 #include <API/Telephony/LogFilter.h>
31 #include <API/Telephony/IEventGetNumberOfLogs.h>
32 #include <API/Telephony/IEventFindLogEntries.h>
33 #include <API/Telephony/IEventDeleteLogEntry.h>
34 #include <API/Telephony/IEventClearLogs.h>
35
36 namespace WrtPlugins {
37 namespace Platform {
38 class LogManager : public Api::ILogManager
39 {
40   public:
41     LogManager();
42     virtual ~LogManager();
43   protected:
44     virtual void                OnRequestReceived(
45             const Api::IEventGetNumberOfLogsPtr &event);
46     virtual void                OnRequestReceived(
47             const Api::IEventFindLogEntriesPtr &event);
48     virtual void                OnRequestReceived(
49             const Api::IEventDeleteLogEntryPtr &event);
50     virtual void                OnRequestReceived(
51             const Api::IEventClearLogPtr &event);
52     int                         getNumberOfLogsInternal(
53             const Api::LogFilterPtr &filter);
54     std::vector<Api::LogEntryPtr> findLogEntriesInternal(
55             const Api::LogFilterPtr &filter,
56             const int minIndex = -1,
57             const int maxIndex = -1);
58     void                        deleteLogEntryInternal(int id) const;
59     void                        clearLogInternal(
60             const Api::LogFilterPtr &filter);
61     static int m_instanceCount;
62     DPL::Mutex m_constructorMutex;
63 };
64
65 typedef DPL::SharedPtr<LogManager> LogManagerPtr;
66 }
67 }
68
69 #endif /* _SLP20__LOG_MANAGER_H_ */