mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
58 lines
1.5 KiB
C++
58 lines
1.5 KiB
C++
#ifndef RECOGNIZESYSTEM_H
|
|
#define RECOGNIZESYSTEM_H
|
|
|
|
#include "Core/dataparser.h"
|
|
#include "Core/postprocessorsystem.h"
|
|
#include <QObject>
|
|
#include <QDataStream>
|
|
#include <QTcpSocket>
|
|
|
|
#include <QThread>
|
|
#include <Core\tools.h>
|
|
#include <Core\versioncontainer.h>
|
|
#include <Data/Client.h>
|
|
#include <Data\streamingversiondata.h>
|
|
#include <Core\hashcomparer.h>
|
|
|
|
const int BLOCK_SIZE = 1024 * 1024; // Размер блока
|
|
|
|
class RecognizeSystem : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit RecognizeSystem(QObject *parent = 0);
|
|
~RecognizeSystem(){};
|
|
|
|
void initialize(DataParser *dataParser, VersionContainer* versionContainer,PostProcessorSystem *postProcessorSystem,Client *client);
|
|
void recognize(QTcpSocket *socket);
|
|
|
|
signals:
|
|
void sigUpdateBytesAvailable();
|
|
void sigLoadComplete();
|
|
void sigNeedUpdate(bool flag,qint64 size,quint64 fileCount,quint64 fileDelete);
|
|
void sigSendDebugLog(QString message);
|
|
void sigAnimationActivated(bool flag);
|
|
void sigCheckUpdate();
|
|
void sigdRecalculateHashOnServerState();
|
|
void sigSendPacketType(PacketType packetType);
|
|
void sigSendPacketTypeWithDelay(PacketType packetType,int delay);
|
|
void sigSendToInlineLog(QString message);
|
|
void sigCallUpdateList();
|
|
|
|
private:
|
|
VersionContainer *versionContainer;
|
|
DataParser *dataParser;
|
|
PostProcessorSystem *postProcessorSystem;
|
|
Client *client;
|
|
|
|
PacketType packetType;
|
|
QString filePath;
|
|
qint64 fileSize;
|
|
qint64 sizeReceiveData;
|
|
QByteArray tmpBlock;
|
|
int countSend;
|
|
};
|
|
|
|
#endif // RECOGNIZESYSTEM_H
|