#pragma once

#include <QString>

namespace softbus::api::http
{

/// Parsed `api.http` block from daemon_config.json.
struct RestApiHttpListenOptions
{
    bool sectionPresent{false};
    bool enabled{false};
    QString bindHost;
    int port{18080};
};

/// Reads and validates `api.http`. On success returns true; on missing file returns true with sectionPresent=false.
/// Hard errors (open/parse) set err and return false.
bool loadRestApiHttpListenOptions(const QString& configPath, RestApiHttpListenOptions* out, QString* err = nullptr);

} // namespace softbus::api::http
