1 #pragma once
2 
3 #include <optional>
4 #include <string>
5 #include <tuple>
6 
7 namespace phosphor
8 {
9 namespace fan
10 {
11 namespace presence
12 {
13 
14 /** @brief PrettyName, inventory path and time until error. */
15 using Fan = std::tuple<std::string, std::string, std::optional<size_t>>;
16 
17 /**
18  * @brief Update the presence state.
19  *
20  * Update the Present property of the
21  * xyz.openbmc_project.Inventory.Item interface.
22  *
23  * @param[in] fan - The fan to update.
24  * @param[in] newState - The new state of the fan.
25  */
26 void setPresence(const Fan& fan, bool newState);
27 
28 /**
29  * @brief Read the presence state.
30  *
31  * Read the Present property of the
32  * xyz.openbmc_project.Inventory.Item
33  *
34  * @param[in] fan - The fan to read.
35  */
36 bool getPresence(const Fan& fan);
37 } // namespace presence
38 } // namespace fan
39 } // namespace phosphor
40