xref: /openbmc/phosphor-bmc-code-mgmt/eeprom-device/eeprom_device_software_manager.hpp (revision dd3551fd0536e3fcd7dc2166715d50aaa457f1a0)
1 #pragma once
2 
3 #include "common/include/software_manager.hpp"
4 
5 namespace ManagerInf = phosphor::software::manager;
6 
7 const std::string configTypeEEPROMDevice = "EEPROMDevice";
8 
9 class EEPROMDeviceSoftwareManager : public ManagerInf::SoftwareManager
10 {
11   public:
EEPROMDeviceSoftwareManager(sdbusplus::async::context & ctx)12     EEPROMDeviceSoftwareManager(sdbusplus::async::context& ctx) :
13         SoftwareManager(ctx, configTypeEEPROMDevice)
14     {}
15 
16     void start();
17 
18     sdbusplus::async::task<bool> initDevice(const std::string& service,
19                                             const std::string& path,
20                                             SoftwareConfig& config) final;
21 
22   private:
23     sdbusplus::async::task<bool> getDeviceProperties(
24         const std::string& service, const std::string& path,
25         const std::string& intf, uint16_t& bus, uint8_t& address,
26         std::string& chipModel);
27 };
28