mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Переделано под один мега-проект LMS с общим CMakeLists.txt
This commit is contained in:
58
InstructorsAndTrainees/connectorToServer/Core/tools.h
Normal file
58
InstructorsAndTrainees/connectorToServer/Core/tools.h
Normal file
@@ -0,0 +1,58 @@
|
||||
#ifndef GLOBAL_H
|
||||
#define GLOBAL_H
|
||||
|
||||
#include <QString>
|
||||
#include <QTime>
|
||||
#include <QDebug>
|
||||
|
||||
#define TCP_READ_TIMEOUT 2000
|
||||
|
||||
static QString applicationEXEName = "RRJ.exe";
|
||||
static QString applicationFolderName = "/Application";
|
||||
static QString staticDataFolderName = "StaticData";
|
||||
static QString streamingAssetsPath = "/Application/RRJLoader/RRJ_Data/StreamingAssets";
|
||||
static QString hashFilename = staticDataFolderName + "/clientHash.xml";
|
||||
static QString settingsName = staticDataFolderName + "/settings.xml";
|
||||
static QString tempName = staticDataFolderName + "/temp.xml";
|
||||
static QString authTempName = staticDataFolderName + "/authData.xml";
|
||||
static QString displayTemp = staticDataFolderName + "/displayData.xml";
|
||||
static QString streamingHashFilename = staticDataFolderName + "/streamingHash.xml";
|
||||
static QString serverHash = staticDataFolderName + "/serverHash.xml";
|
||||
|
||||
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_XMLANSWER_MESSAGE_FOR_GUI = 90,
|
||||
|
||||
//xml-ответы на запросы к БД
|
||||
TYPE_XMLANSWER_QUERY_DB__LIST_INSTRUCTORS = 100,
|
||||
TYPE_XMLANSWER_QUERY_DB__LIST_GROUPS = 101,
|
||||
TYPE_XMLANSWER_QUERY_DB__LIST_TRAINEES = 102,
|
||||
TYPE_XMLANSWER_QUERY_DB__LIST_COMPUTERS = 103,
|
||||
TYPE_XMLANSWER_QUERY_DB__LIST_CLASSROOMS = 104,
|
||||
TYPE_XMLANSWER_QUERY_DB__LIST_TASKS = 105
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(PacketType)
|
||||
|
||||
class Tools {
|
||||
public:
|
||||
|
||||
static void printTime();
|
||||
static QString getTime();
|
||||
static QString createLocalPath(QString path);
|
||||
static QString createFullPath(QString path);
|
||||
static QString convertFileSize(quint64 fileSize);
|
||||
};
|
||||
|
||||
#endif // GLOBAL_H
|
||||
Reference in New Issue
Block a user