blob: beb72e58496342fa716fa0d73fa7f4d0cbde01e2 [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
11#include <base/basictypes.h>
12#include <dbus-c++/dbus.h>
13
14namespace debugd {
15
16class DebugModeTool {
17 public:
18 explicit DebugModeTool(DBus::Connection* connection);
19 virtual ~DebugModeTool();
20
21 virtual void SetDebugMode(const std::string& subsystem, DBus::Error* error);
Yuri Gorsheninc18dee32012-08-16 23:03:46 +040022
Elly Jones15fc20f2012-02-09 14:29:06 -050023 private:
Yuri Gorsheninc18dee32012-08-16 23:03:46 +040024 void GetAllModemManagers(std::vector<std::string>* managers);
25 void SetAllModemManagersLogging(const std::string& level);
26
Elly Jones15fc20f2012-02-09 14:29:06 -050027 DBus::Connection* connection_;
Ben Chan4b110122014-08-29 08:22:59 -070028
Elly Jones15fc20f2012-02-09 14:29:06 -050029 DISALLOW_COPY_AND_ASSIGN(DebugModeTool);
30};
31
Ben Chana0011d82014-05-13 00:19:29 -070032} // namespace debugd
Elly Jones15fc20f2012-02-09 14:29:06 -050033
Alex Vakulenko262be3f2014-07-30 15:25:50 -070034#endif // DEBUGD_SRC_DEBUG_MODE_TOOL_H_