diff options
Diffstat (limited to 'user_channel/channel_mgmt.hpp')
-rw-r--r-- | user_channel/channel_mgmt.hpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/user_channel/channel_mgmt.hpp b/user_channel/channel_mgmt.hpp index 35bb494..80bd6d9 100644 --- a/user_channel/channel_mgmt.hpp +++ b/user_channel/channel_mgmt.hpp @@ -23,14 +23,14 @@ #include <ctime> #include <nlohmann/json.hpp> #include <sdbusplus/bus.hpp> +#include <variant> namespace ipmi { using Json = nlohmann::json; -using DbusVariant = - sdbusplus::message::variant<std::vector<std::string>, std::string, bool>; +using DbusVariant = std::variant<std::vector<std::string>, std::string, bool>; using DbusChObjProperties = std::vector<std::pair<std::string, DbusVariant>>; @@ -105,6 +105,18 @@ class ChannelConfig */ std::string getChannelName(const uint8_t chNum); + /** @brief function to get channel number from channel name + * + * @param[in] chName - channel name + * + * @return network channel interface number + */ + + uint8_t getChannelByName(const std::string& chName) + { + return convertToChannelNumberFromChannelName(chName); + } + /** @brief determines supported session type of a channel * * @param[in] chNum - channel number @@ -212,14 +224,6 @@ class ChannelConfig */ CommandPrivilege convertToPrivLimitIndex(const std::string& value); - /** @brief function to convert channel number to channel index - * - * @param[in] chNum - channel number - * - * @return channel index - */ - uint8_t convertToChannelIndexNumber(const uint8_t chNum); - /** @brief function to write persistent channel configuration to config file * * @return 0 for success, -errno for failure. |