1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00
LibQQt/qqtprotocol.h

38 lines
889 B
C
Raw Normal View History

2016-12-29 16:49:18 +08:00
#ifndef QQTPROTOCOL_H
#define QQTPROTOCOL_H
#include <QObject>
#include "qqtmessage.h"
class QQTProtocol : public QObject
{
Q_OBJECT
public:
explicit QQTProtocol(QObject *parent = 0);
signals:
qint64 write(const QByteArray& l);
public:
2017-08-13 11:49:27 +08:00
virtual quint16 minlength() { return 0; }
2016-12-29 16:49:18 +08:00
/**
* @brief
* @return
*/
2017-08-13 11:49:27 +08:00
virtual quint16 maxlength() { return 0; }
2016-12-29 16:49:18 +08:00
/**
* @brief
* @param
* @return
*/
2017-08-13 11:49:27 +08:00
virtual quint16 splitter(const QByteArray &s) { return 0; }
2016-12-29 16:49:18 +08:00
/**
* @brief
* @param
* @return 0 no dispatched(others) 1 dispatched(own)
*/
2017-08-13 11:49:27 +08:00
virtual bool dispatcher(const QByteArray &m) { return 0; }
2016-12-29 16:49:18 +08:00
};
#endif // QQTPROTOCOL_H