2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @author Lukasz Marek (l.marek@samsung.com)
22 #ifndef _SLP20__LOG_MANAGER_H_
23 #define _SLP20__LOG_MANAGER_H_
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>
36 namespace WrtPlugins {
38 class LogManager : public Api::ILogManager
42 virtual ~LogManager();
45 virtual void OnRequestReceived(
46 const Api::IEventGetNumberOfLogsPtr &event);
47 virtual void OnRequestReceived(
48 const Api::IEventFindLogEntriesPtr &event);
49 virtual void OnRequestReceived(
50 const Api::IEventDeleteLogEntryPtr &event);
51 virtual void OnRequestReceived(
52 const Api::IEventClearLogPtr &event);
53 int getNumberOfLogsInternal(
54 const Api::LogFilterPtr &filter);
55 std::vector<Api::LogEntryPtr> findLogEntriesInternal(
56 const Api::LogFilterPtr &filter,
57 const int minIndex = -1,
58 const int maxIndex = -1);
59 void deleteLogEntryInternal(int id) const;
60 void clearLogInternal(
61 const Api::LogFilterPtr &filter);
62 static int m_instanceCount;
63 DPL::Mutex m_constructorMutex;
66 typedef DPL::SharedPtr<LogManager> LogManagerPtr;
70 #endif /* _SLP20__LOG_MANAGER_H_ */