added support for comments and creation date in torrent files.

fixed bug in url_handler.
This commit is contained in:
Arvid Norberg
2003-11-20 19:58:29 +00:00
parent 7b9b17f577
commit 086dbd40fe
9 changed files with 782 additions and 4 deletions

View File

@@ -410,6 +410,9 @@ public:
std::size_t num_pieces() const;
const sha1_hash& info_hash() const;
const std::stirng& name() const;
const std::string& comment() const;
boost::posiz_time::ptime creation_date() const;
void print(std::ostream& os) const;
@@ -486,6 +489,14 @@ piece and <tt>info_hash()</tt> returns the 20-bytes sha1-hash for the info-secti
torrent file. For more information on the <tt>sha1_hash</tt>, see the <a href="#big_number">big_number</a> class.
</p>
<p>
<tt>comment()</tt> returns the comment associated with the torrent. If there's no comment,
it will return an empty string. <tt>creation_date()</tt> returns a
<a href="http://www.boost.org/libs/date_time/doc/class_ptime.html"><tt>boost::posix_time::ptime</tt></a>
object, representing the time when this torrent file was created. If there's no timestamp
in the torrent file, this will return a date of january 1:st 1970.
</p>
<h2><a name="torrent_handle"></a>torrent_handle</h2>
<p>