11bbe3d1eSWilliam A. Kennington III #pragma once 21bbe3d1eSWilliam A. Kennington III 31bbe3d1eSWilliam A. Kennington III #include <sdbusplus/bus.hpp> 41bbe3d1eSWilliam A. Kennington III #include <sdbusplus/server/object.hpp> 5*be3bd2fcSWilliam A. Kennington III #include <stdplus/zstring.hpp> 61bbe3d1eSWilliam A. Kennington III #include <string> 71bbe3d1eSWilliam A. Kennington III #include <xyz/openbmc_project/Network/SystemConfiguration/server.hpp> 81bbe3d1eSWilliam A. Kennington III 91bbe3d1eSWilliam A. Kennington III namespace phosphor 101bbe3d1eSWilliam A. Kennington III { 111bbe3d1eSWilliam A. Kennington III namespace network 121bbe3d1eSWilliam A. Kennington III { 131bbe3d1eSWilliam A. Kennington III 141bbe3d1eSWilliam A. Kennington III using SystemConfigIntf = 151bbe3d1eSWilliam A. Kennington III sdbusplus::xyz::openbmc_project::Network::server::SystemConfiguration; 161bbe3d1eSWilliam A. Kennington III 17c38b0710SPatrick Williams using Iface = sdbusplus::server::object_t<SystemConfigIntf>; 181bbe3d1eSWilliam A. Kennington III 191bbe3d1eSWilliam A. Kennington III class Manager; // forward declaration of network manager. 201bbe3d1eSWilliam A. Kennington III 211bbe3d1eSWilliam A. Kennington III /** @class SystemConfiguration 221bbe3d1eSWilliam A. Kennington III * @brief Network system configuration. 231bbe3d1eSWilliam A. Kennington III * @details A concrete implementation for the 241bbe3d1eSWilliam A. Kennington III * xyz.openbmc_project.Network.SystemConfiguration DBus API. 251bbe3d1eSWilliam A. Kennington III */ 261bbe3d1eSWilliam A. Kennington III class SystemConfiguration : public Iface 271bbe3d1eSWilliam A. Kennington III { 281bbe3d1eSWilliam A. Kennington III public: 291bbe3d1eSWilliam A. Kennington III SystemConfiguration() = default; 301bbe3d1eSWilliam A. Kennington III SystemConfiguration(const SystemConfiguration&) = delete; 311bbe3d1eSWilliam A. Kennington III SystemConfiguration& operator=(const SystemConfiguration&) = delete; 321bbe3d1eSWilliam A. Kennington III SystemConfiguration(SystemConfiguration&&) = delete; 331bbe3d1eSWilliam A. Kennington III SystemConfiguration& operator=(SystemConfiguration&&) = delete; 341bbe3d1eSWilliam A. Kennington III virtual ~SystemConfiguration() = default; 351bbe3d1eSWilliam A. Kennington III 361bbe3d1eSWilliam A. Kennington III /** @brief Constructor to put object onto bus at a dbus path. 371bbe3d1eSWilliam A. Kennington III * @param[in] bus - Bus to attach to. 381bbe3d1eSWilliam A. Kennington III * @param[in] objPath - Path to attach at. 391bbe3d1eSWilliam A. Kennington III * @param[in] parent - Parent object. 401bbe3d1eSWilliam A. Kennington III */ 41*be3bd2fcSWilliam A. Kennington III SystemConfiguration(sdbusplus::bus_t& bus, stdplus::const_zstring objPath); 421bbe3d1eSWilliam A. Kennington III 431bbe3d1eSWilliam A. Kennington III /** @brief set the hostname of the system. 441bbe3d1eSWilliam A. Kennington III * @param[in] name - host name of the system. 451bbe3d1eSWilliam A. Kennington III */ 461bbe3d1eSWilliam A. Kennington III std::string hostName(std::string name) override; 471bbe3d1eSWilliam A. Kennington III 481bbe3d1eSWilliam A. Kennington III private: 491bbe3d1eSWilliam A. Kennington III /** @brief get the hostname from the system by doing 501bbe3d1eSWilliam A. Kennington III * dbus call to hostnamed service. 511bbe3d1eSWilliam A. Kennington III */ 521bbe3d1eSWilliam A. Kennington III std::string getHostNameFromSystem() const; 531bbe3d1eSWilliam A. Kennington III 541bbe3d1eSWilliam A. Kennington III /** @brief Persistent sdbusplus DBus bus connection. */ 55c38b0710SPatrick Williams sdbusplus::bus_t& bus; 561bbe3d1eSWilliam A. Kennington III }; 571bbe3d1eSWilliam A. Kennington III 581bbe3d1eSWilliam A. Kennington III } // namespace network 591bbe3d1eSWilliam A. Kennington III } // namespace phosphor 60