#pragma once #include "perform_scan.hpp" #include #include #include #include namespace probe { struct CmpStr { bool operator()(const char* a, const char* b) const { return std::strcmp(a, b) < 0; } }; // underscore T for collison with dbus c api enum class probe_type_codes { FALSE_T, TRUE_T, AND, OR, FOUND, MATCH_ONE }; using FoundProbeTypeT = std::optional; FoundProbeTypeT findProbeType(const std::string& probe); // this class finds the needed dbus fields and on destruction runs the probe struct PerformProbe : std::enable_shared_from_this { PerformProbe(nlohmann::json& recordRef, const std::vector& probeCommand, std::string probeName, std::shared_ptr& scanPtr); virtual ~PerformProbe(); private: nlohmann::json& recordRef; std::vector _probeCommand; std::string probeName; std::shared_ptr scan; }; } // namespace probe