| Andrew Geissler | 70d72f8 | 2022-03-23 13:15:05 -0500 | [diff] [blame] | 1 | #pragma once | 
| Andrew Geissler | 03b3082 | 2022-03-24 11:04:40 -0500 | [diff] [blame] | 2 |  | 
| Andrew Geissler | cdac8f4 | 2022-03-24 15:02:13 -0500 | [diff] [blame] | 3 | #include <sdbusplus/bus.hpp> | 
|  | 4 |  | 
| Andrew Geissler | 03b3082 | 2022-03-24 11:04:40 -0500 | [diff] [blame] | 5 | /** @brief Determine if a side switch is needed | 
|  | 6 | * | 
| Andrew Geissler | cdac8f4 | 2022-03-24 15:02:13 -0500 | [diff] [blame] | 7 | *  @param[in] bus       - The Dbus bus object | 
| Andrew Geissler | 03b3082 | 2022-03-24 11:04:40 -0500 | [diff] [blame] | 8 | *  @return True if side switch needed, false otherwise | 
|  | 9 | */ | 
| Patrick Williams | bf2bb2b | 2022-07-22 19:26:52 -0500 | [diff] [blame] | 10 | bool sideSwitchNeeded(sdbusplus::bus_t& bus); | 
| Andrew Geissler | cdac8f4 | 2022-03-24 15:02:13 -0500 | [diff] [blame] | 11 |  | 
|  | 12 | /** @brief Power off the system | 
|  | 13 | * | 
|  | 14 | *  @param[in] bus       - The Dbus bus object | 
|  | 15 | *  @return True if chassis off success, false otherwise | 
|  | 16 | */ | 
| Patrick Williams | bf2bb2b | 2022-07-22 19:26:52 -0500 | [diff] [blame] | 17 | bool powerOffSystem(sdbusplus::bus_t& bus); | 
| Andrew Geissler | 788c6a6 | 2022-03-24 15:27:24 -0500 | [diff] [blame] | 18 |  | 
|  | 19 | /** @brief Configure BMC to auto power on the host after reboot | 
|  | 20 | * | 
|  | 21 | *  @param[in] bus       - The Dbus bus object | 
|  | 22 | *  @return True if policy set correctly, false otherwise | 
|  | 23 | */ | 
| Patrick Williams | bf2bb2b | 2022-07-22 19:26:52 -0500 | [diff] [blame] | 24 | bool setAutoPowerRestart(sdbusplus::bus_t& bus); | 
| Andrew Geissler | a3cec43 | 2022-03-24 16:08:14 -0500 | [diff] [blame] | 25 |  | 
|  | 26 | /** @brief Reboot the BMC | 
|  | 27 | * | 
|  | 28 | *  @param[in] bus       - The Dbus bus object | 
|  | 29 | *  @return True if reboot request had no error, false otherwise | 
|  | 30 | */ | 
| Patrick Williams | bf2bb2b | 2022-07-22 19:26:52 -0500 | [diff] [blame] | 31 | bool rebootTheBmc(sdbusplus::bus_t& bus); |