From 19b652593244a572a226f600c7755344ead8b388 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 24 Sep 2008 21:55:31 +0000 Subject: [PATCH] added documentation for new create_torrent constructor --- docs/make_torrent.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/make_torrent.rst b/docs/make_torrent.rst index 0effd2c29..54a22f0d8 100644 --- a/docs/make_torrent.rst +++ b/docs/make_torrent.rst @@ -150,6 +150,7 @@ The ``create_torrent`` class has the following synopsis:: { create_torrent(file_storage& fs, int piece_size); create_torrent(file_storage& fs); + create_torrent(torrent_info const& ti); entry generate() const; @@ -174,10 +175,18 @@ create_torrent() create_torrent(file_storage& fs, int piece_size); create_torrent(file_storage& fs); + create_torrent(torrent_info const& ti); The contrstructor that does not take a piece_size will calculate a piece size such that the torrent file is roughly 40 kB. +The overlad that takes a ``torrent_info`` object will make a verbatim +copy of its info dictionary (to preserve the info-hash). The copy of +the info dictionary will be used by ``generate()``. This means +that none of the member functions of create_torrent that affects +the content of the info dictionary (such as ``set_hash()``), will not +have any affect. + generate() ----------