Update of /cvsroot/dcplusplus/dcplusplus/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6640/client Modified Files: SettingsManager.h HttpConnection.h ClientManagerListener.h ServerSocket.h DownloadManager.h UploadManager.h DirectoryListing.h HashManager.h BufferedSocket.h SearchManagerListener.h FinishedManager.h ConnectionManagerListener.h QueueManagerListener.h StringDefs.h HashValue.h UserConnection.h TimerManager.h FavoriteManager.h DirectoryListing.cpp SettingsManager.cpp LogManager.h Log Message: More pedantry, sort order patch Index: SearchManagerListener.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/SearchManagerListener.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SearchManagerListener.h 24 Apr 2005 08:13:10 -0000 1.8 --- SearchManagerListener.h 19 Feb 2006 17:19:04 -0000 1.9 *************** *** 28,31 **** --- 28,32 ---- class SearchManagerListener { public: + virtual ~SearchManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: StringDefs.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/StringDefs.h,v retrieving revision 1.158 retrieving revision 1.159 diff -C2 -d -r1.158 -r1.159 *** StringDefs.h 13 Feb 2006 21:13:27 -0000 1.158 --- StringDefs.h 19 Feb 2006 17:19:04 -0000 1.159 *************** *** 513,516 **** --- 513,517 ---- SETTINGS_WINDOWS_OPTIONS, // "Window options" SETTINGS_WRITE_BUFFER, // "Write buffer size" + SETTINGS_ALT_SORT_ORDER, // "Sort all downloads first" SETTINGS_USE_SSL, // "Use SSL when remote client supports it" SFV_INCONSISTENCY, // "CRC32 inconsistency (SFV-Check)" Index: DirectoryListing.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/DirectoryListing.h,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** DirectoryListing.h 19 Feb 2006 16:19:06 -0000 1.46 --- DirectoryListing.h 19 Feb 2006 17:19:04 -0000 1.47 *************** *** 101,106 **** int64_t getTotalSize(bool adls = false); void filterList(DirectoryListing& dirList); ! void filterList(const HASH_SET<TTHValue, TTHValue::Hash>& l); ! void getHashList(HASH_SET<TTHValue, TTHValue::Hash>& l); size_t getFileCount() { return files.size(); } --- 101,106 ---- int64_t getTotalSize(bool adls = false); void filterList(DirectoryListing& dirList); ! void filterList(HASH_SET_X(TTHValue, TTHValue::Hash, equal_to<TTHValue>, less<TTHValue>)& l); ! void getHashList(HASH_SET_X(TTHValue, TTHValue::Hash, equal_to<TTHValue>, less<TTHValue>)& l); size_t getFileCount() { return files.size(); } Index: BufferedSocket.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/BufferedSocket.h,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** BufferedSocket.h 19 Feb 2006 16:19:06 -0000 1.78 --- BufferedSocket.h 19 Feb 2006 17:19:04 -0000 1.79 *************** *** 36,39 **** --- 36,40 ---- class BufferedSocketListener { public: + virtual ~BufferedSocketListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: SettingsManager.cpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/SettingsManager.cpp,v retrieving revision 1.141 retrieving revision 1.142 diff -C2 -d -r1.141 -r1.142 *** SettingsManager.cpp 10 Feb 2006 07:56:46 -0000 1.141 --- SettingsManager.cpp 19 Feb 2006 17:19:04 -0000 1.142 *************** *** 74,78 **** "BoldHub", "BoldPm", "BoldSearch", "SocketInBuffer", "SocketOutBuffer", "OnlyDlTthFiles", "OpenWaitingUsers", "BoldWaitingUsers", "OpenSystemLog", "BoldSystemLog", "AutoRefreshTime", ! "UseSsl", "AutoSearchLimit", "SENTRY", // Int64 --- 74,78 ---- "BoldHub", "BoldPm", "BoldSearch", "SocketInBuffer", "SocketOutBuffer", "OnlyDlTthFiles", "OpenWaitingUsers", "BoldWaitingUsers", "OpenSystemLog", "BoldSystemLog", "AutoRefreshTime", ! "UseSsl", "AutoSearchLimit", "AltSortOrder", "SENTRY", // Int64 *************** *** 255,258 **** --- 255,259 ---- setDefault(USE_SSL, false); setDefault(AUTO_SEARCH_LIMIT, 5); + setDefault(ALT_SORT_ORDER, false); #ifdef _WIN32 Index: ConnectionManagerListener.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/ConnectionManagerListener.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ConnectionManagerListener.h 19 Feb 2006 16:19:06 -0000 1.7 --- ConnectionManagerListener.h 19 Feb 2006 17:19:04 -0000 1.8 *************** *** 28,31 **** --- 28,32 ---- class ConnectionManagerListener { public: + virtual ~ConnectionManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: HttpConnection.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/HttpConnection.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** HttpConnection.h 19 Feb 2006 16:19:06 -0000 1.27 --- HttpConnection.h 19 Feb 2006 17:19:04 -0000 1.28 *************** *** 30,33 **** --- 30,34 ---- class HttpConnectionListener { public: + virtual ~HttpConnectionListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: TimerManager.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/TimerManager.h,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** TimerManager.h 19 Feb 2006 16:19:06 -0000 1.29 --- TimerManager.h 19 Feb 2006 17:19:04 -0000 1.30 *************** *** 35,38 **** --- 35,39 ---- class TimerManagerListener { public: + virtual ~TimerManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: UploadManager.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/UploadManager.h,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** UploadManager.h 19 Feb 2006 16:19:06 -0000 1.85 --- UploadManager.h 19 Feb 2006 17:19:04 -0000 1.86 *************** *** 61,64 **** --- 61,65 ---- class UploadManagerListener { public: + virtual ~UploadManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: HashValue.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/HashValue.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** HashValue.h 19 Feb 2006 16:19:06 -0000 1.13 --- HashValue.h 19 Feb 2006 17:19:04 -0000 1.14 *************** *** 41,48 **** struct Hash { size_t operator()(const HashValue& rhs) const { return *(size_t*)&rhs; } - bool operator()(const HashValue& lhs, const HashValue& rhs) const { return lhs == rhs; } - }; - struct Less { - bool operator()(const HashValue& lhs, const HashValue& rhs) const { return lhs < rhs; } }; --- 41,44 ---- Index: UserConnection.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/UserConnection.h,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -d -r1.106 -r1.107 *** UserConnection.h 19 Feb 2006 16:19:06 -0000 1.106 --- UserConnection.h 19 Feb 2006 17:19:04 -0000 1.107 *************** *** 36,39 **** --- 36,40 ---- class UserConnectionListener { public: + virtual ~UserConnectionListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: LogManager.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/LogManager.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** LogManager.h 19 Feb 2006 16:19:05 -0000 1.21 --- LogManager.h 19 Feb 2006 17:19:04 -0000 1.22 *************** *** 31,34 **** --- 31,35 ---- class LogManagerListener { public: + virtual ~LogManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: QueueManagerListener.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/QueueManagerListener.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** QueueManagerListener.h 23 Jan 2006 08:00:49 -0000 1.11 --- QueueManagerListener.h 19 Feb 2006 17:19:04 -0000 1.12 *************** *** 28,31 **** --- 28,32 ---- class QueueManagerListener { public: + virtual ~QueueManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: ClientManagerListener.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/ClientManagerListener.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ClientManagerListener.h 9 Dec 2005 22:50:07 -0000 1.12 --- ClientManagerListener.h 19 Feb 2006 17:19:04 -0000 1.13 *************** *** 26,29 **** --- 26,30 ---- class ClientManagerListener { public: + virtual ~ClientManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: FavoriteManager.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/FavoriteManager.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** FavoriteManager.h 19 Feb 2006 16:19:06 -0000 1.12 --- FavoriteManager.h 19 Feb 2006 17:19:04 -0000 1.13 *************** *** 111,114 **** --- 111,115 ---- class FavoriteManagerListener { public: + virtual ~FavoriteManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: HashManager.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/HashManager.h,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** HashManager.h 19 Feb 2006 16:19:06 -0000 1.33 --- HashManager.h 19 Feb 2006 17:19:04 -0000 1.34 *************** *** 39,42 **** --- 39,43 ---- class HashManagerListener { public: + virtual ~HashManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; *************** *** 231,235 **** typedef DirMap::iterator DirIter; ! typedef HASH_MAP_X(TTHValue, TreeInfo, TTHValue::Hash, TTHValue::Hash, TTHValue::Less) TreeMap; typedef TreeMap::iterator TreeIter; --- 232,236 ---- typedef DirMap::iterator DirIter; ! typedef HASH_MAP_X(TTHValue, TreeInfo, TTHValue::Hash, equal_to<TTHValue>, less<TTHValue>) TreeMap; typedef TreeMap::iterator TreeIter; Index: SettingsManager.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/SettingsManager.h,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -d -r1.111 -r1.112 *** SettingsManager.h 19 Feb 2006 16:19:06 -0000 1.111 --- SettingsManager.h 19 Feb 2006 17:19:04 -0000 1.112 *************** *** 32,35 **** --- 32,36 ---- class SettingsManagerListener { public: + virtual ~SettingsManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; *************** *** 89,93 **** BOLD_HUB, BOLD_PM, BOLD_SEARCH, SOCKET_IN_BUFFER, SOCKET_OUT_BUFFER, ONLY_DL_TTH_FILES, OPEN_WAITING_USERS, BOLD_WAITING_USERS, OPEN_SYSTEM_LOG, BOLD_SYSTEM_LOG, AUTO_REFRESH_TIME, ! USE_SSL, AUTO_SEARCH_LIMIT, INT_LAST }; --- 90,94 ---- BOLD_HUB, BOLD_PM, BOLD_SEARCH, SOCKET_IN_BUFFER, SOCKET_OUT_BUFFER, ONLY_DL_TTH_FILES, OPEN_WAITING_USERS, BOLD_WAITING_USERS, OPEN_SYSTEM_LOG, BOLD_SYSTEM_LOG, AUTO_REFRESH_TIME, ! USE_SSL, AUTO_SEARCH_LIMIT, ALT_SORT_ORDER, INT_LAST }; Index: ServerSocket.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/ServerSocket.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ServerSocket.h 19 Feb 2006 16:19:06 -0000 1.28 --- ServerSocket.h 19 Feb 2006 17:19:04 -0000 1.29 *************** *** 29,32 **** --- 29,33 ---- class ServerSocketListener { public: + virtual ~ServerSocketListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: FinishedManager.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/FinishedManager.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** FinishedManager.h 19 Feb 2006 16:19:06 -0000 1.18 --- FinishedManager.h 19 Feb 2006 17:19:04 -0000 1.19 *************** *** 62,65 **** --- 62,66 ---- class FinishedManagerListener { public: + virtual ~FinishedManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: DownloadManager.h =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/DownloadManager.h,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** DownloadManager.h 19 Feb 2006 16:19:05 -0000 1.85 --- DownloadManager.h 19 Feb 2006 17:19:04 -0000 1.86 *************** *** 128,131 **** --- 128,132 ---- class DownloadManagerListener { public: + virtual ~DownloadManagerListener() { } template<int I> struct X { enum { TYPE = I }; }; Index: DirectoryListing.cpp =================================================================== RCS file: /cvsroot/dcplusplus/dcplusplus/client/DirectoryListing.cpp,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** DirectoryListing.cpp 19 Feb 2006 16:19:06 -0000 1.58 --- DirectoryListing.cpp 19 Feb 2006 17:19:04 -0000 1.59 *************** *** 371,376 **** struct HashContained { ! HashContained(const HASH_SET<TTHValue, TTHValue::Hash>& l) : tl(l) { } ! const HASH_SET<TTHValue, TTHValue::Hash>& tl; bool operator()(const DirectoryListing::File::Ptr i) const { return tl.count(*(i->getTTH())) && (DeleteFunction()(i), true); --- 371,376 ---- struct HashContained { ! HashContained(const HASH_SET_X(TTHValue, TTHValue::Hash, equal_to<TTHValue>, less<TTHValue>)& l) : tl(l) { } ! const HASH_SET_X(TTHValue, TTHValue::Hash, equal_to<TTHValue>, less<TTHValue>)& tl; bool operator()(const DirectoryListing::File::Ptr i) const { return tl.count(*(i->getTTH())) && (DeleteFunction()(i), true); *************** *** 391,400 **** DirectoryListing::Directory* d = dirList.getRoot(); ! HASH_SET<TTHValue, TTHValue::Hash> l; d->getHashList(l); filterList(l); } ! void DirectoryListing::Directory::filterList(const HASH_SET<TTHValue, TTHValue::Hash>& l) { for(Iter i = directories.begin(); i != directories.end(); ++i) (*i)->filterList(l); directories.erase(std::remove_if(directories.begin(),directories.end(),DirectoryEmpty()),directories.end()); --- 391,400 ---- DirectoryListing::Directory* d = dirList.getRoot(); ! HASH_SET_X(TTHValue, TTHValue::Hash, equal_to<TTHValue>, less<TTHValue>) l; d->getHashList(l); filterList(l); } ! void DirectoryListing::Directory::filterList(HASH_SET_X(TTHValue, TTHValue::Hash, equal_to<TTHValue>, less<TTHValue>)& l) { for(Iter i = directories.begin(); i != directories.end(); ++i) (*i)->filterList(l); directories.erase(std::remove_if(directories.begin(),directories.end(),DirectoryEmpty()),directories.end()); *************** *** 402,406 **** } ! void DirectoryListing::Directory::getHashList(HASH_SET<TTHValue, TTHValue::Hash>& l) { for(Iter i = directories.begin(); i != directories.end(); ++i) (*i)->getHashList(l); for(DirectoryListing::File::Iter i = files.begin(); i != files.end(); ++i) l.insert(*(*i)->getTTH()); --- 402,406 ---- } ! void DirectoryListing::Directory::getHashList(HASH_SET_X(TTHValue, TTHValue::Hash, equal_to<TTHValue>, less<TTHValue>)& l) { for(Iter i = directories.begin(); i != directories.end(); ++i) (*i)->getHashList(l); for(DirectoryListing::File::Iter i = files.begin(); i != files.end(); ++i) l.insert(*(*i)->getTTH()); |