feat: update cifList for unity

This commit is contained in:
semenov
2026-01-29 17:12:15 +03:00
parent 24e41a0e59
commit f3bebaeb26
5 changed files with 27 additions and 7 deletions

View File

@@ -603,8 +603,5 @@ void ProcessParser::clientNotify(QXmlStreamReader &xmlReader,ClientHandler *clie
void ProcessParser::compareCFIObjects(QByteArray array,ClientHandler *clientHandler) void ProcessParser::compareCFIObjects(QByteArray array,ClientHandler *clientHandler)
{ {
QByteArray temp = array; processingSystem->processingCFIUpdate(array);
processingSystem->processingCFIUpdate(temp,clientHandler);
} }

View File

@@ -176,3 +176,17 @@ void CommonClientHandler::slot_DocsChanged()
} }
} }
void CommonClientHandler::sendXmlAnswer(QByteArray array)
{
foreach(int idSocket, clientsMap->keys())
{
ClientHandler *handler = clientsMap->value(idSocket);
TypeClientAutorization type = handler->getClient()->getTypeClient();
if(type == TypeClientAutorization::TYPE_UNITY_CLIENT)
{
handler->sendXmlAnswer(array,PacketType::TYPE_UPDATEDCFI);
}
}
}

View File

@@ -28,6 +28,8 @@ public:
void slot_DocsChanged(); void slot_DocsChanged();
void sendXmlAnswer(QByteArray array);
public slots: public slots:
void slot_sendPacketToAllClients(PacketType packetType, bool flOnlyGUI); void slot_sendPacketToAllClients(PacketType packetType, bool flOnlyGUI);

View File

@@ -228,9 +228,16 @@ void ProcessingSystem::processingClientDeAutorization(QString login)
} }
} }
void ProcessingSystem::processingCFIUpdate(QByteArray array, ClientHandler *handler) void ProcessingSystem::processingCFIUpdate(QByteArray array)
{ {
handler->sendXmlAnswer(array); cfiController->updateCfiXML(array);
cfiController->lockAccessToCfiXML();
cfiController->unLockAccessToCfiXML();
QByteArray result;
QString path = updateController->getPathAdditionalFile(cfiListFileName);
Tools::loadFileXMLtoByteArray(path,result);
commonClientServer->sendXmlAnswer(result);
} }
void ProcessingSystem::processingEntryUnityClient(ClientHandler *client) void ProcessingSystem::processingEntryUnityClient(ClientHandler *client)

View File

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