* Replaced syncing chunks with ChunkList::sync_chunks which allows the

caller greater control through the use of flags. MS_SYNC is only used
if the caller either requires it or asks for remaining free diskspace
to be checked.

* Moved various flags from DownloadMain to DownloadInfo.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@744 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-07-19 21:09:19 +00:00
parent b3fc488e5f
commit 345c57e9bc
+13 -11
View File
@@ -71,28 +71,28 @@ WindowPeerInfo::redraw() {
torrent::Download* d = m_download->download();
m_canvas->print(0, y++, "Hash: %s", rak::transform_hex(d->info_hash()).c_str());
m_canvas->print(0, y++, "Id: %s", rak::copy_escape_html(d->local_id()).c_str());
m_canvas->print(0, y++, "Chunks: %u / %u * %u", d->chunks_done(), d->chunks_total(), d->chunks_size());
m_canvas->print(0, y++, "Hash: %s", rak::transform_hex(d->info_hash()).c_str());
m_canvas->print(0, y++, "Id: %s", rak::copy_escape_html(d->local_id()).c_str());
m_canvas->print(0, y++, "Chunks: %u / %u * %u", d->chunks_done(), d->chunks_total(), d->chunks_size());
y++;
position = print_date(buffer, buffer + 256, static_cast<time_t>(d->creation_date()));
m_canvas->print(0, y++, "Created: %s", buffer);
m_canvas->print(0, y++, "Created: %s", buffer);
position = print_timer(buffer, buffer + 256, static_cast<time_t>(m_download->variable()->get_value("state_changed")));
m_canvas->print(0, y++, "State Changed: %s", buffer);
m_canvas->print(0, y++, "State Changed: %s", buffer);
y++;
m_canvas->print(0, y++, "Connection Type: %s ( %s / %s )",
m_canvas->print(0, y++, "Connection Type: %s ( %s / %s )",
m_download->variable()->get("connection_current").as_string().c_str(),
m_download->variable()->get("connection_seed").as_string().c_str(),
m_download->variable()->get("connection_leech").as_string().c_str());
m_canvas->print(0, y++, "Priority: %u", torrent::download_priority(*m_download->download()));
m_canvas->print(0, y++, "Priority: %u", torrent::download_priority(*m_download->download()));
m_canvas->print(0, y++, "Directory: %s", m_download->variable_string("directory").c_str());
m_canvas->print(0, y++, "Tied to file: %s", m_download->variable_string("tied_to_file").c_str());
m_canvas->print(0, y++, "Directory: %s", m_download->variable_string("directory").c_str());
m_canvas->print(0, y++, "Tied to file: %s", m_download->variable_string("tied_to_file").c_str());
y++;
@@ -100,8 +100,10 @@ WindowPeerInfo::redraw() {
// m_canvas->print(0, y++, "SndBuf: %u", torrent::connection_manager()->send_buffer_size());
// m_canvas->print(0, y++, "RcvBuf: %u", torrent::connection_manager()->receive_buffer_size());
m_canvas->print(0, y++, "MemUsage: %llu", torrent::chunk_manager()->memory_usage());
m_canvas->print(0, y++, "MaxMemUsage: %llu", torrent::chunk_manager()->max_memory_usage());
m_canvas->print(0, y++, "Memory Usage: %llu MB", torrent::chunk_manager()->memory_usage() / (1 << 20));
m_canvas->print(0, y++, "Max Memory Usage: %llu MB", torrent::chunk_manager()->max_memory_usage() / (1 << 20));
m_canvas->print(0, y++, "Free Diskspace: %llu MB", m_download->download()->free_diskspace() / (1 << 20));
y++;