blob: e5ae9312cecfc8ad0878c67a92ddd070ca41477e [file] [log] [blame]
Elly Jones0b6bd182012-02-14 18:24:22 -05001// 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
Alex Vakulenko262be3f2014-07-30 15:25:50 -07005#ifndef DEBUGD_SRC_DEBUG_LOGS_TOOL_H_
6#define DEBUGD_SRC_DEBUG_LOGS_TOOL_H_
Elly Jones0b6bd182012-02-14 18:24:22 -05007
Eric Caruso0b241882018-04-04 13:43:46 -07008#include <base/files/scoped_file.h>
Ben Chan657bed82014-09-02 20:40:51 -07009#include <base/macros.h>
Brian Norrisca4fc042018-04-03 00:24:26 -070010#include <dbus/bus.h>
Elly Jones0b6bd182012-02-14 18:24:22 -050011
12namespace debugd {
13
14class DebugLogsTool {
15 public:
Brian Norrisca4fc042018-04-03 00:24:26 -070016 explicit DebugLogsTool(scoped_refptr<dbus::Bus> bus) : bus_(bus) {}
Qijiang Fan6bc59e12020-11-11 02:51:06 +090017 DebugLogsTool(const DebugLogsTool&) = delete;
18 DebugLogsTool& operator=(const DebugLogsTool&) = delete;
19
Ben Chan78f89532014-08-29 09:35:09 -070020 ~DebugLogsTool() = default;
Elly Jones0b6bd182012-02-14 18:24:22 -050021
Tom Hughesd6c2d392020-08-24 18:12:11 -070022 void GetDebugLogs(bool is_compressed, const base::ScopedFD& fd);
Ben Chana0011d82014-05-13 00:19:29 -070023
Elly Jones0b6bd182012-02-14 18:24:22 -050024 private:
Brian Norrisca4fc042018-04-03 00:24:26 -070025 scoped_refptr<dbus::Bus> bus_;
Elly Jones0b6bd182012-02-14 18:24:22 -050026};
27
Ben Chana0011d82014-05-13 00:19:29 -070028} // namespace debugd
Elly Jones0b6bd182012-02-14 18:24:22 -050029
Alex Vakulenko262be3f2014-07-30 15:25:50 -070030#endif // DEBUGD_SRC_DEBUG_LOGS_TOOL_H_