//
// Created by Ht on 2022/3/2.
//

#ifndef INC_1_LIBDEVCPP_QBYTETRANSFER_H
#define INC_1_LIBDEVCPP_QBYTETRANSFER_H

#include <qlibc/QBufferManager.h>

namespace qlibc {

    class JE_API QByteTransfer :
            public BufferManager {

    public:
        //nothing to do.
        virtual void deTransferBytes(unsigned char *data, uint16_t len, QRByte& newbuff, size_t& newlen) {
            newlen = len;
        }

        virtual bool decodeMessage(qlibc::QData& data, QByte *buff, uint16_t len ) {
            return true;
        }

        virtual bool encodeMessage(qlibc::QData& data, QByte **buff, size_t &len) {
            return true;
        }

        virtual const std::string& getUriKey() = 0;
    };
}

#endif //INC_1_LIBDEVCPP_QBYTETRANSFER_H
