#pragma once

#include <memory>
#include <vector>

#include <QString>

#include "core/models/DOMMessage.h"
#include "message_bus/pipeline/PipelineContext.h"
#include "message_bus/pipeline/protocol/ProtocolEnvelope.h"

namespace softbus::core::plugin_system
{

class IProtocolMapperSession
{
public:
    virtual ~IProtocolMapperSession() = default;
    virtual std::vector<softbus::core::models::DOMMessage> map(
        const softbus::message_bus::pipeline::PipelineContext& rawContext,
        const softbus::message_bus::pipeline::protocol::ProtocolEnvelope& envelope) = 0;
    virtual void reset() = 0;
};

class IProtocolMapperPlugin
{
public:
    virtual ~IProtocolMapperPlugin() = default;

    virtual QString pluginId() const = 0;
    virtual bool supports(const QString& protocolHint) const = 0;
    virtual std::unique_ptr<IProtocolMapperSession> createMapperSession() = 0;
};

} // namespace softbus::core::plugin_system

