| 123456789101112131415161718192021222324252627282930313233343536 |
- #ifndef PACKINFOSEED2SERVER_H
- #define PACKINFOSEED2SERVER_H
- #include <QObject>
- #include "httprequest.h"
- #include "struct_/packinfo.h"
- #include <QQueue>
- #include "packinfomanger.h"
- #include <pqQtlib/log/pqlog.h>
- // 码单的上传
- class PackInfoSeed2Server : public QObject
- {
- Q_OBJECT
- public:
- explicit PackInfoSeed2Server(PackInfoManger * manger,QObject *parent = nullptr,bool autoSync = false);
- signals:
- public slots:
- void send(QSharedPointer<PackInfo> & info);
- private slots:
- void doSend();
- void result(int code, const QJsonObject & body);
- private:
- uint _netErrorCount;
- QQueue<QSharedPointer<PackInfo>> _queue;
- QSharedPointer<PackInfo> _current;
- PackInfoManger * _manger;
- HttpRequest _requst;
- bool _autoSync;
- uint _oneSyncError;
- PQ::PQLog * log;
- };
- #endif // PACKINFOSEED2SERVER_H
|