*** empty log message ***

This commit is contained in:
Arvid Norberg 2004-03-05 11:58:38 +00:00
parent 258d691dae
commit 522016da37
4 changed files with 16 additions and 8 deletions

View File

@ -498,7 +498,9 @@ public:
const sha1_hash& info_hash() const; const sha1_hash& info_hash() const;
const std::stirng& name() const; const std::stirng& name() const;
const std::string& comment() 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; void print(std::ostream& os) const;
@ -514,8 +516,7 @@ iterators with the type <tt class="literal"><span class="pre">file_entry</span><
<pre class="literal-block"> <pre class="literal-block">
struct file_entry struct file_entry
{ {
std::string path; boost::filesystem::path path;
std::string filename;
size_type size; size_type size;
}; };
</pre> </pre>

View File

@ -456,6 +456,11 @@ The ``torrent_info`` has the following synopsis::
torrent_info(const entry& torrent_file) 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>file_entry>::const_iterator file_iterator;
typedef std::vector<file_entry>::const_reverse_iterator reverse_file_iterator; typedef std::vector<file_entry>::const_reverse_iterator reverse_file_iterator;
@ -477,7 +482,9 @@ The ``torrent_info`` has the following synopsis::
const sha1_hash& info_hash() const; const sha1_hash& info_hash() const;
const std::stirng& name() const; const std::stirng& name() const;
const std::string& comment() 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; void print(std::ostream& os) const;
@ -495,8 +502,7 @@ iterators with the type ``file_entry``.
struct file_entry struct file_entry
{ {
std::string path; boost::filesystem::path path;
std::string filename;
size_type size; size_type size;
}; };

View File

@ -266,7 +266,8 @@ int main(int argc, char* argv[])
s << t.name() << ".fastresume"; s << t.name() << ".fastresume";
boost::filesystem::ifstream resume_file(save_path / s.str(), std::ios_base::binary); boost::filesystem::ifstream resume_file(save_path / s.str(), std::ios_base::binary);
resume_file.unsetf(std::ios_base::skipws); resume_file.unsetf(std::ios_base::skipws);
resume_data = bdecode(std::istream_iterator<char>(resume_file) resume_data = bdecode(
std::istream_iterator<char>(resume_file)
, std::istream_iterator<char>()); , std::istream_iterator<char>());
} }
catch (invalid_encoding&) {} catch (invalid_encoding&) {}

View File

@ -82,7 +82,7 @@ int main(int argc, char* argv[])
++i) ++i)
{ {
std::cout << " " << std::setw(11) << i->size std::cout << " " << std::setw(11) << i->size
<< " " << i->path << " " << i->filename << "\n"; << " " << i->path.string() << "\n";
} }
} }