//
// Created by Ht on 2022/10/29.
//

#ifndef INC_1_LIBDEVCPP_JAVDAODEBUGGERS_H
#define INC_1_LIBDEVCPP_JAVDAODEBUGGERS_H

#include "../cmder/JAExtCommandor.h"

namespace jedge {

    class JE_API JAVdaoDebuggers :
            public qlibc::JAExtCommandor {
    public:
        explicit JAVdaoDebuggers(const std::string& cmdKey, jedge::QJAMgServer& opr, jedge::QJAMgService& svc) :
                qlibc::JAExtCommandor(cmdKey, opr, svc) {
        }

        void buildCommandHandlers() override;
    };

    using JAVdaoDebuggersR = std::shared_ptr<JAVdaoDebuggers>;

    class JE_API JAVdaoDevOperator :
            public qlibc::JAExtCommandor {
    public:
        explicit JAVdaoDevOperator(const std::string& cmdKey, jedge::QJAMgServer& opr, jedge::QJAMgService& svc) :
                qlibc::JAExtCommandor(cmdKey, opr, svc) {}

        void buildCommandHandlers() override;
    };

    using JAVdaoDebuggersR = std::shared_ptr<JAVdaoDebuggers>;

    class JE_API JAVdaoScRunner :
            public qlibc::JAExtCommandor {
    public:
        explicit JAVdaoScRunner(const std::string& cmdKey, jedge::QJAMgServer& opr, jedge::QJAMgService& svc) :
        qlibc::JAExtCommandor(cmdKey, opr, svc) {}

        void buildCommandHandlers() override;
    };

    using JAVdaoDebuggersR = std::shared_ptr<JAVdaoDebuggers>;

    class JE_API JAVdaoSerialEmulator :
            public qlibc::JAExtCommandor {
    public:
        explicit JAVdaoSerialEmulator(const std::string& cmdKey, jedge::QJAMgServer& opr, jedge::QJAMgService& svc) :
        qlibc::JAExtCommandor(cmdKey, opr, svc) {}

        void buildCommandHandlers() override;
    };

    using JAVdaoDebuggersR = std::shared_ptr<JAVdaoDebuggers>;

    void showResultLog(ChannelOperator& opr, const std::string& command, qlibc::QData *resp);

    void setDefaultDebuggerTarget(const std::string& debug_module);
}

#endif //INC_1_LIBDEVCPP_JAVDAODEBUGGERS_H
