mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-29 20:05:38 +03:00
before task parser
This commit is contained in:
64
ServerLMS/ServerLMS/Systems/updatecontroller.h
Normal file
64
ServerLMS/ServerLMS/Systems/updatecontroller.h
Normal file
@@ -0,0 +1,64 @@
|
||||
#ifndef UPDATECONTROLLER_H
|
||||
#define UPDATECONTROLLER_H
|
||||
|
||||
|
||||
#include <QString>
|
||||
#include <QObject>
|
||||
#include <QCryptographicHash>
|
||||
#include <QDirIterator>
|
||||
#include <QDebug>
|
||||
#include <QDataStream>
|
||||
#include <QMutex>
|
||||
#include "Systems/dataparser.h"
|
||||
#include "typesDataServerClient.h"
|
||||
|
||||
class TCPServer;
|
||||
class SendSystem;
|
||||
class DataParser;
|
||||
class ClientHandler;
|
||||
|
||||
class UpdateController : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
explicit UpdateController(QObject *parent = 0);
|
||||
void initialize(TCPServer* server,DataParser *dataParser);
|
||||
void compareFiles(ClientHandler* handler, QByteArray array);
|
||||
void showHash();
|
||||
void calculateHash();
|
||||
QByteArray getLocalHash();
|
||||
|
||||
QList<FileData> getFileSendList() const;
|
||||
QList<FileData> getClientDataList() const;
|
||||
|
||||
~UpdateController();
|
||||
|
||||
signals:
|
||||
void sigLogMessage(QString message);
|
||||
|
||||
private:
|
||||
QList<FileData> clientDataList;
|
||||
QList<FileData> serverDataList;
|
||||
QList<FileData> folderDataList;
|
||||
|
||||
QList<FileData> fileSendList;
|
||||
QList<FileData> fileDeleteList;
|
||||
|
||||
QString sourcePath;
|
||||
TCPServer *server;
|
||||
DataParser *dataParser;
|
||||
quint64 sizeToSend;
|
||||
QMutex *mutex;
|
||||
|
||||
QString getCommands();
|
||||
bool checkNeedUpdate(ClientHandler* handler);
|
||||
void setLocalFileData(QList<FileData> dataList);
|
||||
void calculateSize();
|
||||
void saveHash();
|
||||
void loadHash();
|
||||
void CalculateSizeToSend(QList<FileData> diffList);
|
||||
};
|
||||
|
||||
#endif // UPDATECONTROLLER_H
|
||||
Reference in New Issue
Block a user