-
Notifications
You must be signed in to change notification settings - Fork 2
/
constants.h
71 lines (61 loc) · 1.4 KB
/
constants.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef CONSTANTS_H
#define CONSTANTS_H
#include <QApplication>
enum {
// 离线原因
OFF_UNKNOWN,
OFF_USER_LOGOUT,
OFF_CHALLENGE_FAILED,
OFF_CHECK_MAC,
OFF_SERVER_BUSY,
OFF_WRONG_PASS,
OFF_NOT_ENOUGH,
OFF_FREEZE_UP,
OFF_NOT_ON_THIS_IP,
OFF_NOT_ON_THIS_MAC,
OFF_TOO_MUCH_IP,
OFF_UPDATE_CLIENT,
OFF_NOT_ON_THIS_IP_MAC,
OFF_MUST_USE_DHCP,
OFF_TIMEOUT,
// 初始化失败的原因
OFF_WSA_STARTUP,
OFF_CREATE_SOCKET,
OFF_BIND_FAILED,
OFF_SET_SOCKET_TIMEOUT,
OFF_SET_SOCKET_REUSE,
// challenge 成功 获取到服务器返回的ip地址
OBTAIN_IP_ADDRESS,
// 当前状态
STATE_OFFLINE,
STATE_LOGGING,
STATE_ONLINE
};
enum {
LOGIN_CHECK_MAC = 0x01,
LOGIN_SERVER_BUSY = 0x02,
LOGIN_WRONG_PASS = 0x03,
LOGIN_NOT_ENOUGH = 0x04,
LOGIN_FREEZE_UP = 0x05,
LOGIN_NOT_ON_THIS_IP = 0x07,
LOGIN_NOT_ON_THIS_MAC = 0x0B,
LOGIN_TOO_MUCH_IP = 0x14,
LOGIN_UPDATE_CLIENT = 0x15,
LOGIN_NOT_ON_THIS_IP_MAC = 0x16,
LOGIN_MUST_USE_DHCP = 0x17
};
const int PORT_BIND = 61440;
const int PORT_DEST = 61440;
const QString SERVER_IP = "10.100.61.3";
const QString SETTINGS_FILE_NAME = "DrCOM_JLU_Qt.ini";
const QString
ID_ACCOUNT = "account",
ID_PASSWORD = "password",
ID_MAC = "mac",
ID_REMEMBER = "remember",
ID_AUTO_LOGIN = "autoLogin",
ID_HIDE_WINDOW = "showWindow",
ID_NOT_SHOW_WELCOME = "showWelcome";
const QString ID_RESTART_TIMES = "restartTimes";
const int RETRY_TIMES = 3;
#endif // CONSTANTS_H