blob: 8dff40b2016c17a8417444d48f9b13897712a1c3 [file] [log] [blame]
Elly Jones03cd6d72012-06-11 13:04:28 -04001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef LOG_TOOL_H
6#define LOG_TOOL_H
7
8#include <string>
Gaurav Shahf6c8f2a2012-10-11 17:22:43 -07009#include <map>
Elly Jones03cd6d72012-06-11 13:04:28 -040010
11#include <base/basictypes.h>
12#include <dbus-c++/dbus.h>
13
14namespace debugd {
15
16class LogTool {
17 public:
18 LogTool();
19 ~LogTool();
20
Elly Jones533c7c42012-08-10 15:07:05 -040021 typedef std::map<std::string, std::string> LogMap;
22
Elly Jones03cd6d72012-06-11 13:04:28 -040023 std::string GetLog(const std::string& name, DBus::Error& error); // NOLINT
Elly Jones533c7c42012-08-10 15:07:05 -040024 LogMap GetAllLogs(DBus::Error& error); // NOLINT
25 LogMap GetFeedbackLogs(DBus::Error& error); // NOLINT
Gaurav Shahf6c8f2a2012-10-11 17:22:43 -070026 LogMap GetUserLogFiles(DBus::Error& error); // NOLINT
Darin Petkovce9b3a12013-01-10 16:38:54 +010027
Elly Jones03cd6d72012-06-11 13:04:28 -040028 private:
Darin Petkovce9b3a12013-01-10 16:38:54 +010029 friend class LogToolTest;
30
31 void AnonymizeLogMap(LogMap* log_map);
32
Elly Jones03cd6d72012-06-11 13:04:28 -040033 DISALLOW_COPY_AND_ASSIGN(LogTool);
34};
35
36}; // namespace debugd
37
38#endif // LOG_TOOL_H