summaryrefslogtreecommitdiffstats
path: root/elog_watch.hpp
diff options
context:
space:
mode:
authorJayanth Othayoth <ojayanth@in.ibm.com>2018-10-16 08:29:32 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-10-18 16:33:14 -0400
commitcb65ffce0f0496c603cba6d6e12b20d66372cb9a (patch)
treeea178b2585004b8b00a1006ec1b2f5adffc99ca1 /elog_watch.hpp
parentae871bd0661c472a0c3ad231fc3623535bcfba2d (diff)
downloadphosphor-debug-collector-cb65ffce0f0496c603cba6d6e12b20d66372cb9a.tar.gz
phosphor-debug-collector-cb65ffce0f0496c603cba6d6e12b20d66372cb9a.zip
Enable clang code format
Change-Id: Ib640ef7cea99ff505965182ec9900a2d53a8986e Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'elog_watch.hpp')
-rw-r--r--elog_watch.hpp148
1 files changed, 74 insertions, 74 deletions
diff --git a/elog_watch.hpp b/elog_watch.hpp
index 4730311..2c808cf 100644
--- a/elog_watch.hpp
+++ b/elog_watch.hpp
@@ -1,13 +1,13 @@
#pragma once
-#include <set>
-#include <cereal/access.hpp>
+#include "config.h"
+
+#include "dump_manager.hpp"
+#include <cereal/access.hpp>
#include <sdbusplus/bus.hpp>
#include <sdbusplus/server.hpp>
-
-#include "config.h"
-#include "dump_manager.hpp"
+#include <set>
namespace phosphor
{
@@ -27,74 +27,74 @@ using ElogList = std::set<EId>;
*/
class Watch
{
- public:
- Watch() = delete;
- ~Watch() = default;
- Watch(const Watch&) = delete;
- Watch& operator=(const Watch&) = delete;
- Watch(Watch&&) = default;
- Watch& operator=(Watch&&) = default;
-
- /** @brief constructs watch for elog add and delete signals.
- * @param[in] bus - The Dbus bus object
- * @param[in] intMgr - Dump internal Manager object
- */
- Watch(sdbusplus::bus::bus& bus, IMgr& iMgr);
- private:
-
- friend class cereal::access;
-
- /** @brief Function required by Cereal to perform serialization.
- * @tparam Archive - Cereal archive type (binary in our case).
- * @param[in] a - reference to Cereal archive.
- * @param[in] version - Class version that enables handling
- * a serialized data across code levels
- */
- template<class Archive>
- void serialize(Archive& a, const std::uint32_t version)
- {
- a(elogList);
-
- //TODO: openbmc/phosphor-debug-collector#1
- // Split into load/save so that it enables
- // version compare during serialization
- }
-
- /** @brief Callback function for error log add.
- * @details InternalError type error message initiates
- * Internal error type dump request.
- * @param[in] msg - Data associated with subscribed signal
- */
- void addCallback(sdbusplus::message::message& msg);
-
- /** @brief Callback function for error log delete.
- * @param[in] msg - Data associated with subscribed signal
- */
- void delCallback(sdbusplus::message::message& msg);
-
- /** @brief get elog ID from elog entry object string.
- * @param[in] objectPath - elog entry object path.
- * @return - elog id.
- */
- inline EId getEid(const std::string& objectPath)
- {
- fs::path path(objectPath);
- return std::stoul(path.filename());
- }
-
- /** @brief Dump internal Manager object. */
- IMgr& iMgr;
-
- /** @brief sdbusplus signal match for elog add */
- sdbusplus::bus::match_t addMatch;
-
- /** @brief sdbusplus signal match for elog delete */
- sdbusplus::bus::match_t delMatch;
-
- /** @brief List of elog ids, which have associated dumps created */
- ElogList elogList;
+ public:
+ Watch() = delete;
+ ~Watch() = default;
+ Watch(const Watch&) = delete;
+ Watch& operator=(const Watch&) = delete;
+ Watch(Watch&&) = default;
+ Watch& operator=(Watch&&) = default;
+
+ /** @brief constructs watch for elog add and delete signals.
+ * @param[in] bus - The Dbus bus object
+ * @param[in] intMgr - Dump internal Manager object
+ */
+ Watch(sdbusplus::bus::bus& bus, IMgr& iMgr);
+
+ private:
+ friend class cereal::access;
+
+ /** @brief Function required by Cereal to perform serialization.
+ * @tparam Archive - Cereal archive type (binary in our case).
+ * @param[in] a - reference to Cereal archive.
+ * @param[in] version - Class version that enables handling
+ * a serialized data across code levels
+ */
+ template <class Archive>
+ void serialize(Archive& a, const std::uint32_t version)
+ {
+ a(elogList);
+
+ // TODO: openbmc/phosphor-debug-collector#1
+ // Split into load/save so that it enables
+ // version compare during serialization
+ }
+
+ /** @brief Callback function for error log add.
+ * @details InternalError type error message initiates
+ * Internal error type dump request.
+ * @param[in] msg - Data associated with subscribed signal
+ */
+ void addCallback(sdbusplus::message::message& msg);
+
+ /** @brief Callback function for error log delete.
+ * @param[in] msg - Data associated with subscribed signal
+ */
+ void delCallback(sdbusplus::message::message& msg);
+
+ /** @brief get elog ID from elog entry object string.
+ * @param[in] objectPath - elog entry object path.
+ * @return - elog id.
+ */
+ inline EId getEid(const std::string& objectPath)
+ {
+ fs::path path(objectPath);
+ return std::stoul(path.filename());
+ }
+
+ /** @brief Dump internal Manager object. */
+ IMgr& iMgr;
+
+ /** @brief sdbusplus signal match for elog add */
+ sdbusplus::bus::match_t addMatch;
+
+ /** @brief sdbusplus signal match for elog delete */
+ sdbusplus::bus::match_t delMatch;
+
+ /** @brief List of elog ids, which have associated dumps created */
+ ElogList elogList;
};
-}//namespace elog
-}//namespace dump
-}//namespace phosphor
+} // namespace elog
+} // namespace dump
+} // namespace phosphor
OpenPOWER on IntegriCloud