netipmid: apply clang-format rules
Lots of whitespace change. Let clang-format do its job and keep the code
looking nice.
Change-Id: Idfcad1a99cab8170d55a06163de8ad3f420b68b7
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/sessions_manager.hpp b/sessions_manager.hpp
index 1d842de..cf28238 100644
--- a/sessions_manager.hpp
+++ b/sessions_manager.hpp
@@ -1,11 +1,11 @@
#pragma once
+#include "session.hpp"
+
#include <map>
#include <memory>
#include <mutex>
-#include "session.hpp"
-
namespace session
{
@@ -29,74 +29,73 @@
class Manager
{
- public:
+ public:
+ // BMC Session ID is the key for the map
+ using SessionMap = std::map<SessionID, std::shared_ptr<Session>>;
- // BMC Session ID is the key for the map
- using SessionMap = std::map<SessionID, std::shared_ptr<Session>>;
+ Manager();
+ ~Manager() = default;
+ Manager(const Manager&) = delete;
+ Manager& operator=(const Manager&) = delete;
+ Manager(Manager&&) = default;
+ Manager& operator=(Manager&&) = default;
- Manager();
- ~Manager() = default;
- Manager(const Manager&) = delete;
- Manager& operator=(const Manager&) = delete;
- Manager(Manager&&) = default;
- Manager& operator=(Manager&&) = default;
+ /**
+ * @brief Start an IPMI session
+ *
+ * @param[in] remoteConsoleSessID - Remote Console Session ID mentioned
+ * in the Open SessionRequest Command
+ * @param[in] priv - Privilege level requested
+ * @param[in] authAlgo - Authentication Algorithm
+ * @param[in] intAlgo - Integrity Algorithm
+ * @param[in] cryptAlgo - Confidentiality Algorithm
+ *
+ * @return session handle on success and nullptr on failure
+ *
+ */
+ std::weak_ptr<Session> startSession(SessionID remoteConsoleSessID,
+ Privilege priv,
+ cipher::rakp_auth::Algorithms authAlgo,
+ cipher::integrity::Algorithms intAlgo,
+ cipher::crypt::Algorithms cryptAlgo);
- /**
- * @brief Start an IPMI session
- *
- * @param[in] remoteConsoleSessID - Remote Console Session ID mentioned
- * in the Open SessionRequest Command
- * @param[in] priv - Privilege level requested
- * @param[in] authAlgo - Authentication Algorithm
- * @param[in] intAlgo - Integrity Algorithm
- * @param[in] cryptAlgo - Confidentiality Algorithm
- *
- * @return session handle on success and nullptr on failure
- *
- */
- std::weak_ptr<Session> startSession(SessionID remoteConsoleSessID,
- Privilege priv, cipher::rakp_auth::Algorithms authAlgo,
- cipher::integrity::Algorithms intAlgo,
- cipher::crypt::Algorithms cryptAlgo);
+ /**
+ * @brief Stop IPMI Session
+ *
+ * @param[in] bmcSessionID - BMC Session ID
+ *
+ * @return true on success and failure if session ID is invalid
+ *
+ */
+ bool stopSession(SessionID bmcSessionID);
- /**
- * @brief Stop IPMI Session
- *
- * @param[in] bmcSessionID - BMC Session ID
- *
- * @return true on success and failure if session ID is invalid
- *
- */
- bool stopSession(SessionID bmcSessionID);
+ /**
+ * @brief Get Session Handle
+ *
+ * @param[in] sessionID - Session ID
+ * @param[in] option - Select between BMC Session ID and Remote Console
+ * Session ID, Default option is BMC Session ID
+ *
+ * @return session handle on success and nullptr on failure
+ *
+ */
+ std::weak_ptr<Session>
+ getSession(SessionID sessionID,
+ RetrieveOption option = RetrieveOption::BMC_SESSION_ID);
- /**
- * @brief Get Session Handle
- *
- * @param[in] sessionID - Session ID
- * @param[in] option - Select between BMC Session ID and Remote Console
- * Session ID, Default option is BMC Session ID
- *
- * @return session handle on success and nullptr on failure
- *
- */
- std::weak_ptr<Session> getSession(
- SessionID sessionID,
- RetrieveOption option = RetrieveOption::BMC_SESSION_ID);
+ private:
+ /**
+ * @brief Session Manager keeps the session objects as a sorted
+ * associative container with Session ID as the unique key
+ */
+ SessionMap sessionsMap;
- private:
-
- /**
- * @brief Session Manager keeps the session objects as a sorted
- * associative container with Session ID as the unique key
- */
- SessionMap sessionsMap;
-
- /**
- * @brief Clean Session Stale Entries
- *
- * Removes the inactive sessions entries from the Session Map
- */
- void cleanStaleEntries();
+ /**
+ * @brief Clean Session Stale Entries
+ *
+ * Removes the inactive sessions entries from the Session Map
+ */
+ void cleanStaleEntries();
};
} // namespace session