From e92444dc7f0b77a4557c50da781e15d2972968a7 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 26 Nov 2013 04:14:29 +0000 Subject: [PATCH] pack add_torrent_params --- include/libtorrent/add_torrent_params.hpp | 42 ++++++++++++----------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/include/libtorrent/add_torrent_params.hpp b/include/libtorrent/add_torrent_params.hpp index 8e00c338a..a2e1636b0 100644 --- a/include/libtorrent/add_torrent_params.hpp +++ b/include/libtorrent/add_torrent_params.hpp @@ -250,7 +250,6 @@ namespace libtorrent // a list of hostname and port pairs, representing DHT nodes to be // added to the session (if DHT is enabled). The hostname may be an IP address. std::vector > dht_nodes; - sha1_hash info_hash; std::string name; std::string save_path; @@ -278,6 +277,15 @@ namespace libtorrent // a torrent. The semantics are the same as for ``torrent_handle::prioritize_files()``. std::vector file_priorities; + // torrent extension construction functions can be added to this + // vector to have them be added immediately when the torrent is + // constructed. This may be desired over the torrent_handle::add_extension() + // in order to avoid race conditions. For instance it may be important + // to have the plugin catch events that happen very early on after + // the torrent is created. + std::vector(torrent*, void*)> > + extensions; + // the default tracker id to be used when announcing to trackers. By default // this is empty, and no tracker ID is used, since this is an optional argument. If // a tracker returns a tracker ID, that ID is used instead of this. @@ -308,17 +316,7 @@ namespace libtorrent // flags controlling aspects of this torrent and how it's added. See flags_t for details. boost::uint64_t flags; -#ifndef TORRENT_NO_DEPRECATE - bool seed_mode; - bool override_resume_data; - bool upload_mode; - bool share_mode; - bool apply_ip_filter; - bool paused; - bool auto_managed; - bool duplicate_is_error; - bool merge_resume_trackers; -#endif + sha1_hash info_hash; // ``max_uploads``, ``max_connections``, ``upload_limit``, ``download_limit`` correspond // to the ``set_max_uploads()``, ``set_max_connections()``, ``set_upload_limit()`` and @@ -334,14 +332,18 @@ namespace libtorrent int upload_limit; int download_limit; - // torrent extension construction functions can be added to this - // vector to have them be added immediately when the torrent is - // constructed. This may be desired over the torrent_handle::add_extension() - // in order to avoid race conditions. For instance it may be important - // to have the plugin catch events that happen very early on after - // the torrent is created. - std::vector(torrent*, void*)> > - extensions; +#ifndef TORRENT_NO_DEPRECATE + bool seed_mode; + bool override_resume_data; + bool upload_mode; + bool share_mode; + bool apply_ip_filter; + bool paused; + bool auto_managed; + bool duplicate_is_error; + bool merge_resume_trackers; +#endif + }; }