#include "SystemdInterface.hpp"

#include <phosphor-logging/lg2.hpp>
#include <sdbusplus/async.hpp>
#include <sdbusplus/message/native_types.hpp>

#include <exception>
#include <string>
#include <variant>

PHOSPHOR_LOG2_USING;

namespace systemd
{

auto SystemdInterface::startUnit(sdbusplus::async::context& ctx,
                                 std::string sysdUnit)
    -> sdbusplus::async::task<>
{
    if (sysdUnit.empty())
    {
        error("sysdUnit is empty");
        co_return;
    }

    try
    {
        constexpr auto systemd =
            sdbusplus::async::proxy()
                .service("org.freedesktop.systemd1")
                .path("/org/freedesktop/systemd1")
                .interface("org.freedesktop.systemd1.Manager");

        std::variant<sdbusplus::message::object_path> jobObjectPath =
            co_await systemd
                .call<std::variant<sdbusplus::message::object_path>>(
                    ctx, "StartUnit", sysdUnit, "replace");

        debug("Started {UNIT} with {JOBID}", "UNIT", sysdUnit, "JOBID",
              std::get<sdbusplus::message::object_path>(jobObjectPath));
    }
    catch (const std::exception& e)
    {
        warning("Failed to start {UNIT}: {ERROR}", "UNIT", sysdUnit, "ERROR",
                e);
        co_return;
    }

    co_return;
}

} // namespace systemd
