#
76e73c2a |
| 21-Apr-2021 |
Matt Spinler <spinler@us.ibm.com> |
Let PowerState class run multiple callbacks
Previously the PowerState class could only handle a single callback function. This commit changes that to allow other callback functions to be added with
Let PowerState class run multiple callbacks
Previously the PowerState class could only handle a single callback function. This commit changes that to allow other callback functions to be added with a addCallback() method. The callback functions are then executed when the power state changes.
This also changes the use of the PowerState object in the fan presence code to a shared_ptr instead of a unique_ptr, and adds a function to return the PowerState object to use in the app, creating it if necessary. This allows multiple pieces of the code to add their own callbacks to the same object.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I35fc8ab94c4806f0c7fd2f1552c58131b8f30f23
show more ...
|