blob: 91c5cd45c728d45e8aa288522bc2812fae55defa [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>
Eric Carusocc7106c2017-04-27 14:22:42 -070011#include <brillo/errors/error.h>
David Purselle5ebdae2014-11-04 08:51:37 -080012
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
Eric Carusocc7106c2017-04-27 14:22:42 -070024 bool RemoveRootfsVerification(brillo::ErrorPtr* error) const;
25 bool EnableBootFromUsb(brillo::ErrorPtr* error) const;
26 bool ConfigureSshServer(brillo::ErrorPtr* error) const;
Eric Caruso8fe49c72017-04-25 10:43:59 -070027 bool SetUserPassword(const std::string& username,
David Purselle5ebdae2014-11-04 08:51:37 -080028 const std::string& password,
Eric Carusocc7106c2017-04-27 14:22:42 -070029 brillo::ErrorPtr* error) const;
30 bool EnableChromeRemoteDebugging(brillo::ErrorPtr* error) const;
Eric Caruso8fe49c72017-04-25 10:43:59 -070031 bool EnableChromeDevFeatures(const std::string& root_password,
Eric Carusocc7106c2017-04-27 14:22:42 -070032 brillo::ErrorPtr* error) const;
David Purselle5ebdae2014-11-04 08:51:37 -080033
Eric Carusocc7106c2017-04-27 14:22:42 -070034 bool QueryDevFeatures(int32_t* flags, brillo::ErrorPtr* error) const;
David Purselle5ebdae2014-11-04 08:51:37 -080035
36 private:
37 DISALLOW_COPY_AND_ASSIGN(DevFeaturesTool);
38};
39
40} // namespace debugd
41
42#endif // DEBUGD_SRC_DEV_FEATURES_TOOL_H_