mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
54 lines
1.3 KiB
C++
54 lines
1.3 KiB
C++
#ifndef TOOLS_H
|
|
#define TOOLS_H
|
|
|
|
#include "logger.h"
|
|
|
|
#include <QString>
|
|
#include <QDebug>
|
|
#include <QTime>
|
|
#include <QDir>
|
|
|
|
#define TCP_READ_TIMEOUT 5000
|
|
|
|
static QString staticDataFolderName = "StaticData";
|
|
static QString applicationFolderName = "Application";
|
|
static QString streamingAssetsFolderName = "StreamingAssets";
|
|
static QString tempFile = staticDataFolderName + "/save.xml";
|
|
static QString hashFileName = staticDataFolderName + "/serverHash.xml";
|
|
static QString scenarioRootPath = "\\Application\\RRJLoader\\RRJ_Data";
|
|
|
|
enum PacketType
|
|
{
|
|
TYPE_NONE = 0,
|
|
TYPE_UNITY = 1,
|
|
TYPE_FILE = 2,
|
|
TYPE_COMMAND =3,
|
|
TYPE_FOLDER = 4,
|
|
TYPE_DELETE = 5,
|
|
TYPE_FINISH = 6,
|
|
TYPE_NEEDUPDATE = 7,
|
|
TYPE_XMLANSWER = 8,
|
|
TYPE_QT = 9,
|
|
TYPE_DISABLE = 11,
|
|
TYPE_FILESIZE = 20,
|
|
|
|
TYPE_GET_LIST_INSTRUCTORS = 100,
|
|
TYPE_XMLANSWER_ON_QUERY_TO_DB = 101 //xml-ответ на запрос к БД
|
|
};
|
|
|
|
Q_DECLARE_METATYPE(PacketType)
|
|
|
|
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 createRootScenario(QString path);
|
|
};
|
|
|
|
|
|
#endif // TOOLS_H
|