blob: e331fbd1af0ce065ebdb1784a941f5c28275e3df [file] [log] [blame]
Elly Jones15fc20f2012-02-09 14:29:06 -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_MODE_TOOL_H_
6#define DEBUGD_SRC_DEBUG_MODE_TOOL_H_
Elly Jones15fc20f2012-02-09 14:29:06 -05007
8#include <string>
Yuri Gorsheninc18dee32012-08-16 23:03:46 +04009#include <vector>
Elly Jones15fc20f2012-02-09 14:29:06 -050010
Ben Chan657bed82014-09-02 20:40:51 -070011#include <base/macros.h>
Eric Carusocc7106c2017-04-27 14:22:42 -070012#include <base/memory/ref_counted.h>
13#include <dbus/bus.h>
Elly Jones15fc20f2012-02-09 14:29:06 -050014
15namespace debugd {
16
17class DebugModeTool {
18 public:
Eric Carusocc7106c2017-04-27 14:22:42 -070019 explicit DebugModeTool(scoped_refptr<dbus::Bus> bus);
Qijiang Fan6bc59e12020-11-11 02:51:06 +090020 DebugModeTool(const DebugModeTool&) = delete;
21 DebugModeTool& operator=(const DebugModeTool&) = delete;
22
Ben Chan78f89532014-08-29 09:35:09 -070023 virtual ~DebugModeTool() = default;
Elly Jones15fc20f2012-02-09 14:29:06 -050024
Eric Carusoc93a15c2017-04-24 16:15:12 -070025 virtual void SetDebugMode(const std::string& subsystem);
Yuri Gorsheninc18dee32012-08-16 23:03:46 +040026
Elly Jones15fc20f2012-02-09 14:29:06 -050027 private:
Ben Chan6f2ec9b2019-05-01 16:13:16 -070028 void SetModemManagerLogging(const std::string& level);
Yuri Gorsheninc18dee32012-08-16 23:03:46 +040029
Eric Carusocc7106c2017-04-27 14:22:42 -070030 scoped_refptr<dbus::Bus> bus_;
Elly Jones15fc20f2012-02-09 14:29:06 -050031};
32
Ben Chana0011d82014-05-13 00:19:29 -070033} // namespace debugd
Elly Jones15fc20f2012-02-09 14:29:06 -050034
Alex Vakulenko262be3f2014-07-30 15:25:50 -070035#endif // DEBUGD_SRC_DEBUG_MODE_TOOL_H_