* Use HashString for hash and id which contains the 20 byte array

directly, instead of using std::string.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@799 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-10-31 11:20:31 +00:00
parent c9d8a2406d
commit 9d465de7e1
11 changed files with 46 additions and 21 deletions
+3 -2
View File
@@ -39,6 +39,7 @@
#include <sigc++/bind.h>
#include <torrent/exceptions.h>
#include <torrent/rate.h>
#include <torrent/hash_string.h>
#include "display/client_info.h"
#include "display/frame.h"
@@ -106,7 +107,7 @@ ElementPeerList::create_info() {
display::text_element_value_slot(rak::on(std::mem_fun(&torrent::Peer::address), std::ptr_fun(&te_port))));
element->push_column("Id:", display::text_element_string_slot(std::mem_fun(&torrent::Peer::id), string_base::flag_escape_html));
element->push_column("Client:", display::text_element_string_slot(rak::on(std::mem_fun(&torrent::Peer::id), rak::make_mem_fun(control->client_info(), &display::ClientInfo::str_str))));
element->push_column("Client:", display::text_element_string_slot(rak::on(std::mem_fun(&torrent::Peer::id), rak::make_mem_fun(control->client_info(), &display::ClientInfo::hash_str))));
element->push_column("Options:", display::text_element_string_slot(std::mem_fun(&torrent::Peer::options), string_base::flag_escape_hex | string_base::flag_fixed_width, 0, 8));
element->push_column("Connected:", display::text_element_branch(std::mem_fun(&torrent::Peer::is_incoming), te_string("incoming"), te_string("outgoing")));
element->push_column("Encrypted:", display::text_element_branch3(std::mem_fun(&torrent::Peer::is_encrypted), te_string("yes"), std::mem_fun(&torrent::Peer::is_obfuscated), te_string("handshake"), te_string("no")));
@@ -249,7 +250,7 @@ ElementPeerList::receive_snub_peer() {
updated_itr();
}
inline void
void
ElementPeerList::updated_itr() {
m_windowList->mark_dirty();
m_elementInfo->set_object(m_listItr != m_list.end() ? &*m_listItr : NULL);
+1 -1
View File
@@ -76,7 +76,7 @@ private:
void receive_snub_peer();
inline void updated_itr();
void updated_itr();
core::Download* m_download;