mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
feat: cfi package update
This commit is contained in:
@@ -249,7 +249,7 @@ void CommonClientHandler::slot_DocsChanged()
|
||||
}
|
||||
}
|
||||
|
||||
void CommonClientHandler::sendXmlAnswer(QByteArray array)
|
||||
void CommonClientHandler::sendUpdatedCFI(QByteArray array)
|
||||
{
|
||||
foreach(int idSocket, clientsMap->keys())
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
|
||||
void slot_DocsChanged();
|
||||
|
||||
void sendXmlAnswer(QByteArray array);
|
||||
void sendUpdatedCFI(QByteArray array);
|
||||
|
||||
public slots:
|
||||
void slot_sendPacketToAllClients(PacketType packetType, bool flOnlyGUI);
|
||||
|
||||
@@ -266,7 +266,7 @@ void ProcessingSystem::processingCFIUpdate(QByteArray array)
|
||||
|
||||
cfiController->unLockAccessToCfiXML();
|
||||
|
||||
commonClientServer->sendXmlAnswer(result);
|
||||
commonClientServer->sendUpdatedCFI(result);
|
||||
}
|
||||
|
||||
void ProcessingSystem::processingEntryUnityClient(ClientHandler *client)
|
||||
@@ -735,6 +735,13 @@ void ProcessingSystem::processingClientNotify(ClientHandler *client, ClientNotif
|
||||
{
|
||||
chatSystem->sendOldMessages(clientData->getId());
|
||||
}
|
||||
else if (clientNotify.Code == commandGetCFI)
|
||||
{
|
||||
QByteArray result;
|
||||
QString path = updateController->getPathAdditionalFile(cfiListFileName);
|
||||
Tools::loadFileXMLtoByteArray(path,result);
|
||||
client->sendXmlAnswer(result,PacketType::TYPE_UPDATEDCFI);
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessingSystem::setCurrentDataInfo(DataInfo *dataInfo)
|
||||
|
||||
@@ -29,7 +29,7 @@ void RecognizeSystem::initialize(UpdateController *updateController,DataParser*
|
||||
connect(this,&RecognizeSystem::sigCopyVersion,updateController,&UpdateController::createCopyVersion,Qt::AutoConnection);
|
||||
connect(this,&RecognizeSystem::sigXmlParser,dataParser->getProcessParser(),&ProcessParser::slot_read,Qt::AutoConnection);
|
||||
//connect(this,&RecognizeSystem::sigRecalculateDocs,server,&ServerLMSWidget::slot_UpdateDocs,Qt::AutoConnection);
|
||||
connect(this,&RecognizeSystem::sigSendDocs,sendSystem,&SendSystem::sendDocs,Qt::AutoConnection);
|
||||
connect(this,&RecognizeSystem::sigSendDocs,sendSystem,&SendSystem::sendDocs,Qt::AutoConnection);
|
||||
}
|
||||
|
||||
void RecognizeSystem::recognize()
|
||||
@@ -509,11 +509,6 @@ void RecognizeSystem::recognize()
|
||||
packetType = PacketType::TYPE_NONE;
|
||||
client->setClientHash(hash);
|
||||
}
|
||||
|
||||
if(packetType == PacketType::TYPE_CFIUPDATE)
|
||||
{
|
||||
qDebug() << "CFI HELLO";
|
||||
}
|
||||
packetType = PacketType::TYPE_NONE;
|
||||
}
|
||||
|
||||
|
||||
@@ -323,6 +323,11 @@ void SendSystem::sendStop()
|
||||
isSendStopped = true;
|
||||
}
|
||||
|
||||
void SendSystem::sendCFI(QByteArray array)
|
||||
{
|
||||
sendXmlAnswer(array,PacketType::TYPE_UPDATEDCFI);
|
||||
}
|
||||
|
||||
void SendSystem::sendDocs(QString docsPath)
|
||||
{
|
||||
sendFileBlock(docsPath);
|
||||
|
||||
@@ -31,6 +31,7 @@ public:
|
||||
void sendPacketType(PacketType packet);
|
||||
void sendNotify(QString notify);
|
||||
void sendStop();
|
||||
void sendCFI(QByteArray array);
|
||||
void sendDocs(QString docPath);
|
||||
void sendXmlAnswer(QByteArray array, PacketType packetType = PacketType::TYPE_XMLANSWER);
|
||||
void sendNeedUpdate(bool flag,quint64 size,quint64 fileCount,quint64 deleteCount);
|
||||
|
||||
@@ -55,6 +55,7 @@ static const QString commandUnchangable = "UNCHANGEABLE";
|
||||
static const QString commandUpdateFilesClient = "update";
|
||||
static const QString commandGetTasks = "GETTASKS";
|
||||
static const QString commandeGetOfflineMessages = "GETOFFLINEMESSAGE";
|
||||
static const QString commandGetCFI = "GETCFI";
|
||||
|
||||
//static quint64 fileBlockSize = 1460;
|
||||
static quint64 sendFileBlockSize = 256000;
|
||||
|
||||
@@ -280,6 +280,7 @@ bool UpdateController::checkNeedUpdate(ClientHandler *handler)
|
||||
{
|
||||
if(item.path.contains("Temp")) continue;
|
||||
if(item.path.contains("docs.xml")) continue;
|
||||
if(item.path.contains("CfiList.xml")) continue;
|
||||
|
||||
if (!serverDataList.contains(item))
|
||||
{
|
||||
@@ -291,6 +292,7 @@ bool UpdateController::checkNeedUpdate(ClientHandler *handler)
|
||||
{
|
||||
if(item.path.contains("Temp")) continue;
|
||||
if(item.path.contains("docs.xml")) continue;
|
||||
if(item.path.contains("CfiList.xml")) continue;
|
||||
|
||||
if (!clientDataList.contains(item))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user