forked from irwir/eMule
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ClientStateDefs.h
156 lines (143 loc) · 3.5 KB
/
ClientStateDefs.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
//this file is part of eMule
//Copyright (C)2002-2008 Merkur ( strEmail.Format("%s@%s", "devteam", "emule-project.net") / http://www.emule-project.net )
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either
//version 2 of the License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#pragma once
enum EUploadState{
US_UPLOADING,
US_ONUPLOADQUEUE,
US_CONNECTING,
US_BANNED,
US_NONE
};
enum EDownloadState{
DS_DOWNLOADING,
DS_ONQUEUE,
DS_CONNECTED,
DS_CONNECTING,
DS_WAITCALLBACK,
DS_WAITCALLBACKKAD,
DS_REQHASHSET,
DS_NONEEDEDPARTS,
DS_TOOMANYCONNS,
DS_TOOMANYCONNSKAD,
DS_LOWTOLOWIP,
DS_BANNED,
DS_ERROR,
DS_NONE,
DS_REMOTEQUEUEFULL // not used yet, except in statistics
};
enum EPeerCacheDownState{
PCDS_NONE = 0,
PCDS_WAIT_CLIENT_REPLY,
PCDS_WAIT_CACHE_REPLY,
PCDS_DOWNLOADING
};
enum EPeerCacheUpState{
PCUS_NONE = 0,
PCUS_WAIT_CACHE_REPLY,
PCUS_UPLOADING
};
enum EChatState{
MS_NONE,
MS_CHATTING,
MS_CONNECTING,
MS_UNABLETOCONNECT
};
enum EKadState{
KS_NONE,
KS_QUEUED_FWCHECK,
KS_CONNECTING_FWCHECK,
KS_CONNECTED_FWCHECK,
KS_QUEUED_BUDDY,
KS_INCOMING_BUDDY,
KS_CONNECTING_BUDDY,
KS_CONNECTED_BUDDY,
KS_QUEUED_FWCHECK_UDP,
KS_FWCHECK_UDP,
KS_CONNECTING_FWCHECK_UDP
};
enum EClientSoftware{
SO_EMULE = 0, // default
SO_CDONKEY = 1, // ET_COMPATIBLECLIENT
SO_XMULE = 2, // ET_COMPATIBLECLIENT
SO_AMULE = 3, // ET_COMPATIBLECLIENT
SO_SHAREAZA = 4, // ET_COMPATIBLECLIENT
SO_MLDONKEY = 10, // ET_COMPATIBLECLIENT
SO_LPHANT = 20, // ET_COMPATIBLECLIENT
// other client types which are not identified with ET_COMPATIBLECLIENT
SO_EDONKEYHYBRID = 50,
SO_EDONKEY,
SO_OLDEMULE,
SO_URL,
SO_UNKNOWN
};
enum ESecureIdentState{
IS_UNAVAILABLE = 0,
IS_ALLREQUESTSSEND = 0,
IS_SIGNATURENEEDED = 1,
IS_KEYANDSIGNEEDED = 2,
};
enum EInfoPacketState{
IP_NONE = 0,
IP_EDONKEYPROTPACK = 1,
IP_EMULEPROTPACK = 2,
IP_BOTH = 3,
};
enum ESourceFrom{
SF_SERVER = 0,
SF_KADEMLIA = 1,
SF_SOURCE_EXCHANGE = 2,
SF_PASSIVE = 3,
SF_LINK = 4
};
enum EChatCaptchaState{
CA_NONE = 0,
CA_CHALLENGESENT,
CA_CAPTCHASOLVED,
CA_ACCEPTING,
CA_CAPTCHARECV,
CA_SOLUTIONSENT
};
enum EConnectingState{
CCS_NONE = 0,
CCS_DIRECTTCP,
CCS_DIRECTCALLBACK,
CCS_KADCALLBACK,
CCS_SERVERCALLBACK,
CCS_PRECONDITIONS
};
#ifdef _DEBUG
// use the 'Enums' only for debug builds, each enum costs 4 bytes (3 unused)
#define _EClientSoftware EClientSoftware
#define _EChatState EChatState
#define _EKadState EKadState
#define _ESecureIdentState ESecureIdentState
#define _EUploadState EUploadState
#define _EDownloadState EDownloadState
#define _ESourceFrom ESourceFrom
#define _EChatCaptchaState EChatCaptchaState
#define _EConnectingState EConnectingState
#else
#define _EClientSoftware uint8
#define _EChatState uint8
#define _EKadState uint8
#define _ESecureIdentState uint8
#define _EUploadState uint8
#define _EDownloadState uint8
#define _ESourceFrom uint8
#define _EChatCaptchaState uint8
#define _EConnectingState uint8
#endif