xref: /openbmc/phosphor-fan-presence/presence/get_power_state.hpp (revision 76e73c2a48aa4d70c6fbd306e59c133968fce37f)
1*76e73c2aSMatt Spinler #pragma once
2*76e73c2aSMatt Spinler 
3*76e73c2aSMatt Spinler #include "power_state.hpp"
4*76e73c2aSMatt Spinler 
5*76e73c2aSMatt Spinler namespace phosphor::fan
6*76e73c2aSMatt Spinler {
7*76e73c2aSMatt Spinler 
8*76e73c2aSMatt Spinler /**
9*76e73c2aSMatt Spinler  * @brief Returns the PowerState object as a shared_ptr.
10*76e73c2aSMatt Spinler  *
11*76e73c2aSMatt Spinler  * Callers can use addCallback() on the return object to
12*76e73c2aSMatt Spinler  * have functions run when the power state changes.
13*76e73c2aSMatt Spinler  *
14*76e73c2aSMatt Spinler  * @return shared_ptr<PowerState>
15*76e73c2aSMatt Spinler  */
16*76e73c2aSMatt Spinler std::shared_ptr<PowerState> getPowerStateObject();
17*76e73c2aSMatt Spinler 
18*76e73c2aSMatt Spinler } // namespace phosphor::fan
19