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();
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;
65 typedef DPL::SharedPtr<LogManager> LogManagerPtr;
69 #endif /* _SLP20__LOG_MANAGER_H_ */