#pragma once #include #include #include #include using DBusValueVariant = std::variant>; using DBusInterface = boost::container::flat_map; using DBusObject = boost::container::flat_map; 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::iterator& keyPair); std::optional templateCharReplace( nlohmann::json::iterator& keyPair, const DBusObject& object, size_t index, const std::optional& replaceStr = std::nullopt); std::optional templateCharReplace( nlohmann::json::iterator& keyPair, 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