regenerated html
This commit is contained in:
parent
9effe8a54a
commit
6dc55bb77c
127
docs/manual.html
127
docs/manual.html
|
@ -226,46 +226,49 @@
|
|||
<li><a class="reference internal" href="#libtorrent-exception" id="id177">libtorrent_exception</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#error-code" id="id178">error_code</a></li>
|
||||
<li><a class="reference internal" href="#storage-interface" id="id179">storage_interface</a><ul>
|
||||
<li><a class="reference internal" href="#initialize" id="id180">initialize()</a></li>
|
||||
<li><a class="reference internal" href="#has-any-file" id="id181">has_any_file()</a></li>
|
||||
<li><a class="reference internal" href="#readv-writev" id="id182">readv() writev()</a></li>
|
||||
<li><a class="reference internal" href="#sparse-end" id="id183">sparse_end()</a></li>
|
||||
<li><a class="reference internal" href="#id12" id="id184">move_storage()</a></li>
|
||||
<li><a class="reference internal" href="#verify-resume-data" id="id185">verify_resume_data()</a></li>
|
||||
<li><a class="reference internal" href="#write-resume-data" id="id186">write_resume_data()</a></li>
|
||||
<li><a class="reference internal" href="#move-slot" id="id187">move_slot()</a></li>
|
||||
<li><a class="reference internal" href="#swap-slots" id="id188">swap_slots()</a></li>
|
||||
<li><a class="reference internal" href="#swap-slots3" id="id189">swap_slots3()</a></li>
|
||||
<li><a class="reference internal" href="#id13" id="id190">rename_file()</a></li>
|
||||
<li><a class="reference internal" href="#release-files" id="id191">release_files()</a></li>
|
||||
<li><a class="reference internal" href="#delete-files" id="id192">delete_files()</a></li>
|
||||
<li><a class="reference internal" href="#error-code" id="id178">error_code</a><ul>
|
||||
<li><a class="reference internal" href="#translating-error-codes" id="id179">translating error codes</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#magnet-links" id="id193">magnet links</a></li>
|
||||
<li><a class="reference internal" href="#queuing" id="id194">queuing</a><ul>
|
||||
<li><a class="reference internal" href="#downloading" id="id195">downloading</a></li>
|
||||
<li><a class="reference internal" href="#seeding" id="id196">seeding</a></li>
|
||||
<li><a class="reference internal" href="#storage-interface" id="id180">storage_interface</a><ul>
|
||||
<li><a class="reference internal" href="#initialize" id="id181">initialize()</a></li>
|
||||
<li><a class="reference internal" href="#has-any-file" id="id182">has_any_file()</a></li>
|
||||
<li><a class="reference internal" href="#readv-writev" id="id183">readv() writev()</a></li>
|
||||
<li><a class="reference internal" href="#sparse-end" id="id184">sparse_end()</a></li>
|
||||
<li><a class="reference internal" href="#id12" id="id185">move_storage()</a></li>
|
||||
<li><a class="reference internal" href="#verify-resume-data" id="id186">verify_resume_data()</a></li>
|
||||
<li><a class="reference internal" href="#write-resume-data" id="id187">write_resume_data()</a></li>
|
||||
<li><a class="reference internal" href="#move-slot" id="id188">move_slot()</a></li>
|
||||
<li><a class="reference internal" href="#swap-slots" id="id189">swap_slots()</a></li>
|
||||
<li><a class="reference internal" href="#swap-slots3" id="id190">swap_slots3()</a></li>
|
||||
<li><a class="reference internal" href="#id13" id="id191">rename_file()</a></li>
|
||||
<li><a class="reference internal" href="#release-files" id="id192">release_files()</a></li>
|
||||
<li><a class="reference internal" href="#delete-files" id="id193">delete_files()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#fast-resume" id="id197">fast resume</a><ul>
|
||||
<li><a class="reference internal" href="#file-format" id="id198">file format</a></li>
|
||||
<li><a class="reference internal" href="#magnet-links" id="id194">magnet links</a></li>
|
||||
<li><a class="reference internal" href="#queuing" id="id195">queuing</a><ul>
|
||||
<li><a class="reference internal" href="#downloading" id="id196">downloading</a></li>
|
||||
<li><a class="reference internal" href="#seeding" id="id197">seeding</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#threads" id="id199">threads</a></li>
|
||||
<li><a class="reference internal" href="#storage-allocation" id="id200">storage allocation</a><ul>
|
||||
<li><a class="reference internal" href="#sparse-allocation" id="id201">sparse allocation</a></li>
|
||||
<li><a class="reference internal" href="#full-allocation" id="id202">full allocation</a></li>
|
||||
<li><a class="reference internal" href="#compact-allocation" id="id203">compact allocation</a></li>
|
||||
<li><a class="reference internal" href="#fast-resume" id="id198">fast resume</a><ul>
|
||||
<li><a class="reference internal" href="#file-format" id="id199">file format</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#extensions" id="id204">extensions</a><ul>
|
||||
<li><a class="reference internal" href="#metadata-from-peers" id="id205">metadata from peers</a></li>
|
||||
<li><a class="reference internal" href="#http-seeding" id="id206">HTTP seeding</a></li>
|
||||
<li><a class="reference internal" href="#threads" id="id200">threads</a></li>
|
||||
<li><a class="reference internal" href="#storage-allocation" id="id201">storage allocation</a><ul>
|
||||
<li><a class="reference internal" href="#sparse-allocation" id="id202">sparse allocation</a></li>
|
||||
<li><a class="reference internal" href="#full-allocation" id="id203">full allocation</a></li>
|
||||
<li><a class="reference internal" href="#compact-allocation" id="id204">compact allocation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#filename-checks" id="id207">filename checks</a></li>
|
||||
<li><a class="reference internal" href="#extensions" id="id205">extensions</a><ul>
|
||||
<li><a class="reference internal" href="#metadata-from-peers" id="id206">metadata from peers</a></li>
|
||||
<li><a class="reference internal" href="#http-seeding" id="id207">HTTP seeding</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#filename-checks" id="id208">filename checks</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="overview">
|
||||
|
@ -3408,6 +3411,7 @@ struct session_settings
|
|||
int active_downloads;
|
||||
int active_seeds;
|
||||
int active_limit;
|
||||
bool auto_manage_prefer_seeds;
|
||||
bool dont_count_slow_torrents;
|
||||
int auto_manage_interval;
|
||||
float share_ratio_limit;
|
||||
|
@ -3652,6 +3656,8 @@ and <tt class="docutils literal"><span class="pre">active_seeds</span></tt> = 4,
|
|||
torrents active. Torrents that are not auto managed are also counted against these
|
||||
limits. If there are non-auto managed torrents that use up all the slots, no
|
||||
auto managed torrent will be activated.</p>
|
||||
<p><tt class="docutils literal"><span class="pre">auto_manage_prefer_seeds</span></tt> specifies if libtorrent should prefer giving seeds
|
||||
active slots or downloading torrents. The default is <tt class="docutils literal"><span class="pre">false</span></tt>.</p>
|
||||
<p>if <tt class="docutils literal"><span class="pre">dont_count_slow_torrents</span></tt> is true, torrents without any payload transfers are
|
||||
not subject to the <tt class="docutils literal"><span class="pre">active_seeds</span></tt> and <tt class="docutils literal"><span class="pre">active_downloads</span></tt> limits. This is intended
|
||||
to make it more likely to utilize all available bandwidth, and avoid having torrents
|
||||
|
@ -5126,9 +5132,70 @@ session</td>
|
|||
<td>missing_info_hash_in_uri</td>
|
||||
<td>The specified URI does not contain a valid info-hash</td>
|
||||
</tr>
|
||||
<tr><td>23</td>
|
||||
<td>file_too_short</td>
|
||||
<td>One of the files in the torrent was unexpectadly small. This
|
||||
might be caused by files being changed by an external process</td>
|
||||
</tr>
|
||||
<tr><td>24</td>
|
||||
<td>unsupported_url_protocol</td>
|
||||
<td>The URL used an unknown protocol. Currently <tt class="docutils literal"><span class="pre">http</span></tt> and
|
||||
<tt class="docutils literal"><span class="pre">https</span></tt> (if built with openssl support) are recognized. For
|
||||
trackers <tt class="docutils literal"><span class="pre">udp</span></tt> is recognized as well.</td>
|
||||
</tr>
|
||||
<tr><td>25</td>
|
||||
<td>url_parse_error</td>
|
||||
<td>The URL did not conform to URL syntax and failed to be parsed</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>The names of these error codes are declared in then <tt class="docutils literal"><span class="pre">libtorrent::errors</span></tt> namespace.</p>
|
||||
<div class="section" id="translating-error-codes">
|
||||
<h2>translating error codes</h2>
|
||||
<p>The error_code::message() function will typically return a localized error string,
|
||||
for system errors. That is, errors that belong to the generic or system category.</p>
|
||||
<p>Errors that belong to the libtorrent error category are not localized however, they
|
||||
are only available in english. In order to translate libtorrent errors, compare the
|
||||
error category of the <tt class="docutils literal"><span class="pre">error_code</span></tt> object against <tt class="docutils literal"><span class="pre">libtorrent::libtorrent_category</span></tt>,
|
||||
and if matches, you know the error code refers to the list above. You can provide
|
||||
your own mapping from error code to string, which is localized. In this case, you
|
||||
cannot rely on <tt class="docutils literal"><span class="pre">error_code::message()</span></tt> to generate your strings.</p>
|
||||
<p>The numeric values of the errors are part of the API and will stay the same, although
|
||||
new error codes may be appended at the end.</p>
|
||||
<p>Here's a simple example of how to translate error codes:</p>
|
||||
<pre class="literal-block">
|
||||
std::string error_code_to_string(boost::system::error_code const& ec)
|
||||
{
|
||||
if (ec.category() != libtorrent::libtorrent_category)
|
||||
{
|
||||
return ec.message();
|
||||
}
|
||||
// the error is a libtorrent error
|
||||
|
||||
int code = ec.value();
|
||||
static const char const* swedish[] =
|
||||
{
|
||||
"inget fel",
|
||||
"en fil i torrenten kolliderar med en fil från en annan torrent",
|
||||
"hash check misslyckades",
|
||||
"torrent filen är inte en dictionary",
|
||||
"'info'-nyckeln saknas eller är korrupt i torrentfilen",
|
||||
"'info'-fältet är inte en dictionary",
|
||||
"'piece length' fältet saknas eller är korrupt i torrentfilen",
|
||||
"torrentfilen saknar namnfältet",
|
||||
"ogiltigt namn i torrentfilen (kan vara en attack)",
|
||||
// ... more strings here
|
||||
};
|
||||
|
||||
// use the default error string in case we don't have it
|
||||
// in our translated list
|
||||
if (code < 0 || code >= sizeof(swedish)/sizeof(swedish[0]))
|
||||
return ec.message();
|
||||
|
||||
return swedish[code];
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="storage-interface">
|
||||
<h1>storage_interface</h1>
|
||||
|
|
|
@ -198,7 +198,8 @@ torrents with very large pieces.</p>
|
|||
<h2>reduce executable size</h2>
|
||||
<p>Compilers generally add a significant number of bytes to executables that make use
|
||||
of C++ exceptions. By disabling exceptions (-fno-exceptions on GCC), you can
|
||||
reduce the executable size with up to 45%.</p>
|
||||
reduce the executable size with up to 45%. In order to build without exception
|
||||
support, you need to patch parts of boost.</p>
|
||||
<p>Also make sure to optimize for size when compiling.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue