Improve speed of category tab title updates
[amule.git] / src / Constants.h
blobe1719d26dd365337ff159aa39f8980ea07fbaa2d
1 //
2 // This file is part of the aMule Project.
3 //
4 // Copyright (c) 2006-2008 aMule Team ( admin@amule.org / http://www.amule.org )
5 //
6 // Any parts of this program derived from the xMule, lMule or eMule project,
7 // or contributed by third-party developers are copyrighted by their
8 // respective authors.
9 //
10 // This program is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU General Public License as published by
12 // the Free Software Foundation; either version 2 of the License, or
13 // (at your option) any later version.
15 // This program is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with this program; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 #ifndef CONSTANTS_H
26 #define CONSTANTS_H
28 //! This enum lists the views currently supported by the CClientListCtrl class.
29 enum ViewType
31 //! The "neutral" state, where nothing is displayed.
32 vtNone = 0,
34 //! Clients which are received files are displayed.
35 vtUploading = 1,
37 //! Clients which are queued for files are displayed.
38 vtQueued = 2,
40 //! All clients are displayed.
41 vtClients = 3
45 // lfroen : custom events for core internal messages
46 // 'cause - there's no wxCommand etc in wxBase
47 enum Core_Event_ID
49 HTTP_DOWNLOAD_FINISHED = 1,
51 SOURCE_DNS_DONE,
52 UDP_DNS_DONE,
53 SERVER_DNS_DONE
57 //! These IDs are used when a download is initiated via the HTTPThread.
58 enum HTTP_Download_File
60 //! The download is a ipfilter.dat file (possibly compressed).
61 HTTP_IPFilter = 1,
62 //! The download is a server.met file (possibly compressed).
63 HTTP_ServerMet,
64 // Auto-updating server.met has a different callback.
65 HTTP_ServerMetAuto,
66 //! The download is the version check file.
67 HTTP_VersionCheck,
68 //! The download is a notes.dat file (possibly compressed).
69 HTTP_NodesDat,
70 //! The download is a GeoIP database file (possibly compressed).
71 HTTP_GeoIP
74 //! Source types for source showing list.
75 enum SourceItemType
77 //! A source which is currently queued for another file.
78 A4AF_SOURCE,
79 //! A source which has not yet been contacted.
80 UNAVAILABLE_SOURCE,
81 //! A source which is currently queued for this file.
82 AVAILABLE_SOURCE
85 //! Types of stat graphs
86 enum StatsGraphType {
87 GRAPH_INVALID = 0,
88 GRAPH_DOWN,
89 GRAPH_UP,
90 GRAPH_CONN,
91 GRAPH_KAD
94 // KnownFile constants
96 #define PS_READY 0
97 #define PS_EMPTY 1
98 #define PS_WAITINGFORHASH 2
99 #define PS_HASHING 3
100 #define PS_ERROR 4
101 #define PS_INSUFFICIENT 5
102 #define PS_UNKNOWN 6
103 #define PS_PAUSED 7
104 #define PS_COMPLETING 8
105 #define PS_COMPLETE 9
106 #define PS_ALLOCATING 10
109 #define PR_VERYLOW 4 // I Had to change this because
110 // it didn't save negative number
111 // correctly.. Had to modify the
112 // sort function for this change..
113 #define PR_LOW 0 //*
114 #define PR_NORMAL 1 // Don't change this - needed for
115 // edonkey clients and server!
116 #define PR_HIGH 2 //*
117 #define PR_VERYHIGH 3
118 #define PR_AUTO 5
119 #define PR_POWERSHARE 6 //added for powershare (deltaHF)
122 // CUpDownClient constants
124 enum ESourceFrom {
125 SF_NONE,
126 SF_LOCAL_SERVER,
127 SF_REMOTE_SERVER,
128 SF_KADEMLIA,
129 SF_SOURCE_EXCHANGE,
130 SF_PASSIVE,
131 SF_LINK,
132 SF_SOURCE_SEEDS,
133 SF_SEARCH_RESULT
136 // downloadstate
137 enum EDownloadState {
138 DS_DOWNLOADING = 0,
139 DS_ONQUEUE,
140 DS_CONNECTED,
141 DS_CONNECTING,
142 DS_WAITCALLBACK,
143 DS_WAITCALLBACKKAD,
144 DS_REQHASHSET,
145 DS_NONEEDEDPARTS,
146 DS_TOOMANYCONNS,
147 DS_TOOMANYCONNSKAD,
148 DS_LOWTOLOWIP,
149 DS_BANNED,
150 DS_ERROR,
151 DS_NONE,
152 DS_REMOTEQUEUEFULL // not used yet, except in statistics
155 // uploadstate
156 enum EUploadState {
157 US_UPLOADING = 0,
158 US_ONUPLOADQUEUE,
159 US_WAITCALLBACK,
160 US_CONNECTING,
161 US_PENDING,
162 US_LOWTOLOWIP,
163 US_BANNED,
164 US_ERROR,
165 US_NONE
168 // Obfuscation status
169 enum EObfuscationState {
170 OBST_UNDEFINED = 0,
171 OBST_ENABLED,
172 OBST_SUPPORTED,
173 OBST_NOT_SUPPORTED,
174 OBST_DISABLED
177 // m_byChatstate
178 enum {
179 MS_NONE = 0,
180 MS_CHATTING,
181 MS_CONNECTING,
182 MS_UNABLETOCONNECT
187 #endif
188 // File_checked_for_headers