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.
-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.
-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.
--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.
-virtual void on_disconnect (error_code const& ec); +virtual void on_disconnect (error_code const& /ec/);
called when the peer is being disconnected.
-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 @@Table of contents
It is off by default.
+ ++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.
Declared in "libtorrent/session.hpp"
+name | +value | +description | +
---|---|---|
udp | +1 | ++ |
tcp | +2 | ++ |