kasunath | 7cea1b9 | 2022-06-14 20:23:27 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "dbus/file_notifier.hpp" |
| 4 | |
kasunath | 3d0cd55 | 2022-08-25 20:22:58 -0700 | [diff] [blame] | 5 | #include <sdbusplus/asio/object_server.hpp> |
| 6 | |
kasunath | 7cea1b9 | 2022-06-14 20:23:27 -0700 | [diff] [blame] | 7 | #include <memory> |
| 8 | #include <vector> |
| 9 | |
| 10 | namespace bios_bmc_smm_error_logger |
| 11 | { |
| 12 | namespace rde |
| 13 | { |
| 14 | |
| 15 | /** |
| 16 | * @brief A class to handle CPER DBus notification objects. |
| 17 | */ |
| 18 | class CperFileNotifierHandler |
| 19 | { |
| 20 | public: |
| 21 | /** |
| 22 | * @brief Constructor for the CperFileNotifierHandler class. |
| 23 | * |
kasunath | 3d0cd55 | 2022-08-25 20:22:58 -0700 | [diff] [blame] | 24 | * @param conn - sdbusplus asio connection. |
kasunath | 7cea1b9 | 2022-06-14 20:23:27 -0700 | [diff] [blame] | 25 | */ |
kasunath | 3d0cd55 | 2022-08-25 20:22:58 -0700 | [diff] [blame] | 26 | explicit CperFileNotifierHandler( |
| 27 | const std::shared_ptr<sdbusplus::asio::connection>& conn); |
kasunath | 7cea1b9 | 2022-06-14 20:23:27 -0700 | [diff] [blame] | 28 | |
| 29 | /** |
| 30 | * @brief Create a DBus object with the provided filePath value. |
| 31 | * |
| 32 | * @param filePath - file path of the CPER log JSON file. |
| 33 | */ |
| 34 | void createEntry(const std::string& filePath); |
| 35 | |
| 36 | private: |
Patrick Williams | bea36e2 | 2022-07-22 19:26:57 -0500 | [diff] [blame] | 37 | sdbusplus::server::manager_t objManager; |
kasunath | 3d0cd55 | 2022-08-25 20:22:58 -0700 | [diff] [blame] | 38 | sdbusplus::asio::object_server objServer; |
kasunath | 7cea1b9 | 2022-06-14 20:23:27 -0700 | [diff] [blame] | 39 | |
| 40 | /** |
kasunath | 7cea1b9 | 2022-06-14 20:23:27 -0700 | [diff] [blame] | 41 | * @brief DBus index of the next entry. |
| 42 | */ |
| 43 | uint64_t nextEntry = 0; |
| 44 | }; |
| 45 | |
| 46 | } // namespace rde |
| 47 | } // namespace bios_bmc_smm_error_logger |