2 // This file is part of the aMule Project.
4 // Copyright (c) 2003-2008 aMule Team ( admin@amule.org / http://www.amule.org )
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
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.
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
26 #include "KnownFile.h" // Needed by PriorityToStr
27 #include "updownclient.h" // Needed by DownloadStateToStr and GetSoftName
29 #include <protocol/ed2k/ClientSoftware.h>
31 wxString
PriorityToStr( int priority
, bool isAuto
)
35 case PR_LOW
: return _("Auto [Lo]");
36 case PR_NORMAL
: return _("Auto [No]");
37 case PR_HIGH
: return _("Auto [Hi]");
41 case PR_VERYLOW
: return _("Very low");
42 case PR_LOW
: return _("Low");
43 case PR_NORMAL
: return _("Normal");
44 case PR_HIGH
: return _("High");
45 case PR_VERYHIGH
: return _("Very High");
46 case PR_POWERSHARE
: return _("Release");
56 wxString
DownloadStateToStr( int state
, bool queueFull
)
59 case DS_CONNECTING
: return _("Connecting");
60 case DS_CONNECTED
: return _("Asking");
61 case DS_WAITCALLBACK
: return _("Connecting via server");
62 case DS_ONQUEUE
: return ( queueFull
? _("Queue Full") : _("On Queue") );
63 case DS_DOWNLOADING
: return _("Transferring");
64 case DS_REQHASHSET
: return _("Receiving hashset");
65 case DS_NONEEDEDPARTS
: return _("No needed parts");
66 case DS_LOWTOLOWIP
: return _("Cannot connect LowID to LowID");
67 case DS_TOOMANYCONNS
: return _("Too many connections");
68 case DS_NONE
: return _("Unknown");
69 case DS_WAITCALLBACKKAD
: return _("Connecting via Kad");
70 case DS_TOOMANYCONNSKAD
: return _("Too many Kad connections");
71 case DS_BANNED
: return _("Banned");
72 case DS_ERROR
: return _("Connection Error");
73 case DS_REMOTEQUEUEFULL
: return _("Remote Queue Full");
82 const wxString
GetSoftName(unsigned int software_ident
)
84 switch (software_ident
) {
89 return wxT("cDonkey");
91 return wxT("(l/x)Mule");
96 case SO_NEW2_SHAREAZA
:
97 return wxT("Shareaza");
101 return wxT("HydraNode");
103 return wxTRANSLATE("Old MLDonkey");
104 case SO_NEW_MLDONKEY
:
105 case SO_NEW2_MLDONKEY
:
106 return wxTRANSLATE("New MLDonkey");
108 return wxT("lphant");
109 case SO_EDONKEYHYBRID
:
110 return wxT("eDonkeyHybrid");
112 return wxT("eDonkey");
114 return wxTRANSLATE("Unknown");
116 return wxTRANSLATE("eMule Compatible");
118 return wxEmptyString
;
123 wxString
OriginToText(unsigned int source_from
)
125 switch ((ESourceFrom
)source_from
) {
126 case SF_LOCAL_SERVER
: return wxTRANSLATE("Local Server");
127 case SF_REMOTE_SERVER
: return wxTRANSLATE("Remote Server");
128 case SF_KADEMLIA
: return wxTRANSLATE("Kad");
129 case SF_SOURCE_EXCHANGE
: return wxTRANSLATE("Source Exchange");
130 case SF_PASSIVE
: return wxTRANSLATE("Passive");
131 case SF_LINK
: return wxTRANSLATE("Link");
132 case SF_SOURCE_SEEDS
: return wxTRANSLATE("Source Seeds");
134 default: return wxTRANSLATE("Unknown");
137 // File_checked_for_headers