cleanup: move EM service code in EM directory

Improving repository structure increases maintainability.

Change-Id: I7f746a5d491dda256a06143f516e7d078a761c14
Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
diff --git a/src/entity_manager/perform_scan.hpp b/src/entity_manager/perform_scan.hpp
new file mode 100644
index 0000000..ae57582
--- /dev/null
+++ b/src/entity_manager/perform_scan.hpp
@@ -0,0 +1,48 @@
+#pragma once
+
+#include "../utils.hpp"
+
+#include <systemd/sd-journal.h>
+
+#include <boost/container/flat_map.hpp>
+#include <nlohmann/json.hpp>
+#include <sdbusplus/asio/object_server.hpp>
+
+#include <functional>
+#include <list>
+#include <vector>
+
+namespace scan
+{
+struct DBusDeviceDescriptor
+{
+    DBusInterface interface;
+    std::string path;
+};
+
+using FoundDevices = std::vector<DBusDeviceDescriptor>;
+
+struct PerformScan : std::enable_shared_from_this<PerformScan>
+{
+    PerformScan(nlohmann::json& systemConfiguration,
+                nlohmann::json& missingConfigurations,
+                std::list<nlohmann::json>& configurations,
+                sdbusplus::asio::object_server& objServer,
+                std::function<void()>&& callback);
+
+    void updateSystemConfiguration(const nlohmann::json& recordRef,
+                                   const std::string& probeName,
+                                   FoundDevices& foundDevices);
+    void run();
+    virtual ~PerformScan();
+    nlohmann::json& _systemConfiguration;
+    nlohmann::json& _missingConfigurations;
+    std::list<nlohmann::json> _configurations;
+    sdbusplus::asio::object_server& objServer;
+    std::function<void()> _callback;
+    bool _passed = false;
+    MapperGetSubTreeResponse dbusProbeObjects;
+    std::vector<std::string> passedProbes;
+};
+
+} // namespace scan