From e35fc5c4bea37e2cdc97314461d04b40f815d86c Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 14 Nov 2006 00:08:16 +0000 Subject: [PATCH] refactored extensions and added a plugin interface. fixed file.cpp for windows --- ChangeLog | 9 + Jamfile | 2 + configure.in | 2 +- docs/manual.html | 252 ++++---- docs/manual.rst | 72 +-- examples/client_test.cpp | 5 +- include/Makefile.am | 18 +- include/libtorrent/aux_/session_impl.hpp | 28 +- include/libtorrent/bt_peer_connection.hpp | 108 ++-- include/libtorrent/entry.hpp | 14 +- include/libtorrent/extensions.hpp | 167 ++++++ include/libtorrent/extensions/logger.hpp | 54 ++ .../extensions/metadata_transfer.hpp | 54 ++ .../libtorrent/http_tracker_connection.hpp | 8 +- include/libtorrent/kademlia/dht_tracker.hpp | 12 +- include/libtorrent/peer_connection.hpp | 65 +- include/libtorrent/session.hpp | 21 +- include/libtorrent/torrent.hpp | 68 +-- include/libtorrent/torrent_handle.hpp | 14 +- include/libtorrent/tracker_manager.hpp | 2 +- include/libtorrent/udp_tracker_connection.hpp | 10 +- include/libtorrent/version.hpp | 4 +- include/libtorrent/web_peer_connection.hpp | 4 +- src/Makefile.am | 3 +- src/bt_peer_connection.cpp | 526 ++++++----------- src/entry.cpp | 20 +- src/file.cpp | 16 + src/http_tracker_connection.cpp | 16 +- src/kademlia/dht_tracker.cpp | 14 +- src/logger.cpp | 231 ++++++++ src/metadata_transfer.cpp | 555 ++++++++++++++++++ src/peer_connection.cpp | 282 ++++++--- src/policy.cpp | 25 +- src/session.cpp | 18 +- src/session_impl.cpp | 83 +-- src/torrent.cpp | 364 ++++-------- src/torrent_handle.cpp | 27 +- src/torrent_info.cpp | 13 +- src/tracker_manager.cpp | 2 +- src/udp_tracker_connection.cpp | 16 +- src/web_peer_connection.cpp | 24 +- test/setup_transfer.cpp | 4 +- test/test_metadata_extension.cpp | 7 +- 43 files changed, 2094 insertions(+), 1145 deletions(-) create mode 100644 include/libtorrent/extensions.hpp create mode 100644 include/libtorrent/extensions/logger.hpp create mode 100644 include/libtorrent/extensions/metadata_transfer.hpp create mode 100644 src/logger.cpp create mode 100644 src/metadata_transfer.cpp diff --git a/ChangeLog b/ChangeLog index 981dc66bd..ee25379a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ + * fixed uninitialized private flag in torrent_info + * fixed long standing issue with file.cpp on windows. Replaced the low level + io functions used on windows. + * made it possible to associate a name with torrents without metadata. + * improved http-downloading performance by requesting entire pieces via + http. + * added plugin interface for extensions. And changed the interface for + enabling extensions. + release 0.11 * added support for incorrectly encoded paths in torrent files diff --git a/Jamfile b/Jamfile index 4416cfcaa..38d12d1c6 100755 --- a/Jamfile +++ b/Jamfile @@ -53,6 +53,8 @@ SOURCES = http_tracker_connection.cpp udp_tracker_connection.cpp sha1.cpp + metadata_transfer.cpp + logger.cpp ; KADEMLIA_SOURCES = diff --git a/configure.in b/configure.in index 2f4c3b912..6c1cc1b75 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ AC_PREREQ(2.59) AC_INIT(src/torrent.cpp) -AM_INIT_AUTOMAKE(libtorrent, 0.11) +AM_INIT_AUTOMAKE(libtorrent, 0.12) AM_CONFIG_HEADER(config.h) diff --git a/docs/manual.html b/docs/manual.html index 4a009d977..131134acc 100755 --- a/docs/manual.html +++ b/docs/manual.html @@ -32,49 +32,49 @@
  • abort()
  • add_torrent()
  • remove_torrent()
  • -
  • disable_extensions() enable_extension()
  • -
  • set_upload_rate_limit() set_download_rate_limit()
  • -
  • set_max_uploads() set_max_connections()
  • -
  • set_max_half_open_connections()
  • -
  • set_ip_filter()
  • -
  • status()
  • -
  • is_listening() listen_port() listen_on()
  • -
  • pop_alert() set_severity_level()
  • -
  • start_dht() stop_dht() set_dht_settings() dht_state()
  • -
  • add_dht_node() add_dht_router()
  • +
  • set_upload_rate_limit() set_download_rate_limit()
  • +
  • set_max_uploads() set_max_connections()
  • +
  • set_max_half_open_connections()
  • +
  • set_ip_filter()
  • +
  • status()
  • +
  • is_listening() listen_port() listen_on()
  • +
  • pop_alert() set_severity_level()
  • +
  • start_dht() stop_dht() set_dht_settings() dht_state()
  • +
  • add_dht_node() add_dht_router()
  • -
  • entry