From b2825ca158ecea209298863224c09ef4c319242c Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 20 Jan 2014 04:57:25 +0000 Subject: [PATCH] regenerate documentation --- docs/gen_reference_doc.py | 2 ++ docs/reference-Core.html | 59 +++++++++++++++--------------- docs/reference-Error_Codes.html | 5 +++ docs/reference-Plugins.html | 8 ++--- docs/reference-Session.html | 63 ++++++++++++++++++++++++++++----- 5 files changed, 96 insertions(+), 41 deletions(-) diff --git a/docs/gen_reference_doc.py b/docs/gen_reference_doc.py index 9f804213c..909314f95 100644 --- a/docs/gen_reference_doc.py +++ b/docs/gen_reference_doc.py @@ -486,6 +486,8 @@ def consume_ifdef(lno, lines, warn_on_ifdefs = False): if l == '#ifndef TORRENT_NO_DEPRECATE' or \ l == '#ifdef TORRENT_DEBUG' or \ + (l.startswith('#if ') and ' TORRENT_USE_ASSERTS' in l) or \ + (l.startswith('#if ') and ' TORRENT_USE_INVARIANT_CHECKS' in l) or \ l == '#ifdef TORRENT_ASIO_DEBUGGING' or \ (l.startswith('#if') and 'defined TORRENT_DEBUG' in l) or \ (l.startswith('#if') and 'defined TORRENT_ASIO_DEBUGGING' in l): diff --git a/docs/reference-Core.html b/docs/reference-Core.html index ddae65b2d..d04f28cb0 100644 --- a/docs/reference-Core.html +++ b/docs/reference-Core.html @@ -1104,7 +1104,7 @@ struct torrent_handle , std::string const& dh_params , std::string const& passphrase = ""); storage_interface* get_storage_impl () const; - boost::intrusive_ptr<torrent_info> torrent_file () const; + boost::intrusive_ptr<torrent_info const> torrent_file () const; void use_interface (const char* net_interface) const; void piece_availability (std::vector<int>& avail) const; int piece_priority (int index) const; @@ -1115,9 +1115,8 @@ struct torrent_handle void prioritize_files (std::vector<int> const& files) const; void file_priority (int index, int priority) const; std::vector<int> file_priorities () const; - void force_reannounce () const; + void force_reannounce (int seconds = 0, int tracker_index = -1) const; void force_dht_announce () const; - void force_reannounce (boost::posix_time::time_duration) const; void scrape_tracker () const; int upload_limit () const; int download_limit () const; @@ -1700,14 +1699,15 @@ storage contructor function that was passed to add_torrent.

torrent_file()

-boost::intrusive_ptr<torrent_info> torrent_file () const;
+boost::intrusive_ptr<torrent_info const> torrent_file () const;
 
-

Returns a pointer to the torrent_info object associated with this torrent. The -torrent_info object is a copy of the internal object. If the torrent doesn't -have metadata, the object being returned will not be fully filled in. -The torrent may be in a state without metadata only if -it was started without a .torrent file, e.g. by using the libtorrent extension of -just supplying a tracker and info-hash.

+

Returns a pointer to the torrent_info object associated with this +torrent. The torrent_info object may be a copy of the internal object. +If the torrent doesn't have metadata, the pointer will not be +initialized (i.e. a NULL pointer). The torrent may be in a state +without metadata only if it was started without a .torrent file, e.g. +by using the libtorrent extension of just supplying a tracker and +info-hash.

use_interface()

@@ -1803,26 +1803,20 @@ have metadata or a torrent that is a seed. file_pri

force_reannounce() force_dht_announce()

-void force_reannounce () const;
+void force_reannounce (int seconds = 0, int tracker_index = -1) const;
 void force_dht_announce () const;
 
-

force_reannounce() will force this torrent to do another tracker request, to receive new -peers. The second overload of force_reannounce that takes a time_duration as -argument will schedule a reannounce in that amount of time from now.

-

If the tracker's min_interval has not passed since the last announce, the forced -announce will be scheduled to happen immediately as the min_interval expires. This is -to honor trackers minimum re-announce interval settings.

-

force_dht_announce will announce the torrent to the DHT immediately.

-
-
-

force_reannounce()

-
-void force_reannounce (boost::posix_time::time_duration) const;
-
-

forces a reannounce in the specified amount of time. -This overrides the default announce interval, and no -announce will take place until the given time has -timed out.

+

force_reannounce() will force this torrent to do another tracker +request, to receive new peers. The seconds argument specifies how +many seconds from now to issue the tracker announces.

+

If the tracker's min_interval has not passed since the last +announce, the forced announce will be scheduled to happen immediately +as the min_interval expires. This is to honor trackers minimum +re-announce interval settings.

