summaryrefslogtreecommitdiffstats
path: root/user_channel/channel_mgmt.hpp
diff options
context:
space:
mode:
authorJohnathan Mantey <johnathanx.mantey@intel.com>2018-12-10 16:24:26 -0800
committerJohnathan Mantey <johnathanx.mantey@intel.com>2019-02-04 12:34:49 -0800
commite5c4f1d7a751a6ded6bb099d1949c3871d9c487a (patch)
tree0650a838094458a8480281bd4bd950b1a41fed70 /user_channel/channel_mgmt.hpp
parentf92261dc449bc4579249101997da0648718dee2f (diff)
downloadphosphor-host-ipmid-e5c4f1d7a751a6ded6bb099d1949c3871d9c487a.tar.gz
phosphor-host-ipmid-e5c4f1d7a751a6ded6bb099d1949c3871d9c487a.zip
Eliminate public function returning pointer to private class data
The getChannelDataPtr method breaks class encapsulation. Only class methods are supposed to have access to class private instance variables. Change-Id: I5dbfb75f0fa409b82a1e7f426b2034d39f7df9ad Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
Diffstat (limited to 'user_channel/channel_mgmt.hpp')
-rw-r--r--user_channel/channel_mgmt.hpp27
1 files changed, 18 insertions, 9 deletions
diff --git a/user_channel/channel_mgmt.hpp b/user_channel/channel_mgmt.hpp
index 8b81391..993b3d1 100644
--- a/user_channel/channel_mgmt.hpp
+++ b/user_channel/channel_mgmt.hpp
@@ -232,21 +232,13 @@ class ChannelConfig
*/
int writeChannelVolatileData();
- /** @brief function to get channel data based on channel number
- *
- * @param[in] chNum - channel number
- *
- * @return 0 for success, -errno for failure.
- */
- ChannelData* getChannelDataPtr(const uint8_t chNum);
-
uint32_t signalFlag = 0;
std::unique_ptr<boost::interprocess::named_recursive_mutex> channelMutex{
nullptr};
private:
- ChannelData channelData[maxIpmiChannels];
+ std::array<ChannelData, maxIpmiChannels> channelData;
std::time_t nvFileLastUpdatedTime;
std::time_t voltFileLastUpdatedTime;
std::time_t getUpdatedFileTime(const std::string& fileName);
@@ -400,6 +392,23 @@ class ChannelConfig
* @return channel protocol type
*/
EChannelProtocolType convertToProtocolTypeIndex(const std::string& value);
+
+ /** @brief function to convert channel name to network interface name
+ *
+ * @param[in] value - channel interface name - ipmi centric
+ *
+ * @return network channel interface name
+ */
+ std::string convertToNetInterface(const std::string& value);
+
+ /** @brief function to handle Channel access property update through the
+ * D-Bus handler.
+ *
+ * @param[in] path - D-Bus path to the network element (i.e. eth0)
+ * @param[in] chProperties - D-Bus channel properties
+ */
+ void processChAccessPropChange(const std::string& path,
+ const DbusChObjProperties& chProperties);
};
} // namespace ipmi
OpenPOWER on IntegriCloud