mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
rename0
This commit is contained in:
155
Server/Data/typesDataServerClient.h
Normal file
155
Server/Data/typesDataServerClient.h
Normal file
@@ -0,0 +1,155 @@
|
||||
#ifndef TYPESDATASERVERCLIENT_H
|
||||
#define TYPESDATASERVERCLIENT_H
|
||||
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include "typeQueryToDB.h"
|
||||
|
||||
#define NOTIFY_ERROR_AUTH_DB "ERROR_AUTH_DB"
|
||||
#define NOTIFY_ERROR_AUTH_LOGINORPASSWORD "ERROR_AUTH_LOGINORPASSWORD"
|
||||
#define NOTIFY_ERROR_AUTH_ARCHIVED "ERROR_AUTH_ARCHIVED"
|
||||
#define NOTIFY_ERROR_AUTH_ALREADYLOGIN "ERROR_AUTH_ALREADYLOGIN"
|
||||
#define NOTIFY_SERVER_END "END"
|
||||
#define NOTIFY_SERVER_BLOCKED "BLOCKED"
|
||||
#define SERVER_HELLO "NewConnection. I am server LMS!"
|
||||
|
||||
enum EStateServer{started, stoped};
|
||||
enum EStateBlockAutorization{blocked, unblocked};
|
||||
|
||||
struct FileData
|
||||
{
|
||||
QString path;
|
||||
QString hash;
|
||||
|
||||
bool operator==(const FileData& other)const
|
||||
{
|
||||
if (this->path== other.path && this->hash == other.hash) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool operator<(const FileData& data2) const
|
||||
{
|
||||
return this->hash == "FOLDER" && data2.hash !="FOLDER";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
struct SAttribute
|
||||
{
|
||||
QString name;
|
||||
QString value;
|
||||
|
||||
};
|
||||
|
||||
struct SXmlAnswerTag
|
||||
{
|
||||
QString elementName;
|
||||
QList<SAttribute> attr;
|
||||
};
|
||||
|
||||
enum TypeClientAutorization{
|
||||
TYPE_QT_CLIENT = 0,
|
||||
TYPE_UNITY_CLIENT = 1,
|
||||
TYPE_GUI = 10
|
||||
};
|
||||
|
||||
enum UserType
|
||||
{
|
||||
INSTRUCTOR,
|
||||
TRAINEE,
|
||||
|
||||
NONE = 100
|
||||
};
|
||||
|
||||
class ClientAutorization
|
||||
{
|
||||
public:
|
||||
QString Login;
|
||||
QString Password;
|
||||
int NumberOfScreen;
|
||||
TypeClientAutorization TypeClient;
|
||||
};
|
||||
class ClientDeAutorization
|
||||
{
|
||||
public:
|
||||
QString Login;
|
||||
};
|
||||
/*
|
||||
enum TypeQueryToDB{
|
||||
TYPE_QUERY_GET_ALL_LISTS,
|
||||
TYPE_QUERY_NEW_INSTRUCTOR,
|
||||
TYPE_QUERY_DEL_INSTRUCTOR,
|
||||
TYPE_QUERY_EDIT_INSTRUCTOR,
|
||||
TYPE_QUERY_NEW_GROUP,
|
||||
TYPE_QUERY_DEL_GROUP,
|
||||
TYPE_QUERY_EDIT_GROUP,
|
||||
TYPE_QUERY_NEW_TRAINEE,
|
||||
TYPE_QUERY_DEL_TRAINEE,
|
||||
TYPE_QUERY_EDIT_TRAINEE,
|
||||
TYPE_QUERY_ASSIGN_TASK_AMM_TO_TRAINEE,
|
||||
TYPE_QUERY_ASSIGN_TASK_FIM_TO_TRAINEE
|
||||
};
|
||||
*/
|
||||
|
||||
class ClientQueryToDB{
|
||||
public:
|
||||
TypeQueryToDB typeQuery;
|
||||
};
|
||||
|
||||
class ClientQueryTasksXML
|
||||
{
|
||||
public:
|
||||
QString Type;
|
||||
};
|
||||
|
||||
class ServerMessage
|
||||
{
|
||||
public:
|
||||
QString Text;
|
||||
};
|
||||
|
||||
class ClientMessage
|
||||
{
|
||||
public:
|
||||
QString From;//формат"id-type"
|
||||
QString To;//формат"id-type"
|
||||
QString Text;
|
||||
|
||||
//id-0 инструктор
|
||||
//id-1 обучаемый
|
||||
|
||||
ClientMessage(){}
|
||||
ClientMessage(QString from,QString to,QString text)
|
||||
{
|
||||
From = from;
|
||||
To = to;
|
||||
Text = text;
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
class ServerTask
|
||||
{
|
||||
public:
|
||||
QString Text;
|
||||
};
|
||||
|
||||
class ServerNotify
|
||||
{
|
||||
public:
|
||||
QString Code;
|
||||
};
|
||||
|
||||
class ClientNotify
|
||||
{
|
||||
public:
|
||||
QString Code;
|
||||
};
|
||||
|
||||
class DataInfo{
|
||||
public:
|
||||
QString path;
|
||||
quint64 size;
|
||||
};
|
||||
|
||||
#endif // TYPESDATASERVERCLIENT_H
|
||||
Reference in New Issue
Block a user