1 #pragma once
2 
3 #include "dbus/file_notifier.hpp"
4 
5 #include <sdbusplus/asio/object_server.hpp>
6 
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      *
24      * @param conn - sdbusplus asio connection.
25      */
26     explicit CperFileNotifierHandler(
27         const std::shared_ptr<sdbusplus::asio::connection>& conn);
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:
37     sdbusplus::server::manager_t objManager;
38     sdbusplus::asio::object_server objServer;
39 
40     /**
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
48