blob: 6583703031ee9781ae1a4b40adf068cd2c235f1f [file] [log] [blame]
David Purselle5ebdae2014-11-04 08:51:37 -08001// Copyright 2014 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 DEBUGD_SRC_DEV_FEATURES_TOOL_H_
6#define DEBUGD_SRC_DEV_FEATURES_TOOL_H_
7
8#include <string>
9
10#include <base/macros.h>
11#include <dbus-c++/dbus.h>
12
13namespace debugd {
14
15// A collection of functions to enable various development features.
16//
17// Each feature has two associated functions, one to enable the feature and one
18// to query whether it's been enabled or not.
19class DevFeaturesTool {
20 public:
21 DevFeaturesTool() = default;
22 ~DevFeaturesTool() = default;
23
24 void RemoveRootfsVerification(DBus::Error* error) const;
25 bool RemoveRootfsVerificationQuery(DBus::Error* error) const;
26
27 void EnableBootFromUsb(DBus::Error* error) const;
28 bool EnableBootFromUsbQuery(DBus::Error* error) const;
29
30 void ConfigureSshServer(DBus::Error* error) const;
31 bool ConfigureSshServerQuery(DBus::Error* error) const;
32
33 void SetUserPassword(const std::string& username,
34 const std::string& password,
35 DBus::Error* error) const;
36 bool SetUserPasswordQuery(const std::string& username,
37 bool system,
38 DBus::Error* error) const;
39
Xiaohui Chena8bced82015-02-27 10:35:26 -080040 void EnableChromeRemoteDebugging(DBus::Error* error) const;
41 bool EnableChromeRemoteDebuggingQuery(DBus::Error* error) const;
42
David Purselle5ebdae2014-11-04 08:51:37 -080043 void EnableChromeDevFeatures(const std::string& root_password,
44 DBus::Error* error) const;
45
46 int32_t QueryDevFeatures(DBus::Error* error) const;
47
48 private:
49 DISALLOW_COPY_AND_ASSIGN(DevFeaturesTool);
50};
51
52} // namespace debugd
53
54#endif // DEBUGD_SRC_DEV_FEATURES_TOOL_H_