Dhruvaraj Subhashchandran | 9e90537 | 2021-08-20 04:06:06 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "dump_utils.hpp" |
| 4 | |
| 5 | namespace openpower |
| 6 | { |
| 7 | namespace dump |
| 8 | { |
| 9 | namespace util |
| 10 | { |
| 11 | |
| 12 | /** @brief Check whether OpenPOWER dumps are enabled |
| 13 | * |
| 14 | * param[in] bus - D-Bus handle |
| 15 | * |
| 16 | * If the settings service is not running then considering as |
| 17 | * the dumps are enabled. |
| 18 | * @return true - if dumps are enabled, false - if dumps are not enabled |
| 19 | */ |
| 20 | bool isOPDumpsEnabled(sdbusplus::bus::bus& bus); |
| 21 | |
Dhruvaraj Subhashchandran | 1ddb006 | 2022-05-06 06:21:11 -0500 | [diff] [blame] | 22 | using BIOSAttrValueType = std::variant<int64_t, std::string>; |
| 23 | |
| 24 | /** @brief Read a BIOS attribute value |
| 25 | * |
| 26 | * @param[in] attrName - Name of the BIOS attribute |
| 27 | * @param[in] bus - D-Bus handle |
| 28 | * |
| 29 | * @return The value of the BIOS attribute as a variant of possible types |
| 30 | * |
| 31 | * @throws sdbusplus::exception::SdBusError if failed to read the attribute |
| 32 | */ |
| 33 | BIOSAttrValueType readBIOSAttribute(const std::string& attrName, |
| 34 | sdbusplus::bus::bus& bus); |
| 35 | |
| 36 | /** @brief Check whether a system is in progress or available to offload. |
| 37 | * |
| 38 | * @param[in] bus - D-Bus handle |
| 39 | * |
| 40 | * @return true - A dump is in progress or available to offload |
| 41 | * false - No dump in progress |
| 42 | */ |
| 43 | bool isSystemDumpInProgress(sdbusplus::bus::bus& bus); |
Dhruvaraj Subhashchandran | 9e90537 | 2021-08-20 04:06:06 -0500 | [diff] [blame] | 44 | } // namespace util |
| 45 | } // namespace dump |
| 46 | } // namespace openpower |