blob: 324edafbea78f8bb9096926cb21eeb3205e407d4 [file] [log] [blame]
Andrew Geissler70d72f82022-03-23 13:15:05 -05001#pragma once
Andrew Geissler03b30822022-03-24 11:04:40 -05002
Andrew Geisslercdac8f42022-03-24 15:02:13 -05003#include <sdbusplus/bus.hpp>
4
Andrew Geissler03b30822022-03-24 11:04:40 -05005/** @brief Determine if a side switch is needed
6 *
Andrew Geisslercdac8f42022-03-24 15:02:13 -05007 * @param[in] bus - The Dbus bus object
Andrew Geissler03b30822022-03-24 11:04:40 -05008 * @return True if side switch needed, false otherwise
9 */
Patrick Williamsbf2bb2b2022-07-22 19:26:52 -050010bool sideSwitchNeeded(sdbusplus::bus_t& bus);
Andrew Geisslercdac8f42022-03-24 15:02:13 -050011
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 Williamsbf2bb2b2022-07-22 19:26:52 -050017bool powerOffSystem(sdbusplus::bus_t& bus);
Andrew Geissler788c6a62022-03-24 15:27:24 -050018
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 Williamsbf2bb2b2022-07-22 19:26:52 -050024bool setAutoPowerRestart(sdbusplus::bus_t& bus);
Andrew Geisslera3cec432022-03-24 16:08:14 -050025
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 Williamsbf2bb2b2022-07-22 19:26:52 -050031bool rebootTheBmc(sdbusplus::bus_t& bus);