diff options
author | Kun Yi <kunyi731@gmail.com> | 2019-11-22 20:11:42 -0800 |
---|---|---|
committer | Kun Yi <kunyi731@gmail.com> | 2019-11-25 11:02:00 -0800 |
commit | 9cd8f76d3a786645ba6e21e146f66f5f27a6290c (patch) | |
tree | 8b7c273496af685586a889f7b8cc7082f6559db9 /manager.hpp | |
parent | beee9e54ae3e20bce5e466773cfda9232382e2e7 (diff) | |
download | phosphor-ipmi-blobs-master.tar.gz phosphor-ipmi-blobs-master.zip |
* Move functions to private as appropriate
* Reorder functions to match declaration order
* Declare arguments as const when appropriate
* Rename to getActionHandler() to match previous method name
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: I7d3b5bbb07c218c6c2d6277a1f19d8a0299bd6e6
Diffstat (limited to 'manager.hpp')
-rw-r--r-- | manager.hpp | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/manager.hpp b/manager.hpp index a7e9936..3dc09cd 100644 --- a/manager.hpp +++ b/manager.hpp @@ -236,6 +236,7 @@ class BlobManager : public ManagerInterface */ bool getSession(uint16_t* session); + private: /** * Given a file path will return first handler to answer that it owns * it. @@ -246,23 +247,34 @@ class BlobManager : public ManagerInterface GenericBlobInterface* getHandler(const std::string& path); /** - * Given a session id, update session time and return a handle to take + * Given a session id, update session time and return a handler to take * action * * @param[in] session - session ID - * @param[in] requiredFlags - only return handle if the flags for this + * @param[in] requiredFlags - only return handler if the flags for this * session contain these flags; defaults to any flag * @return session handler, nullptr if cannot get handler */ - GenericBlobInterface* getActionHandle( + GenericBlobInterface* getActionHandler( uint16_t session, uint16_t requiredFlags = std::numeric_limits<uint16_t>::max()); - private: - /* Helper method to erase a session from all maps */ - void eraseSession(GenericBlobInterface* handler, uint16_t session); - /* For each session owned by this handler, call expire if it is stale */ - void cleanUpStaleSessions(GenericBlobInterface* handler); + /** + * Helper method to erase a session from all maps + * + * @param[in] handler - handler pointer for lookup + * @param[in] session - session ID for lookup + * @return None + */ + void eraseSession(GenericBlobInterface* const handler, uint16_t session); + + /** + * For each session owned by this handler, call expire if it is stale + * + * @param[in] handler - handler pointer for lookup + * @return None + */ + void cleanUpStaleSessions(GenericBlobInterface* const handler); /* How long a session has to be inactive to be considered stale */ std::chrono::seconds sessionTimeout; |