1
// rTorrent - BitTorrent client
2
// Copyright (C) 2005-2007, Jari Sundell
4
// This program is free software; you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation; either version 2 of the License, or
7
// (at your option) any later version.
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU General Public License for more details.
14
// You should have received a copy of the GNU General Public License
15
// along with this program; if not, write to the Free Software
16
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
// In addition, as a special exception, the copyright holders give
19
// permission to link the code of portions of this program with the
20
// OpenSSL library under certain conditions as described in each
21
// individual source file, and distribute linked combinations
24
// You must obey the GNU General Public License in all respects for
25
// all of the code used other than OpenSSL. If you modify file(s)
26
// with this exception, you may extend this exception to your version
27
// of the file(s), but you are not obligated to do so. If you do not
28
// wish to do so, delete this exception statement from your version.
29
// If you delete this exception statement from all source files in the
30
// program, then also delete it here.
32
// Contact: Jari Sundell <jaris@ifi.uio.no>
35
// 3185 Skoppum, NORWAY
37
#ifndef RTORRENT_UI_DOWNLOAD_H
38
#define RTORRENT_UI_DOWNLOAD_H
41
#include <torrent/peer/peer.h>
42
#include <sigc++/connection.h>
44
#include "display/manager.h"
45
#include "utils/list_focus.h"
47
#include "element_base.h"
50
class WindowDownloadStatusbar;
59
class Download : public ElementBase {
61
typedef display::WindowDownloadStatusbar WDownloadStatus;
63
typedef std::list<torrent::Peer> PList;
72
DISPLAY_TRANSFER_LIST,
76
Download(core::Download* d);
79
void activate(display::Frame* frame, bool focus = true);
82
void activate_display(Display d, bool focusDisplay);
84
void activate_display_focus(Display d) { activate_display(d, true); }
85
void activate_display_menu(Display d) { activate_display(d, false); }
87
void receive_next_priority();
88
void receive_prev_priority();
90
display::Window* window() { return NULL; }
93
Download(const Download&);
94
void operator = (const Download&);
96
inline ElementBase* create_menu();
97
inline ElementBase* create_info();
99
void receive_max_uploads(int t);
100
void receive_min_peers(int t);
101
void receive_max_peers(int t);
105
core::Download* m_download;
108
ElementBase* m_uiArray[DISPLAY_MAX_SIZE];
112
WDownloadStatus* m_windowDownloadStatus;