From 522016da37afd1c53092f11aeb5958dc3eccb67a Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 5 Mar 2004 11:58:38 +0000 Subject: [PATCH] *** empty log message *** --- docs/manual.html | 7 ++++--- docs/manual.rst | 12 +++++++++--- examples/client_test.cpp | 3 ++- examples/dump_torrent.cpp | 2 +- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/docs/manual.html b/docs/manual.html index 8bdf133c5..1bb650f38 100755 --- a/docs/manual.html +++ b/docs/manual.html @@ -498,7 +498,9 @@ public: const sha1_hash& info_hash() const; const std::stirng& name() const; const std::string& comment() const; - boost::posiz_time::ptime creation_date() const; + + boost::optional<boost::posix_time::ptime> + creation_date() const; void print(std::ostream& os) const; @@ -514,8 +516,7 @@ iterators with the type file_entry<
 struct file_entry
 {
-        std::string path;
-        std::string filename;
+        boost::filesystem::path path;
         size_type size;
 };
 
diff --git a/docs/manual.rst b/docs/manual.rst index 0e96eec24..055c2f700 100755 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -456,6 +456,11 @@ The ``torrent_info`` has the following synopsis:: torrent_info(const entry& torrent_file) + torrent_info( + int piece_size + , const char* name + , const char* comment = 0); + typedef std::vector>file_entry>::const_iterator file_iterator; typedef std::vector::const_reverse_iterator reverse_file_iterator; @@ -477,7 +482,9 @@ The ``torrent_info`` has the following synopsis:: const sha1_hash& info_hash() const; const std::stirng& name() const; const std::string& comment() const; - boost::posiz_time::ptime creation_date() const; + + boost::optional + creation_date() const; void print(std::ostream& os) const; @@ -495,8 +502,7 @@ iterators with the type ``file_entry``. struct file_entry { - std::string path; - std::string filename; + boost::filesystem::path path; size_type size; }; diff --git a/examples/client_test.cpp b/examples/client_test.cpp index b7b4b20c1..6cf0a7f19 100755 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -266,7 +266,8 @@ int main(int argc, char* argv[]) s << t.name() << ".fastresume"; boost::filesystem::ifstream resume_file(save_path / s.str(), std::ios_base::binary); resume_file.unsetf(std::ios_base::skipws); - resume_data = bdecode(std::istream_iterator(resume_file) + resume_data = bdecode( + std::istream_iterator(resume_file) , std::istream_iterator()); } catch (invalid_encoding&) {} diff --git a/examples/dump_torrent.cpp b/examples/dump_torrent.cpp index a3a5a0445..e9dc9bec2 100755 --- a/examples/dump_torrent.cpp +++ b/examples/dump_torrent.cpp @@ -82,7 +82,7 @@ int main(int argc, char* argv[]) ++i) { std::cout << " " << std::setw(11) << i->size - << " " << i->path << " " << i->filename << "\n"; + << " " << i->path.string() << "\n"; } }