mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
68 lines
1.6 KiB
C++
68 lines
1.6 KiB
C++
#ifndef RECOGNIZESYSTEM_H
|
|
#define RECOGNIZESYSTEM_H
|
|
|
|
#include <QDataStream>
|
|
#include <QTcpSocket>
|
|
#include <QMutex>
|
|
|
|
#include <Systems/updatecontroller.h>
|
|
#include <Systems/tools.h>
|
|
#include <Systems/Parsers/dataparser.h>
|
|
|
|
#include <Data/Client.h>
|
|
#include <Data/PacketType.h>
|
|
|
|
#include "serverlmswidget.h"
|
|
|
|
class UpdateController;
|
|
class ServerLMSWidget;
|
|
class ClientHandler;
|
|
|
|
class RecognizeSystem : public QObject
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
RecognizeSystem(QObject *parent = nullptr);
|
|
void initialize(UpdateController *updateController,DataParser *dataParser,
|
|
ServerLMSWidget *server,SendSystem *sendSystem, ClientHandler *handler);
|
|
void recognize();
|
|
~RecognizeSystem();
|
|
|
|
signals:
|
|
void sigCalculateHash();
|
|
void sigSendToLogger(QString string);
|
|
void sigXmlParser(ClientHandler *clientHandler,QByteArray data);
|
|
void sigChangeVersion(QString versionName);
|
|
void sigDeleteVersion(QString versionName);
|
|
void sigCopyVersion(QString versionName,QString newVersionName);
|
|
|
|
private:
|
|
UpdateController *updateController;
|
|
SendSystem *sendSystem;
|
|
DataParser *dataParser;
|
|
ServerLMSWidget *server;
|
|
QString command;
|
|
PacketType packetType;
|
|
QString filePath;
|
|
ClientHandler *clientHandler;
|
|
QMutex *mutex;
|
|
|
|
QTcpSocket *socket;
|
|
|
|
QByteArray tmpBlock;
|
|
|
|
qint64 sizeReceiveData;
|
|
qint64 fileSize;
|
|
int countSend;
|
|
bool isPackageTypeInited;
|
|
|
|
void packetTypeInit(PacketType packet,Client *client);
|
|
void packetTypeInit(PacketType type);
|
|
QString createFullPath(QString path);
|
|
bool checkIsChangeable();
|
|
bool checkNonStaticData(QString path);
|
|
};
|
|
#endif // RECOGNIZESYSTEM_H
|