#pragma once #include "../utils.hpp" #include #include #include constexpr const char* configurationOutDir = "/var/configuration/"; constexpr const char* versionHashFile = "/var/configuration/version"; constexpr const char* versionFile = "/etc/os-release"; namespace em_utils { namespace properties { constexpr const char* interface = "org.freedesktop.DBus.Properties"; constexpr const char* get = "Get"; } // namespace properties bool fwVersionIsSame(); void handleLeftOverTemplateVars(nlohmann::json& value); void handleLeftOverTemplateVars(nlohmann::json::object_t& value); void handleLeftOverTemplateVars(nlohmann::json::array_t& value); void handleLeftOverTemplateVars(std::string& value); std::optional templateCharReplace( nlohmann::json& value, const DBusObject& object, size_t index, const std::optional& replaceStr = std::nullopt, bool handleLeftOver = true); std::optional templateCharReplace( nlohmann::json& value, const DBusInterface& interface, size_t index, const std::optional& replaceStr = std::nullopt); std::string buildInventorySystemPath(std::string& boardName, const std::string& boardType); } // namespace em_utils