#pragma once

#include <QByteArray>
#include <QHttpServerResponse>
#include <QString>

namespace softbus::api::ipc
{
struct DispatchResult;
class CommandDispatcher;
} // namespace softbus::api::ipc

namespace softbus::api::http
{

/// Same envelope as D-Bus `executeCommand` response body (id/code/message/data).
QHttpServerResponse makeCommandHttpResponse(const QString& id, const softbus::api::ipc::DispatchResult& r);

/// POST body same shape as D-Bus request: { "id", "action", "params" }.
QHttpServerResponse handleExecuteCommandHttpBody(const QByteArray& body, softbus::api::ipc::CommandDispatcher& dispatcher);

} // namespace softbus::api::http
