sendFileBlock_V3

This commit is contained in:
2026-02-18 17:20:20 +03:00
parent ed7de8af4e
commit 594aa8311e
9 changed files with 342 additions and 72 deletions

View File

@@ -19,11 +19,15 @@ class SendSystem : public QObject
Q_OBJECT
public:
explicit SendSystem(QObject* parent = nullptr);
~SendSystem();
void initialize(DataParser* dataParser,QMutex *globalMutex);
void setClient(Client* client,QTcpSocket *socket);
void sendMessageBlock(QString message);
void sendFileBlock(QString path);
void sendFileBlock_V2(QString path);
void sendFileBlock_V3(QString path);
void sendFileBlockByteArray(QByteArray array, PacketType packetType);
void sendFileBlockWithRename(QString path,QString newName);
void sendFolderBlock(QString path);
@@ -34,18 +38,21 @@ public:
void sendDocs(QString docPath);
void sendXmlAnswer(QByteArray array, PacketType packetType = PacketType::TYPE_XMLANSWER);
void sendNeedUpdate(bool flag,quint64 size,quint64 fileCount,quint64 deleteCount);
void updateFiles(QList<FileData> fileSendList, QList<FileData> deleteList);
bool getIsSendStopped() const;
~SendSystem();
void updateFilesFULL(QList<FileData> fileSendList, QList<FileData> deleteList);
bool waitWrittenData(QString marker, int msec = 500);
public slots:
void socketClose();
void sendVersion();
void slot_BytesWrittenToSocket(qint64 bytes);
signals:
void sigLoadHash();
//QByteArray sigSendXMLmessage(QString loginFrom, QString loginTo, QString text, QString userType); //сигнал не используется
@@ -56,12 +63,19 @@ private:
Client *client;
QTcpSocket* socket;
DataParser* dataParser;
quint64 fileSize;
QMutex *mutex;
QMutex *globalMutex;
QWaitCondition *waitCondition;
int countSend;
bool isSendStopped;
char* buffer;
TypeClientAutorization type;
bool isSendStopped;
bool flWaitWriten;
quint64 fileSize;
int countSend;
};
#endif // SENDSYSTEM_H