feat: add CFI Update

This commit is contained in:
semenov
2026-01-27 12:04:46 +03:00
parent f7c677f498
commit c7f2afe3c2
9 changed files with 31 additions and 5 deletions

View File

@@ -82,6 +82,10 @@ void ProcessParser::slot_read(ClientHandler *client, QByteArray array)
clientBlockAuth(xmlReader,client);
}
else if(xmlReader.name() == "CFIObjects")
{
compareCFIObjects(array,client);
}
else
{
emit sigLogMessage("XmlParser: unrecognized tag");
@@ -597,4 +601,10 @@ void ProcessParser::clientNotify(QXmlStreamReader &xmlReader,ClientHandler *clie
processingSystem->processingClientNotify(client, clientNotify);
}
void ProcessParser::compareCFIObjects(QByteArray array,ClientHandler *clientHandler)
{
QByteArray temp = array;
processingSystem->processingCFIUpdate(temp,clientHandler);
}

View File

@@ -13,6 +13,7 @@ public:
explicit ProcessParser(QObject *parent = nullptr);
void initialize(ProcessingSystem *processingSystem);
void compareCFIObjects(QByteArray array,ClientHandler *clientHandler);
public slots:
void slot_read(ClientHandler *client, QByteArray array);

View File

@@ -226,6 +226,11 @@ void ProcessingSystem::processingClientDeAutorization(QString login)
}
}
void ProcessingSystem::processingCFIUpdate(QByteArray array, ClientHandler *handler)
{
handler->sendXmlAnswer(array);
}
void ProcessingSystem::processingEntryUnityClient(ClientHandler *client)
{
QString login = client->getClient()->getLogin();

View File

@@ -57,6 +57,8 @@ public:
ClientHandler* getUnityClientById(int id);
void processingClientDeAutorization(QString login);
void processingCFIUpdate(QByteArray array,ClientHandler *handler);
void processingEntryUnityClient(ClientHandler *client);
void processingExitUnityClient(ClientHandler *client);
signals:

View File

@@ -510,6 +510,11 @@ void RecognizeSystem::recognize()
packetType = PacketType::TYPE_NONE;
client->setClientHash(hash);
}
if(packetType == PacketType::TYPE_CFIUPDATE)
{
qDebug() << "CFI HELLO";
}
packetType = PacketType::TYPE_NONE;
}

View File

@@ -125,7 +125,7 @@ void SendSystem::sendFileBlockByteArray(QByteArray array, PacketType packetType)
while (size > 0)
{
QByteArray chunk = array.mid(bytesSended,sendFileBlockSize);
quint64 bytesSended = socket->write(chunk);
bytesSended = socket->write(chunk);
size -= bytesSended;
}