1 #include "snmp_client.hpp" 2 #include "snmp_conf_manager.hpp" 3 4 namespace phosphor 5 { 6 namespace network 7 { 8 namespace snmp 9 { 10 11 Client::Client(sdbusplus::bus::bus& bus, const char* objPath, 12 ConfManager& parent, const std::string& address, uint16_t port) : 13 Ifaces(bus, objPath, true), 14 id(std::stol(std::experimental::filesystem::path(objPath).filename())), 15 parent(parent) 16 { 17 this->address(address); 18 this->port(port); 19 20 // Emit deferred signal. 21 emit_object_added(); 22 } 23 24 void Client::delete_() 25 { 26 parent.deleteSNMPClient(id); 27 } 28 29 } // namespace snmp 30 } // namespace network 31 } // namespace phosphor 32