PerformProbe: remove forward declaration
This was unnecessary and generally considered bad
practice. We can remove it by moving the code to the
header.
Tested: No functional change, code compiles
Change-Id: I1059a8fbd5ce03dfa0f4512b89eb3bb7a57f529c
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/include/EntityManager.hpp b/include/EntityManager.hpp
index ae12014..524fa5d 100644
--- a/include/EntityManager.hpp
+++ b/include/EntityManager.hpp
@@ -30,6 +30,9 @@
std::string,
std::vector<boost::container::flat_map<std::string, BasicVariantType>>>;
+using FoundDeviceT =
+ std::vector<boost::container::flat_map<std::string, BasicVariantType>>;
+
struct PerformScan : std::enable_shared_from_this<PerformScan>
{
@@ -49,6 +52,19 @@
std::vector<std::string> passedProbes;
};
+// this class finds the needed dbus fields and on destruction runs the probe
+struct PerformProbe : std::enable_shared_from_this<PerformProbe>
+{
+ PerformProbe(const std::vector<std::string>& probeCommand,
+ std::shared_ptr<PerformScan>& scanPtr,
+ std::function<void(FoundDeviceT&)>&& callback);
+ virtual ~PerformProbe();
+
+ std::vector<std::string> _probeCommand;
+ std::shared_ptr<PerformScan> scan;
+ std::function<void(FoundDeviceT&)> _callback;
+};
+
inline void logDeviceAdded(const nlohmann::json& record)
{