mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
ref: draft
This commit is contained in:
89
Core/postprocessorsystem.cpp
Normal file
89
Core/postprocessorsystem.cpp
Normal file
@@ -0,0 +1,89 @@
|
||||
#include "postprocessorsystem.h"
|
||||
|
||||
PostProcessorSystem::PostProcessorSystem() {}
|
||||
|
||||
void PostProcessorSystem::initialize(DataParserOutput *dataParserOutput,
|
||||
HashComparer *hashComparer,
|
||||
VersionContainer* versionContainer,
|
||||
UpdateController* updateController)
|
||||
{
|
||||
this->hashComparer = hashComparer;
|
||||
this->versionContainer = versionContainer;
|
||||
this->updateController = updateController;
|
||||
this->dataParserOutput = dataParserOutput;
|
||||
|
||||
}
|
||||
|
||||
void PostProcessorSystem::socketDisable()
|
||||
{
|
||||
emit sigSocketDisabled();
|
||||
}
|
||||
|
||||
void PostProcessorSystem::serverBlocked()
|
||||
{
|
||||
emit sigServerBlocked();
|
||||
}
|
||||
|
||||
void PostProcessorSystem::startCompare()
|
||||
{
|
||||
QList<FileData> *serverStreamingHash = new QList<FileData>;
|
||||
QList<FileData> *localStreamingHash = new QList<FileData>;
|
||||
|
||||
QFile file(serverHash);
|
||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
|
||||
serverStreamingHash = dataParserOutput->xmlFileDataParse(file.readAll(),"StreamingAssets");
|
||||
file.close();
|
||||
|
||||
QFile file2(streamingHashFilename);
|
||||
file2.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
|
||||
localStreamingHash = dataParserOutput->xmlFileDataParse(file2.readAll(),"StreamingAssets");
|
||||
file2.close();
|
||||
|
||||
emit sigStartCompare(serverStreamingHash,*localStreamingHash);
|
||||
}
|
||||
|
||||
void PostProcessorSystem::showUpdateList()
|
||||
{
|
||||
emit sigShowUpdateList();
|
||||
}
|
||||
|
||||
void PostProcessorSystem::compareFiles()
|
||||
{
|
||||
//emit sigCompareFiles()
|
||||
}
|
||||
|
||||
void PostProcessorSystem::checkAccessType(QString type)
|
||||
{
|
||||
if(type == "instructor")
|
||||
{
|
||||
emit sigCallUpdateList();
|
||||
}
|
||||
}
|
||||
|
||||
void PostProcessorSystem::saveLoginData(ServerAuthorization *auth)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void PostProcessorSystem::setServerVersion(StreamingVersionData *serverVersion)
|
||||
{
|
||||
versionContainer->setServerVersionData(serverVersion);
|
||||
}
|
||||
|
||||
void PostProcessorSystem::showServerDataList(QList<StreamingVersionData *> *versionList)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void PostProcessorSystem::calculateCommonHash()
|
||||
{
|
||||
updateController->calculateCommonHash();
|
||||
}
|
||||
|
||||
void UpdateController::checkCanUpdate()
|
||||
{
|
||||
QByteArray checkUpdate = dataParserOut->xmlAnswer_notify("CANCHANGE");
|
||||
sendSystem->sendXMLAnswer(checkUpdate);
|
||||
}
|
||||
Reference in New Issue
Block a user