diff --git a/docs/manual.rst b/docs/manual.rst index 6741a672a..61005ad7c 100644 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -356,9 +356,9 @@ add_torrent() :: - typedef storage_interface* (&storage_constructor_type)( - file_storage const&, file_storage const*, fs::path const&, file_pool& - , std::vector const&); + typedef boost::function const&) storage_constructor_type; struct add_torrent_params { @@ -382,6 +382,7 @@ add_torrent() bool upload_mode; std::vector const* file_priorities; bool share_mode; + std::string trackerid; }; torrent_handle add_torrent(add_torrent_params const& params); @@ -514,6 +515,10 @@ a torrent. The semantics are the same as for ``torrent_handle::prioritize_files( ``version`` is filled in by the constructor and should be left untouched. It is used for forward binary compatibility. +``trackerid`` is 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. + remove_torrent() ---------------- diff --git a/include/libtorrent/storage_defs.hpp b/include/libtorrent/storage_defs.hpp index 4d674a9cc..e6d3098f4 100644 --- a/include/libtorrent/storage_defs.hpp +++ b/include/libtorrent/storage_defs.hpp @@ -34,6 +34,7 @@ POSSIBILITY OF SUCH DAMAGE. #define TORRENT_STORAGE_DEFS_HPP_INCLUDE #include "libtorrent/config.hpp" +#include #include namespace libtorrent @@ -49,14 +50,16 @@ namespace libtorrent storage_mode_compact }; - typedef storage_interface* (*storage_constructor_type)( - file_storage const&, file_storage const*, std::string const&, file_pool&, std::vector const&); + typedef boost::function const&)> storage_constructor_type; TORRENT_EXPORT storage_interface* default_storage_constructor( - file_storage const&, file_storage const* mapped, std::string const&, file_pool&, std::vector const&); + file_storage const&, file_storage const* mapped, std::string const&, file_pool& + , std::vector const&); TORRENT_EXPORT storage_interface* disabled_storage_constructor( - file_storage const&, file_storage const* mapped, std::string const&, file_pool&, std::vector const&); + file_storage const&, file_storage const* mapped, std::string const&, file_pool& + , std::vector const&); }