forked from premiere/premiere-libtorrent
regenerated html
This commit is contained in:
parent
7dbce70e96
commit
78d0c06728
|
@ -100,8 +100,11 @@ bencode(std::ostream_iterator<char>(out), t.generate());
|
|||
<pre class="literal-block">
|
||||
template <class Pred>
|
||||
void add_files(file_storage& fs, boost::filesystem::path const& path, Pred p);
|
||||
template <class Pred>
|
||||
void add_files(file_storage& fs, boost::filesystem::wpath const& path, Pred p);
|
||||
|
||||
void add_files(file_storage& fs, boost::filesystem::path const& path);
|
||||
void add_files(file_storage& fs, boost::filesystem::wpath const& path);
|
||||
</pre>
|
||||
</blockquote>
|
||||
<p>Adds the file specified by <tt class="docutils literal"><span class="pre">path</span></tt> to the <tt class="docutils literal"><span class="pre">file_storage</span></tt> object. In case <tt class="docutils literal"><span class="pre">path</span></tt>
|
||||
|
@ -112,6 +115,10 @@ which <tt class="docutils literal"><span class="pre">p</span></tt> returns true
|
|||
<pre class="literal-block">
|
||||
bool Pred(boost::filesystem::path const& p);
|
||||
</pre>
|
||||
<p>and for the wpath version:</p>
|
||||
<pre class="literal-block">
|
||||
bool Pred(boost::filesystem::wpath const& p);
|
||||
</pre>
|
||||
<p>The path that is passed in to the predicate is the full path of the file or
|
||||
directory. If no predicate is specified, all files are added, and all directories
|
||||
are traveresed.</p>
|
||||
|
@ -123,8 +130,11 @@ are traveresed.</p>
|
|||
<pre class="literal-block">
|
||||
template <class Fun>
|
||||
void set_piece_hashes(create_torrent& t, boost::filesystem::path const& p, Fun f);
|
||||
template <class Fun>
|
||||
void set_piece_hashes(create_torrent& t, boost::filesystem::wpath const& p, Fun f);
|
||||
|
||||
void set_piece_hashes(create_torrent& t, boost::filesystem::path const& p);
|
||||
void set_piece_hashes(create_torrent& t, boost::filesystem::wpath const& p);
|
||||
</pre>
|
||||
</blockquote>
|
||||
<p>This function will assume that the files added to the torrent file exists at path
|
||||
|
@ -149,7 +159,9 @@ public:
|
|||
|
||||
void add_file(file_entry const& e);
|
||||
void add_file(fs::path const& p, size_type size);
|
||||
void add_file(fs::wpath const& p, size_type size);
|
||||
void rename_file(int index, std::string const& new_filename);
|
||||
void rename_file(int index, std::wstring const& new_filename);
|
||||
|
||||
std::vector<file_slice> map_block(int piece, size_type offset
|
||||
, int size) const;
|
||||
|
@ -174,6 +186,7 @@ public:
|
|||
int piece_size(int index) const;
|
||||
|
||||
void set_name(std::string const& n);
|
||||
void set_name(std::wstring const& n);
|
||||
const std::string& name() const;
|
||||
|
||||
void swap(file_storage& ti);
|
||||
|
|
117
docs/manual.html
117
docs/manual.html
|
@ -191,68 +191,69 @@
|
|||
<li><a class="reference internal" href="#invalid-request-alert" id="id148">invalid_request_alert</a></li>
|
||||
<li><a class="reference internal" href="#torrent-finished-alert" id="id149">torrent_finished_alert</a></li>
|
||||
<li><a class="reference internal" href="#performance-alert" id="id150">performance_alert</a></li>
|
||||
<li><a class="reference internal" href="#metadata-failed-alert" id="id151">metadata_failed_alert</a></li>
|
||||
<li><a class="reference internal" href="#metadata-received-alert" id="id152">metadata_received_alert</a></li>
|
||||
<li><a class="reference internal" href="#fastresume-rejected-alert" id="id153">fastresume_rejected_alert</a></li>
|
||||
<li><a class="reference internal" href="#peer-blocked-alert" id="id154">peer_blocked_alert</a></li>
|
||||
<li><a class="reference internal" href="#storage-moved-alert" id="id155">storage_moved_alert</a></li>
|
||||
<li><a class="reference internal" href="#torrent-paused-alert" id="id156">torrent_paused_alert</a></li>
|
||||
<li><a class="reference internal" href="#torrent-resumed-alert" id="id157">torrent_resumed_alert</a></li>
|
||||
<li><a class="reference internal" href="#save-resume-data-alert" id="id158">save_resume_data_alert</a></li>
|
||||
<li><a class="reference internal" href="#save-resume-data-failed-alert" id="id159">save_resume_data_failed_alert</a></li>
|
||||
<li><a class="reference internal" href="#dht-announce-alert" id="id160">dht_announce_alert</a></li>
|
||||
<li><a class="reference internal" href="#dht-get-peers-alert" id="id161">dht_get_peers_alert</a></li>
|
||||
<li><a class="reference internal" href="#dispatcher" id="id162">dispatcher</a></li>
|
||||
<li><a class="reference internal" href="#state-changed-alert" id="id151">state_changed_alert</a></li>
|
||||
<li><a class="reference internal" href="#metadata-failed-alert" id="id152">metadata_failed_alert</a></li>
|
||||
<li><a class="reference internal" href="#metadata-received-alert" id="id153">metadata_received_alert</a></li>
|
||||
<li><a class="reference internal" href="#fastresume-rejected-alert" id="id154">fastresume_rejected_alert</a></li>
|
||||
<li><a class="reference internal" href="#peer-blocked-alert" id="id155">peer_blocked_alert</a></li>
|
||||
<li><a class="reference internal" href="#storage-moved-alert" id="id156">storage_moved_alert</a></li>
|
||||
<li><a class="reference internal" href="#torrent-paused-alert" id="id157">torrent_paused_alert</a></li>
|
||||
<li><a class="reference internal" href="#torrent-resumed-alert" id="id158">torrent_resumed_alert</a></li>
|
||||
<li><a class="reference internal" href="#save-resume-data-alert" id="id159">save_resume_data_alert</a></li>
|
||||
<li><a class="reference internal" href="#save-resume-data-failed-alert" id="id160">save_resume_data_failed_alert</a></li>
|
||||
<li><a class="reference internal" href="#dht-announce-alert" id="id161">dht_announce_alert</a></li>
|
||||
<li><a class="reference internal" href="#dht-get-peers-alert" id="id162">dht_get_peers_alert</a></li>
|
||||
<li><a class="reference internal" href="#dispatcher" id="id163">dispatcher</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#exceptions" id="id163">exceptions</a><ul>
|
||||
<li><a class="reference internal" href="#invalid-handle" id="id164">invalid_handle</a></li>
|
||||
<li><a class="reference internal" href="#duplicate-torrent" id="id165">duplicate_torrent</a></li>
|
||||
<li><a class="reference internal" href="#invalid-encoding" id="id166">invalid_encoding</a></li>
|
||||
<li><a class="reference internal" href="#type-error" id="id167">type_error</a></li>
|
||||
<li><a class="reference internal" href="#invalid-torrent-file" id="id168">invalid_torrent_file</a></li>
|
||||
<li><a class="reference internal" href="#exceptions" id="id164">exceptions</a><ul>
|
||||
<li><a class="reference internal" href="#invalid-handle" id="id165">invalid_handle</a></li>
|
||||
<li><a class="reference internal" href="#duplicate-torrent" id="id166">duplicate_torrent</a></li>
|
||||
<li><a class="reference internal" href="#invalid-encoding" id="id167">invalid_encoding</a></li>
|
||||
<li><a class="reference internal" href="#type-error" id="id168">type_error</a></li>
|
||||
<li><a class="reference internal" href="#invalid-torrent-file" id="id169">invalid_torrent_file</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#storage-interface" id="id169">storage_interface</a><ul>
|
||||
<li><a class="reference internal" href="#initialize" id="id170">initialize()</a></li>
|
||||
<li><a class="reference internal" href="#read" id="id171">read()</a></li>
|
||||
<li><a class="reference internal" href="#write" id="id172">write()</a></li>
|
||||
<li><a class="reference internal" href="#id12" id="id173">move_storage()</a></li>
|
||||
<li><a class="reference internal" href="#verify-resume-data" id="id174">verify_resume_data()</a></li>
|
||||
<li><a class="reference internal" href="#write-resume-data" id="id175">write_resume_data()</a></li>
|
||||
<li><a class="reference internal" href="#move-slot" id="id176">move_slot()</a></li>
|
||||
<li><a class="reference internal" href="#swap-slots" id="id177">swap_slots()</a></li>
|
||||
<li><a class="reference internal" href="#swap-slots3" id="id178">swap_slots3()</a></li>
|
||||
<li><a class="reference internal" href="#hash-for-slot" id="id179">hash_for_slot()</a></li>
|
||||
<li><a class="reference internal" href="#id13" id="id180">rename_file()</a></li>
|
||||
<li><a class="reference internal" href="#release-files" id="id181">release_files()</a></li>
|
||||
<li><a class="reference internal" href="#delete-files" id="id182">delete_files()</a></li>
|
||||
<li><a class="reference internal" href="#storage-interface" id="id170">storage_interface</a><ul>
|
||||
<li><a class="reference internal" href="#initialize" id="id171">initialize()</a></li>
|
||||
<li><a class="reference internal" href="#read" id="id172">read()</a></li>
|
||||
<li><a class="reference internal" href="#write" id="id173">write()</a></li>
|
||||
<li><a class="reference internal" href="#id12" id="id174">move_storage()</a></li>
|
||||
<li><a class="reference internal" href="#verify-resume-data" id="id175">verify_resume_data()</a></li>
|
||||
<li><a class="reference internal" href="#write-resume-data" id="id176">write_resume_data()</a></li>
|
||||
<li><a class="reference internal" href="#move-slot" id="id177">move_slot()</a></li>
|
||||
<li><a class="reference internal" href="#swap-slots" id="id178">swap_slots()</a></li>
|
||||
<li><a class="reference internal" href="#swap-slots3" id="id179">swap_slots3()</a></li>
|
||||
<li><a class="reference internal" href="#hash-for-slot" id="id180">hash_for_slot()</a></li>
|
||||
<li><a class="reference internal" href="#id13" id="id181">rename_file()</a></li>
|
||||
<li><a class="reference internal" href="#release-files" id="id182">release_files()</a></li>
|
||||
<li><a class="reference internal" href="#delete-files" id="id183">delete_files()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#magnet-links" id="id183">magnet links</a></li>
|
||||
<li><a class="reference internal" href="#queuing" id="id184">queuing</a><ul>
|
||||
<li><a class="reference internal" href="#downloading" id="id185">downloading</a></li>
|
||||
<li><a class="reference internal" href="#seeding" id="id186">seeding</a></li>
|
||||
<li><a class="reference internal" href="#magnet-links" id="id184">magnet links</a></li>
|
||||
<li><a class="reference internal" href="#queuing" id="id185">queuing</a><ul>
|
||||
<li><a class="reference internal" href="#downloading" id="id186">downloading</a></li>
|
||||
<li><a class="reference internal" href="#seeding" id="id187">seeding</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#fast-resume" id="id187">fast resume</a><ul>
|
||||
<li><a class="reference internal" href="#file-format" id="id188">file format</a></li>
|
||||
<li><a class="reference internal" href="#fast-resume" id="id188">fast resume</a><ul>
|
||||
<li><a class="reference internal" href="#file-format" id="id189">file format</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#threads" id="id189">threads</a></li>
|
||||
<li><a class="reference internal" href="#storage-allocation" id="id190">storage allocation</a><ul>
|
||||
<li><a class="reference internal" href="#sparse-allocation" id="id191">sparse allocation</a></li>
|
||||
<li><a class="reference internal" href="#full-allocation" id="id192">full allocation</a></li>
|
||||
<li><a class="reference internal" href="#compact-allocation" id="id193">compact allocation</a></li>
|
||||
<li><a class="reference internal" href="#threads" id="id190">threads</a></li>
|
||||
<li><a class="reference internal" href="#storage-allocation" id="id191">storage allocation</a><ul>
|
||||
<li><a class="reference internal" href="#sparse-allocation" id="id192">sparse allocation</a></li>
|
||||
<li><a class="reference internal" href="#full-allocation" id="id193">full allocation</a></li>
|
||||
<li><a class="reference internal" href="#compact-allocation" id="id194">compact allocation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#extensions" id="id194">extensions</a><ul>
|
||||
<li><a class="reference internal" href="#metadata-from-peers" id="id195">metadata from peers</a></li>
|
||||
<li><a class="reference internal" href="#http-seeding" id="id196">HTTP seeding</a></li>
|
||||
<li><a class="reference internal" href="#extensions" id="id195">extensions</a><ul>
|
||||
<li><a class="reference internal" href="#metadata-from-peers" id="id196">metadata from peers</a></li>
|
||||
<li><a class="reference internal" href="#http-seeding" id="id197">HTTP seeding</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#filename-checks" id="id197">filename checks</a></li>
|
||||
<li><a class="reference internal" href="#acknowledgments" id="id198">acknowledgments</a></li>
|
||||
<li><a class="reference internal" href="#filename-checks" id="id198">filename checks</a></li>
|
||||
<li><a class="reference internal" href="#acknowledgments" id="id199">acknowledgments</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="overview">
|
||||
|
@ -1360,6 +1361,7 @@ public:
|
|||
torrent_info(lazy_entry const& torrent_file);
|
||||
torrent_info(char const* buffer, int size);
|
||||
torrent_info(boost::filesystem::path const& filename);
|
||||
torrent_info(boost::filesystem::wpath const& filename);
|
||||
|
||||
void add_tracker(std::string const& url, int tier = 0);
|
||||
std::vector<announce_entry> const& trackers() const;
|
||||
|
@ -1417,6 +1419,7 @@ torrent_info(sha1_hash const& info_hash);
|
|||
torrent_info(lazy_entry const& torrent_file);
|
||||
torrent_info(char const* buffer, int size);
|
||||
torrent_info(boost::filesystem::path const& filename);
|
||||
torrent_info(boost::filesystem::wpath const& filename);
|
||||
</pre>
|
||||
</blockquote>
|
||||
<p>The constructor that takes an info-hash will initialize the info-hash to the given value,
|
||||
|
@ -1807,7 +1810,9 @@ struct torrent_handle
|
|||
|
||||
boost::filesystem::path save_path() const;
|
||||
void move_storage(boost::filesystem::path const& save_path) const;
|
||||
void move_storage(boost::filesystem::wpath const& save_path) const;
|
||||
void rename_file(int index, boost::filesystem::path) const;
|
||||
void rename_file(int index, boost::filesystem::wpath) const;
|
||||
storage_interface* get_storage_impl() const;
|
||||
|
||||
sha1_hash info_hash() const;
|
||||
|
@ -1919,6 +1924,7 @@ was started.</p>
|
|||
<blockquote>
|
||||
<pre class="literal-block">
|
||||
void move_storage(boost::filesystem::path const& save_path) const;
|
||||
void move_storage(boost::filesystem::wpath const& save_path) const;
|
||||
</pre>
|
||||
</blockquote>
|
||||
<p>Moves the file(s) that this torrent are currently seeding from or downloading to. If
|
||||
|
@ -1935,6 +1941,7 @@ path as the message.</p>
|
|||
<blockquote>
|
||||
<pre class="literal-block">
|
||||
void rename_file(int index, boost::filesystem::path) const;
|
||||
void rename_file(int index, boost::filesystem::wpath) const;
|
||||
</pre>
|
||||
</blockquote>
|
||||
<p>Renames the file with the given index asynchronously. The rename operation is complete
|
||||
|
@ -4331,6 +4338,20 @@ struct performance_alert: torrent_alert
|
|||
};
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="state-changed-alert">
|
||||
<h2>state_changed_alert</h2>
|
||||
<p>Generated whenever a torrent changes its state.</p>
|
||||
<pre class="literal-block">
|
||||
struct state_changed_alert: torrent_alert
|
||||
{
|
||||
// ...
|
||||
|
||||
torrent_status::state_t state;
|
||||
torrent_status::state_t prev_state;
|
||||
};
|
||||
</pre>
|
||||
<p><tt class="docutils literal"><span class="pre">state</span></tt> is the new state of the torrent. <tt class="docutils literal"><span class="pre">prev_state</span></tt> is the previous state.</p>
|
||||
</div>
|
||||
<div class="section" id="metadata-failed-alert">
|
||||
<h2>metadata_failed_alert</h2>
|
||||
<p>This alert is generated when the metadata has been completely received and the info-hash
|
||||
|
|
|
@ -56,8 +56,12 @@
|
|||
which is a python module that can be imported in a python program.</p>
|
||||
<div class="section" id="building-using-setup-py">
|
||||
<h2>building using setup.py</h2>
|
||||
<p>To set up the Python bindings for libtorrent, you must first have libtorrent
|
||||
built and installed on the system. See 'building libtorrent'_.</p>
|
||||
<p>There is a <tt class="docutils literal"><span class="pre">setup.py</span></tt> shipped with libtorrent that can be used on windows.
|
||||
On windows the setup.py will invoke <tt class="docutils literal"><span class="pre">bjam</span></tt> and assume that you have boost
|
||||
sources at <tt class="docutils literal"><span class="pre">$BOOST_PATH</span></tt>. The resulting executable is self-contained, it does
|
||||
not depend any boost or libtorrent dlls.</p>
|
||||
<p>On other systems, the setup.py is generated by running
|
||||
<tt class="docutils literal"><span class="pre">./configure</span> <span class="pre">--enable-python-binding</span></tt>.</p>
|
||||
<p>To build the Python bindings do:</p>
|
||||
<ol class="arabic">
|
||||
<li><p class="first">Run:</p>
|
||||
|
@ -71,9 +75,6 @@ python setup.py install
|
|||
</pre>
|
||||
</li>
|
||||
</ol>
|
||||
<p>This requires that you have built and install libtorrent first. The setup.py relies
|
||||
on pkg-config to be installed as well. It invokes pkg-config in order to link
|
||||
against libtorrent.</p>
|
||||
</div>
|
||||
<div class="section" id="building-using-boost-build">
|
||||
<h2>building using boost build</h2>
|
||||
|
|
Loading…
Reference in New Issue