//
// Created by Ht on 2020/12/29.
//

#ifndef LIBDEVCPP_JIPVDALSERVER_H
#define LIBDEVCPP_JIPVDALSERVER_H

#include <exlib/http/QASyncHttpServer.h>
#include <mgbus/QMgbusModule.h>
#include "CossBridgeClass.h"

namespace jedge {

    class JECossServer :
            public jedge::QMgbusModule {
    protected:
        CossBridgeClass  mBridge;

    public:
        explicit JECossServer(const qlibc::QData& initConfig);

        ImplServerRelease(JECossServer)

    public:
        bool start(const qlibc::QData &config) override;
        void shutdown() override;

    protected:
        void prepareService(const qlibc::QData &config) override;

        bool handleOriginalMessage(qlibc::QData &msg, qlibc::QData *rsp);
    };

}


#endif //LIBDEVCPP_JIPVDALSERVER_H