+

The tracker_index argument specifies which tracker to re-announce. +If set to -1 (which is the default), all trackers are re-announce.

+

force_dht_announce will announce the torrent to the DHT +immediately.

scrape_tracker()

@@ -2259,7 +2253,7 @@ struct torrent_status int last_scrape; int sparse_regions; int priority; - boost::uint8_t state; + state_t state; bool need_save_resume; bool ip_filter_applies; bool upload_mode; @@ -2273,6 +2267,7 @@ struct torrent_status bool has_metadata; bool has_incoming; bool seed_mode; + bool moving_storage; sha1_hash info_hash; }; @@ -2744,6 +2739,12 @@ to this torrent. started in seed mode, it will leave seed mode once all pieces have been checked or as soon as one piece fails the hash check. +
+
moving_storage
+
this is true if this torrent's storage is currently being moved from +one location to another. This may potentially be a long operation +if a large file ends up being copied from one drive to another.
+
info_hash
the info-hash for this torrent
diff --git a/docs/reference-Error_Codes.html b/docs/reference-Error_Codes.html index cd5c08d3d..0c7bb0082 100644 --- a/docs/reference-Error_Codes.html +++ b/docs/reference-Error_Codes.html @@ -630,6 +630,11 @@ over SSL. The peer tried to connect to a torrent with a certificate for a different torrent. +not_an_ssl_torrent +113 +the torrent is not an SSL torrent, and the operation requires +an SSL torrent + unsupported_protocol_version 120 The NAT-PMP router responded with an unsupported protocol version diff --git a/docs/reference-Plugins.html b/docs/reference-Plugins.html index cb4fbfd1b..7b008d25c 100644 --- a/docs/reference-Plugins.html +++ b/docs/reference-Plugins.html @@ -354,7 +354,7 @@ struct peer_plugin { virtual char const* type () const; virtual void add_handshake (entry&); - virtual void on_disconnect (error_code const& ec); + virtual void on_disconnect (error_code const& /ec/); virtual void on_connected (); virtual bool on_handshake (char const* /reserved_bits/); virtual bool on_extension_handshake (lazy_entry const&); @@ -374,7 +374,7 @@ struct peer_plugin virtual bool on_suggest (int /index/); virtual bool on_cancel (peer_request const&); virtual bool on_dont_have (int /index/); - virtual bool can_disconnect (error_code const& ec); + virtual bool can_disconnect (error_code const& /ec/); virtual bool on_extended (int /length/, int /msg/, buffer::const_interval /body/); virtual bool on_unknown_message (int /length/, int /msg/, @@ -404,7 +404,7 @@ this is not called for web seeds

on_disconnect()

-virtual void on_disconnect (error_code const& ec);
+virtual void on_disconnect (error_code const& /ec/);
 

called when the peer is being disconnected.

@@ -482,7 +482,7 @@ handler.

can_disconnect()

-virtual bool can_disconnect (error_code const& ec);
+virtual bool can_disconnect (error_code const& /ec/);
 

called when libtorrent think this peer should be disconnected. if the plugin returns false, the peer will not be disconnected.

diff --git a/docs/reference-Session.html b/docs/reference-Session.html index 4940049d1..4502dd2de 100644 --- a/docs/reference-Session.html +++ b/docs/reference-Session.html @@ -55,14 +55,14 @@
@@ -630,6 +630,8 @@ class session: public boost::noncopyable void start_lsd (); void stop_upnp (); void start_upnp (); + void delete_port_mapping (int handle); + int add_port_mapping (protocol_type t, int external_port, int local_port); void stop_natpmp (); void start_natpmp (); @@ -660,6 +662,12 @@ class session: public boost::noncopyable add_default_plugins, start_default_features, }; + + enum protocol_type + { + udp, + tcp, + }; };
@@ -1267,6 +1275,18 @@ arbitrary port mappings. Mapping status is returned through the portmap_alert and the portmap_error_alert. The object will be valid until stop_upnp() is called. See upnp and nat pmp.

It is off by default.

+ +
+
+

add_port_mapping() delete_port_mapping()

+
+void delete_port_mapping (int handle);
+int add_port_mapping (protocol_type t, int external_port, int local_port);
+
+

add_port_mapping adds a port forwarding on UPnP and/or NAT-PMP, +whichever is enabled. The return value is a handle referring to +the port mapping that was just created. Pass it to delete_port_mapping() +to remove it.

@@ -1406,6 +1426,33 @@ arbitrary port mappings. Mapping status is returned through the +
+
+

enum protocol_type

+

Declared in "libtorrent/session.hpp"

+ +++++ + + + + + + + + + + + + + + + + +
namevaluedescription
udp1 
tcp2