Edward Hill | 024f563 | 2017-06-29 15:23:38 -0600 | [diff] [blame] | 1 | // Copyright 2017 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_WIFI_POWER_TOOL_H_ |
| 6 | #define DEBUGD_SRC_WIFI_POWER_TOOL_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include <base/macros.h> |
| 11 | |
| 12 | namespace debugd { |
| 13 | |
| 14 | // Gets and sets WiFi power save mode. |
| 15 | class WifiPowerTool { |
| 16 | public: |
| 17 | WifiPowerTool() = default; |
Qijiang Fan | 6bc59e1 | 2020-11-11 02:51:06 +0900 | [diff] [blame^] | 18 | WifiPowerTool(const WifiPowerTool&) = delete; |
| 19 | WifiPowerTool& operator=(const WifiPowerTool&) = delete; |
| 20 | |
Edward Hill | 024f563 | 2017-06-29 15:23:38 -0600 | [diff] [blame] | 21 | ~WifiPowerTool() = default; |
| 22 | |
| 23 | // Sets the power save mode and returns the new mode, or an error. |
| 24 | std::string SetWifiPowerSave(bool enable) const; |
| 25 | |
| 26 | // Returns the current power save mode. |
| 27 | std::string GetWifiPowerSave() const; |
Edward Hill | 024f563 | 2017-06-29 15:23:38 -0600 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | } // namespace debugd |
| 31 | |
| 32 | #endif // DEBUGD_SRC_WIFI_POWER_TOOL_H_ |