#pragma once
#include "app.hpp"
#include "async_resp.hpp"
#include "dbus_singleton.hpp"
#include "openbmc_dbus_rest.hpp"
#include "websocket.hpp"

#include <boost/container/flat_map.hpp>
#include <boost/container/flat_set.hpp>
#include <sdbusplus/bus/match.hpp>
#include <sdbusplus/message/types.hpp>

#include <variant>

namespace crow
{
namespace dbus_monitor
{

struct DbusWebsocketSession
{
    std::vector<std::unique_ptr<sdbusplus::bus::match_t>> matches;
    boost::container::flat_set<std::string, std::less<>,
                               std::vector<std::string>>
        interfaces;
};

using SessionMap = boost::container::flat_map<crow::websocket::Connection*,
                                              DbusWebsocketSession>;

// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
static SessionMap sessions;

inline int onPropertyUpdate(sd_bus_message* m, void* userdata,
                            sd_bus_error* retError)
{
    if (retError == nullptr || (sd_bus_error_is_set(retError) != 0))
    {
        BMCWEB_LOG_ERROR("Got sdbus error on match");
        return 0;
    }
    crow::websocket::Connection* connection =
        static_cast<crow::websocket::Connection*>(userdata);
    auto thisSession = sessions.find(connection);
    if (thisSession == sessions.end())
    {
        BMCWEB_LOG_ERROR("Couldn't find dbus connection {}",
                         logPtr(connection));
        return 0;
    }
    sdbusplus::message_t message(m);
    nlohmann::json json;
    json["event"] = message.get_member();
    json["path"] = message.get_path();
    if (strcmp(message.get_member(), "PropertiesChanged") == 0)
    {
        nlohmann::json data;
        int r = openbmc_mapper::convertDBusToJSON("sa{sv}as", message, data);
        if (r < 0)
        {
            BMCWEB_LOG_ERROR("convertDBusToJSON failed with {}", r);
            return 0;
        }
        if (!data.is_array())
        {
            BMCWEB_LOG_ERROR("No data in PropertiesChanged signal");
            return 0;
        }

        // data is type sa{sv}as and is an array[3] of string, object, array
        json["interface"] = data[0];
        json["properties"] = data[1];
    }
    else if (strcmp(message.get_member(), "InterfacesAdded") == 0)
    {
        nlohmann::json data;
        int r = openbmc_mapper::convertDBusToJSON("oa{sa{sv}}", message, data);
        if (r < 0)
        {
            BMCWEB_LOG_ERROR("convertDBusToJSON failed with {}", r);
            return 0;
        }
        nlohmann::json::array_t* arr = data.get_ptr<nlohmann::json::array_t*>();
        if (arr == nullptr)
        {
            BMCWEB_LOG_ERROR("No data in InterfacesAdded signal");
            return 0;
        }
        if (arr->size() < 2)
        {
            BMCWEB_LOG_ERROR("No data in InterfacesAdded signal");
            return 0;
        }

        nlohmann::json::object_t* obj =
            (*arr)[1].get_ptr<nlohmann::json::object_t*>();
        if (obj == nullptr)
        {
            BMCWEB_LOG_ERROR("No data in InterfacesAdded signal");
            return 0;
        }
        // data is type oa{sa{sv}} which is an array[2] of string, object
        for (const auto& entry : *obj)
        {
            auto it = thisSession->second.interfaces.find(entry.first);
            if (it != thisSession->second.interfaces.end())
            {
                json["interfaces"][entry.first] = entry.second;
            }
        }
    }
    else
    {
        BMCWEB_LOG_CRITICAL("message {} was unexpected", message.get_member());
        return 0;
    }

    connection->sendText(
        json.dump(2, ' ', true, nlohmann::json::error_handler_t::replace));
    return 0;
}

inline void requestRoutes(App& app)
{
    BMCWEB_ROUTE(app, "/subscribe")
        .privileges({{"Login"}})
        .websocket()
        .onopen([&](crow::websocket::Connection& conn) {
        BMCWEB_LOG_DEBUG("Connection {} opened", logPtr(&conn));
        sessions.try_emplace(&conn);
    })
        .onclose([&](crow::websocket::Connection& conn, const std::string&) {
        sessions.erase(&conn);
    })
        .onmessage([&](crow::websocket::Connection& conn,
                       const std::string& data, bool) {
        const auto sessionPair = sessions.find(&conn);
        if (sessionPair == sessions.end())
        {
            conn.close("Internal error");
        }
        DbusWebsocketSession& thisSession = sessionPair->second;
        BMCWEB_LOG_DEBUG("Connection {} received {}", logPtr(&conn), data);
        nlohmann::json j = nlohmann::json::parse(data, nullptr, false);
        if (j.is_discarded())
        {
            BMCWEB_LOG_ERROR("Unable to parse json data for monitor");
            conn.close("Unable to parse json request");
            return;
        }
        nlohmann::json::iterator interfaces = j.find("interfaces");
        if (interfaces != j.end())
        {
            thisSession.interfaces.reserve(interfaces->size());
            for (auto& interface : *interfaces)
            {
                const std::string* str =
                    interface.get_ptr<const std::string*>();
                if (str != nullptr)
                {
                    thisSession.interfaces.insert(*str);
                }
            }
        }

        nlohmann::json::iterator paths = j.find("paths");
        if (paths == j.end())
        {
            BMCWEB_LOG_ERROR("Unable to find paths in json data");
            conn.close("Unable to find paths in json data");
            return;
        }

        size_t interfaceCount = thisSession.interfaces.size();
        if (interfaceCount == 0)
        {
            interfaceCount = 1;
        }

        // These regexes derived on the rules here:
        // https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names
        static std::regex validPath("^/([A-Za-z0-9_]+/?)*$");
        static std::regex validInterface(
            "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)+$");

        for (const auto& thisPath : *paths)
        {
            const std::string* thisPathString =
                thisPath.get_ptr<const std::string*>();
            if (thisPathString == nullptr)
            {
                BMCWEB_LOG_ERROR("subscribe path isn't a string?");
                conn.close();
                return;
            }
            if (!std::regex_match(*thisPathString, validPath))
            {
                BMCWEB_LOG_ERROR("Invalid path name {}", *thisPathString);
                conn.close();
                return;
            }
            std::string propertiesMatchString =
                ("type='signal',"
                 "interface='org.freedesktop.DBus.Properties',"
                 "path_namespace='" +
                 *thisPathString +
                 "',"
                 "member='PropertiesChanged'");
            // If interfaces weren't specified, add a single match for all
            // interfaces
            if (thisSession.interfaces.empty())
            {
                BMCWEB_LOG_DEBUG("Creating match {}", propertiesMatchString);

                thisSession.matches.emplace_back(
                    std::make_unique<sdbusplus::bus::match_t>(
                        *crow::connections::systemBus, propertiesMatchString,
                        onPropertyUpdate, &conn));
            }
            else
            {
                // If interfaces were specified, add a match for each
                // interface
                for (const std::string& interface : thisSession.interfaces)
                {
                    if (!std::regex_match(interface, validInterface))
                    {
                        BMCWEB_LOG_ERROR("Invalid interface name {}",
                                         interface);
                        conn.close();
                        return;
                    }
                    std::string ifaceMatchString = propertiesMatchString;
                    ifaceMatchString += ",arg0='";
                    ifaceMatchString += interface;
                    ifaceMatchString += "'";
                    BMCWEB_LOG_DEBUG("Creating match {}", ifaceMatchString);
                    thisSession.matches.emplace_back(
                        std::make_unique<sdbusplus::bus::match_t>(
                            *crow::connections::systemBus, ifaceMatchString,
                            onPropertyUpdate, &conn));
                }
            }
            std::string objectManagerMatchString =
                ("type='signal',"
                 "interface='org.freedesktop.DBus.ObjectManager',"
                 "path_namespace='" +
                 *thisPathString +
                 "',"
                 "member='InterfacesAdded'");
            BMCWEB_LOG_DEBUG("Creating match {}", objectManagerMatchString);
            thisSession.matches.emplace_back(
                std::make_unique<sdbusplus::bus::match_t>(
                    *crow::connections::systemBus, objectManagerMatchString,
                    onPropertyUpdate, &conn));
        }
    });
}
} // namespace dbus_monitor
} // namespace crow
