Work on peer info display.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@260 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-02-07 23:40:48 +00:00
parent 45404b7473
commit b657554236
10 changed files with 199 additions and 21 deletions
+24 -5
View File
@@ -5,36 +5,52 @@
#include <torrent/peer.h>
#include <sigc++/connection.h>
#include "core/download_list.h"
namespace display {
class WindowTitle;
class WindowPeerInfo;
class WindowPeerList;
class WindowStatusbar;
}
namespace core {
class Download;
}
namespace ui {
class Control;
class Download {
public:
typedef enum {
DISPLAY_NONE,
DISPLAY_MAIN,
DISPLAY_PEER
} Display;
typedef display::Window Window;
typedef display::WindowPeerInfo WPeerInfo;
typedef display::WindowPeerList WPeerList;
typedef display::WindowTitle WTitle;
typedef display::WindowStatusbar WStatus;
typedef core::DownloadList::iterator DPtr;
typedef core::Download* DPtr;
typedef std::list<torrent::Peer> PList;
typedef display::Manager::iterator MItr;
// We own 'window'.
Download(DPtr d, Control* c);
~Download();
WPeerList& get_window() { return *m_window; }
//WPeerList& get_window() { return *m_window; }
input::Bindings& get_bindings() { return *m_bindings; }
void activate();
void disable();
void activate_display(Display d);
void disable_display();
private:
Download(const Download&);
void operator = (const Download&);
@@ -46,6 +62,7 @@ private:
void receive_peer_disconnected(torrent::Peer p);
void receive_throttle(int t);
void receive_change(Display d);
void bind_keys(input::Bindings* b);
@@ -55,7 +72,9 @@ private:
PList m_peers;
PList::iterator m_focus;
WPeerList* m_window;
Display m_state;
MItr m_window;
WTitle* m_title;
WStatus* m_status;