xref: /openbmc/phosphor-snmp/snmp_client.cpp (revision 1dc9178d)
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     parent(parent)
15 {
16     this->address(address);
17     this->port(port);
18 
19     // Emit deferred signal.
20     emit_object_added();
21 }
22 
23 void Client::delete_()
24 {
25     parent.deleteSNMPClient(this->address());
26 }
27 
28 } // namespace snmp
29 } // namespace network
30 } // namespace phosphor
31