mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
59 lines
2.4 KiB
C++
59 lines
2.4 KiB
C++
#ifndef TOOLS_H
|
|
#define TOOLS_H
|
|
|
|
#include "logger.h"
|
|
|
|
#include <QString>
|
|
#include <QDebug>
|
|
#include <QTime>
|
|
#include <QDir>
|
|
|
|
#include <Data/StreamingVersionData.h>
|
|
|
|
#define TCP_READ_TIMEOUT 5000
|
|
|
|
static const QString staticDataFolderName = "StaticData";
|
|
static const QString applicationFolderName = "Application";
|
|
static const QString sharedDataFolderName = "SharedData";
|
|
static const QString streamingAssetsFolderName = "StreamingAssets";
|
|
static const QString tempFile = staticDataFolderName + "/save.xml";
|
|
static const QString version = staticDataFolderName + "/version.xml";
|
|
static const QString versionListFile = staticDataFolderName + "/versionList.xml";
|
|
static const QString hashFileName = staticDataFolderName + "/serverHash.xml";
|
|
static const QString buildHashName = staticDataFolderName + "/buildHash.xml";
|
|
static const QString buildDataPath = "/Application/RRJLoader/RRJ_Data/";
|
|
static const QString clientHash = staticDataFolderName + "/clientHash.xml";
|
|
|
|
static const QString baseNameVersion = "base";//может вынести комманды куда нибудь?
|
|
|
|
static const QString commandTryBaseDelete = "BASEDELETETRY";
|
|
static const QString commandTryBaseChange = "TRYBASECHANGE";
|
|
static const QString commandTryActiveDelete = "TRYACTIVEDELETE";
|
|
static const QString commandTryCopyWithSameNames = "SAMENAMES";
|
|
static const QString commandGetServerDataList = "GETSERVERDATALIST";
|
|
static const QString commandCheckVersionList = "CHECKVERSIONLIST";
|
|
static const QString commandReadyClient = "READY";
|
|
static const QString commandDisableClient = "DISABLE";
|
|
static const QString commandDuplicateVerName = "DUPLICATEVERNAME";
|
|
static const QString commandHashCompleteClient = "HASHSENDCOMPLETE";
|
|
static const QString commandCanChangeVersion = "CANCHANGE";
|
|
static const QString commandChangable = "CHANGEABLE";
|
|
static const QString commandUnchangable = "UNCHANGEABLE";
|
|
static const QString commandUpdateFilesClient = "update";
|
|
|
|
class Tools {
|
|
public:
|
|
static void printTime();
|
|
static QString getTime();
|
|
static QString createLocalPath(QString path);
|
|
static QString createRootPath(QString path);
|
|
static QString createUpdateFilePath(QString path);
|
|
static QString createFolderPath(QString path);
|
|
static QString createSharedPath(QString path);
|
|
static QString createRealPath(QString path,StreamingVersionData* currentVersionData);
|
|
static QString createStreamingToRealPath(QString path, StreamingVersionData *streamingVersionData);
|
|
};
|
|
|
|
|
|
#endif // TOOLS_H
|