mark up some more functions with override and silence a few more warnings in boost headers
This commit is contained in:
parent
74ee06bff7
commit
08e2bf7835
|
@ -201,10 +201,10 @@ namespace libtorrent
|
||||||
void add_ses_extension(boost::shared_ptr<plugin> ext);
|
void add_ses_extension(boost::shared_ptr<plugin> ext);
|
||||||
#endif
|
#endif
|
||||||
#if TORRENT_USE_ASSERTS
|
#if TORRENT_USE_ASSERTS
|
||||||
bool has_peer(peer_connection const* p) const;
|
bool has_peer(peer_connection const* p) const TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
bool any_torrent_has_peer(peer_connection const* p) const;
|
bool any_torrent_has_peer(peer_connection const* p) const TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
bool is_single_thread() const { return single_threaded::is_single_thread(); }
|
bool is_single_thread() const { return single_threaded::is_single_thread(); }
|
||||||
bool is_posting_torrent_updates() const { return m_posting_torrent_updates; }
|
bool is_posting_torrent_updates() const TORRENT_OVERRIDE TORRENT_FINAL { return m_posting_torrent_updates; }
|
||||||
// this is set while the session is building the
|
// this is set while the session is building the
|
||||||
// torrent status update message
|
// torrent status update message
|
||||||
bool m_posting_torrent_updates;
|
bool m_posting_torrent_updates;
|
||||||
|
@ -212,14 +212,15 @@ namespace libtorrent
|
||||||
|
|
||||||
void open_listen_port();
|
void open_listen_port();
|
||||||
|
|
||||||
torrent_peer_allocator_interface* get_peer_allocator() { return &m_peer_allocator; }
|
torrent_peer_allocator_interface* get_peer_allocator() TORRENT_OVERRIDE TORRENT_FINAL
|
||||||
|
{ return &m_peer_allocator; }
|
||||||
|
|
||||||
io_service& get_io_service() { return m_io_service; }
|
io_service& get_io_service() TORRENT_OVERRIDE TORRENT_FINAL { return m_io_service; }
|
||||||
resolver_interface& get_resolver() { return m_host_resolver; }
|
resolver_interface& get_resolver() TORRENT_OVERRIDE TORRENT_FINAL { return m_host_resolver; }
|
||||||
void async_resolve(std::string const& host, int flags
|
void async_resolve(std::string const& host, int flags
|
||||||
, callback_t const& h);
|
, callback_t const& h) TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
|
|
||||||
std::vector<torrent*>& torrent_list(int i)
|
std::vector<torrent*>& torrent_list(int i) TORRENT_OVERRIDE TORRENT_FINAL
|
||||||
{
|
{
|
||||||
TORRENT_ASSERT(i >= 0);
|
TORRENT_ASSERT(i >= 0);
|
||||||
TORRENT_ASSERT(i < session_interface::num_torrent_lists);
|
TORRENT_ASSERT(i < session_interface::num_torrent_lists);
|
||||||
|
@ -230,13 +231,13 @@ namespace libtorrent
|
||||||
// attempts, because this torrent needs more peers.
|
// attempts, because this torrent needs more peers.
|
||||||
// this is typically done when a torrent starts out and
|
// this is typically done when a torrent starts out and
|
||||||
// need the initial push to connect peers
|
// need the initial push to connect peers
|
||||||
void prioritize_connections(boost::weak_ptr<torrent> t);
|
void prioritize_connections(boost::weak_ptr<torrent> t) TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
|
|
||||||
// if we are listening on an IPv6 interface
|
// if we are listening on an IPv6 interface
|
||||||
// this will return one of the IPv6 addresses on this
|
// this will return one of the IPv6 addresses on this
|
||||||
// machine, otherwise just an empty endpoint
|
// machine, otherwise just an empty endpoint
|
||||||
tcp::endpoint get_ipv6_interface() const;
|
tcp::endpoint get_ipv6_interface() const TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
tcp::endpoint get_ipv4_interface() const;
|
tcp::endpoint get_ipv4_interface() const TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
|
|
||||||
void async_accept(boost::shared_ptr<tcp::acceptor> const& listener, bool ssl);
|
void async_accept(boost::shared_ptr<tcp::acceptor> const& listener, bool ssl);
|
||||||
void on_accept_connection(boost::shared_ptr<socket_type> const& s
|
void on_accept_connection(boost::shared_ptr<socket_type> const& s
|
||||||
|
@ -252,14 +253,14 @@ namespace libtorrent
|
||||||
void get_feeds(std::vector<feed_handle>* f) const;
|
void get_feeds(std::vector<feed_handle>* f) const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
boost::weak_ptr<torrent> find_torrent(sha1_hash const& info_hash) const;
|
boost::weak_ptr<torrent> find_torrent(sha1_hash const& info_hash) const TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
boost::weak_ptr<torrent> find_torrent(std::string const& uuid) const;
|
boost::weak_ptr<torrent> find_torrent(std::string const& uuid) const;
|
||||||
#ifndef TORRENT_DISABLE_MUTABLE_TORRENTS
|
#ifndef TORRENT_DISABLE_MUTABLE_TORRENTS
|
||||||
std::vector<boost::shared_ptr<torrent> > find_collection(
|
std::vector<boost::shared_ptr<torrent> > find_collection(
|
||||||
std::string const& collection) const;
|
std::string const& collection) const TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
#endif
|
#endif
|
||||||
boost::weak_ptr<torrent> find_disconnect_candidate_torrent() const;
|
boost::weak_ptr<torrent> find_disconnect_candidate_torrent() const TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
int num_torrents() const { return m_torrents.size(); }
|
int num_torrents() const TORRENT_OVERRIDE TORRENT_FINAL { return m_torrents.size(); }
|
||||||
|
|
||||||
void insert_torrent(sha1_hash const& ih, boost::shared_ptr<torrent> const& t
|
void insert_torrent(sha1_hash const& ih, boost::shared_ptr<torrent> const& t
|
||||||
, std::string uuid);
|
, std::string uuid);
|
||||||
|
@ -280,15 +281,15 @@ namespace libtorrent
|
||||||
|
|
||||||
void apply_settings_pack(boost::shared_ptr<settings_pack> pack);
|
void apply_settings_pack(boost::shared_ptr<settings_pack> pack);
|
||||||
void apply_settings_pack_impl(settings_pack const& pack);
|
void apply_settings_pack_impl(settings_pack const& pack);
|
||||||
session_settings const& settings() const { return m_settings; }
|
session_settings const& settings() const TORRENT_OVERRIDE TORRENT_FINAL { return m_settings; }
|
||||||
settings_pack get_settings() const;
|
settings_pack get_settings() const;
|
||||||
|
|
||||||
#ifndef TORRENT_DISABLE_DHT
|
#ifndef TORRENT_DISABLE_DHT
|
||||||
dht::dht_tracker* dht() { return m_dht.get(); }
|
dht::dht_tracker* dht() TORRENT_OVERRIDE TORRENT_FINAL { return m_dht.get(); }
|
||||||
bool announce_dht() const { return !m_listen_sockets.empty(); }
|
bool announce_dht() const TORRENT_OVERRIDE TORRENT_FINAL { return !m_listen_sockets.empty(); }
|
||||||
|
|
||||||
void add_dht_node_name(std::pair<std::string, int> const& node);
|
void add_dht_node_name(std::pair<std::string, int> const& node);
|
||||||
void add_dht_node(udp::endpoint n);
|
void add_dht_node(udp::endpoint n) TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
void add_dht_router(std::pair<std::string, int> const& node);
|
void add_dht_router(std::pair<std::string, int> const& node);
|
||||||
void set_dht_settings(dht_settings const& s);
|
void set_dht_settings(dht_settings const& s);
|
||||||
dht_settings const& get_dht_settings() const { return m_dht_settings; }
|
dht_settings const& get_dht_settings() const { return m_dht_settings; }
|
||||||
|
@ -296,12 +297,12 @@ namespace libtorrent
|
||||||
void start_dht();
|
void start_dht();
|
||||||
void stop_dht();
|
void stop_dht();
|
||||||
void start_dht(entry const& startup_state);
|
void start_dht(entry const& startup_state);
|
||||||
bool has_dht() const;
|
bool has_dht() const TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
|
|
||||||
// this is called for torrents when they are started
|
// this is called for torrents when they are started
|
||||||
// it will prioritize them for announcing to
|
// it will prioritize them for announcing to
|
||||||
// the DHT, to get the initial peers quickly
|
// the DHT, to get the initial peers quickly
|
||||||
void prioritize_dht(boost::weak_ptr<torrent> t);
|
void prioritize_dht(boost::weak_ptr<torrent> t) TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
|
|
||||||
void get_immutable_callback(sha1_hash target
|
void get_immutable_callback(sha1_hash target
|
||||||
, dht::item const& i);
|
, dht::item const& i);
|
||||||
|
@ -365,8 +366,8 @@ namespace libtorrent
|
||||||
ip_filter const& get_ip_filter();
|
ip_filter const& get_ip_filter();
|
||||||
|
|
||||||
void set_port_filter(port_filter const& f);
|
void set_port_filter(port_filter const& f);
|
||||||
port_filter const& get_port_filter() const TORRENT_OVERRIDE;
|
port_filter const& get_port_filter() const TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
void ban_ip(address addr) TORRENT_OVERRIDE;
|
void ban_ip(address addr) TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
|
|
||||||
void queue_tracker_request(tracker_request& req
|
void queue_tracker_request(tracker_request& req
|
||||||
, boost::weak_ptr<request_callback> c);
|
, boost::weak_ptr<request_callback> c);
|
||||||
|
@ -571,23 +572,23 @@ namespace libtorrent
|
||||||
|
|
||||||
// implements dht_observer
|
// implements dht_observer
|
||||||
virtual void set_external_address(address const& ip
|
virtual void set_external_address(address const& ip
|
||||||
, address const& source) TORRENT_OVERRIDE;
|
, address const& source) TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
virtual address external_address() TORRENT_OVERRIDE;
|
virtual address external_address() TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
virtual void get_peers(sha1_hash const& ih) TORRENT_OVERRIDE;
|
virtual void get_peers(sha1_hash const& ih) TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
virtual void announce(sha1_hash const& ih, address const& addr, int port) TORRENT_OVERRIDE;
|
virtual void announce(sha1_hash const& ih, address const& addr, int port) TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
virtual void outgoing_get_peers(sha1_hash const& target
|
virtual void outgoing_get_peers(sha1_hash const& target
|
||||||
, sha1_hash const& sent_target, udp::endpoint const& ep) TORRENT_OVERRIDE;
|
, sha1_hash const& sent_target, udp::endpoint const& ep) TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
virtual void log(libtorrent::dht::dht_logger::module_t m, char const* fmt, ...)
|
virtual void log(libtorrent::dht::dht_logger::module_t m, char const* fmt, ...)
|
||||||
TORRENT_OVERRIDE TORRENT_FORMAT(3,4);
|
TORRENT_OVERRIDE TORRENT_FINAL TORRENT_FORMAT(3,4);
|
||||||
virtual void log_packet(message_direction_t dir, char const* pkt, int len
|
virtual void log_packet(message_direction_t dir, char const* pkt, int len
|
||||||
, udp::endpoint node) TORRENT_OVERRIDE;
|
, udp::endpoint node) TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
|
|
||||||
virtual bool on_dht_request(char const* query, int query_len
|
virtual bool on_dht_request(char const* query, int query_len
|
||||||
, dht::msg const& request, entry& response);
|
, dht::msg const& request, entry& response);
|
||||||
|
|
||||||
void set_external_address(address const& ip
|
void set_external_address(address const& ip
|
||||||
, int source_type, address const& source);
|
, int source_type, address const& source);
|
||||||
virtual external_ip const& external_address() const TORRENT_OVERRIDE;
|
virtual external_ip const& external_address() const TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
|
|
||||||
// used when posting synchronous function
|
// used when posting synchronous function
|
||||||
// calls to session_impl and torrent objects
|
// calls to session_impl and torrent objects
|
||||||
|
@ -600,7 +601,7 @@ namespace libtorrent
|
||||||
|
|
||||||
// uncork all peers added to the delayed uncork queue
|
// uncork all peers added to the delayed uncork queue
|
||||||
// implements uncork_interface
|
// implements uncork_interface
|
||||||
virtual void do_delayed_uncork() TORRENT_OVERRIDE;
|
virtual void do_delayed_uncork() TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
|
|
||||||
void post_socket_job(socket_job& j);
|
void post_socket_job(socket_job& j);
|
||||||
|
|
||||||
|
@ -1134,8 +1135,8 @@ namespace libtorrent
|
||||||
boost::uint16_t m_tick_residual;
|
boost::uint16_t m_tick_residual;
|
||||||
|
|
||||||
#ifndef TORRENT_DISABLE_LOGGING
|
#ifndef TORRENT_DISABLE_LOGGING
|
||||||
virtual void session_log(char const* fmt, ...) const TORRENT_FORMAT(2,3);
|
virtual void session_log(char const* fmt, ...) const TORRENT_FORMAT(2,3) TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
virtual void session_vlog(char const* fmt, va_list& va) const TORRENT_FORMAT(2,0);
|
virtual void session_vlog(char const* fmt, va_list& va) const TORRENT_FORMAT(2,0) TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
|
|
||||||
// this list of tracker loggers serves as tracker_callbacks when
|
// this list of tracker loggers serves as tracker_callbacks when
|
||||||
// shutting down. This list is just here to keep them alive during
|
// shutting down. This list is just here to keep them alive during
|
||||||
|
@ -1145,8 +1146,8 @@ namespace libtorrent
|
||||||
|
|
||||||
// TODO: 2 the throttling of saving resume data could probably be
|
// TODO: 2 the throttling of saving resume data could probably be
|
||||||
// factored out into a separate class
|
// factored out into a separate class
|
||||||
void queue_async_resume_data(boost::shared_ptr<torrent> const& t);
|
virtual void queue_async_resume_data(boost::shared_ptr<torrent> const& t) TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
void done_async_resume();
|
virtual void done_async_resume() TORRENT_OVERRIDE TORRENT_FINAL;
|
||||||
void async_resume_dispatched();
|
void async_resume_dispatched();
|
||||||
|
|
||||||
// state for keeping track of external IPs
|
// state for keeping track of external IPs
|
||||||
|
|
|
@ -34,12 +34,17 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#define TORRENT_STRING_UTIL_HPP_INCLUDED
|
#define TORRENT_STRING_UTIL_HPP_INCLUDED
|
||||||
|
|
||||||
#include "libtorrent/config.hpp"
|
#include "libtorrent/config.hpp"
|
||||||
|
|
||||||
|
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <boost/cstdint.hpp>
|
#include <boost/cstdint.hpp>
|
||||||
#include <boost/limits.hpp>
|
#include <boost/limits.hpp>
|
||||||
#include <boost/array.hpp> // for boost::array
|
#include <boost/array.hpp> // for boost::array
|
||||||
|
|
||||||
|
#include "libtorrent/aux_/disable_warnings_pop.hpp"
|
||||||
|
|
||||||
namespace libtorrent
|
namespace libtorrent
|
||||||
{
|
{
|
||||||
TORRENT_EXTRA_EXPORT bool is_alpha(char c);
|
TORRENT_EXTRA_EXPORT bool is_alpha(char c);
|
||||||
|
|
|
@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "libtorrent/bencode.hpp"
|
#include "libtorrent/bencode.hpp"
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "libtorrent/hasher.hpp"
|
#include "libtorrent/hasher.hpp"
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
#include "libtorrent/hex.hpp" // from_hex
|
#include "libtorrent/hex.hpp" // from_hex
|
||||||
|
|
||||||
#include "test.hpp"
|
#include "test.hpp"
|
||||||
|
|
|
@ -36,12 +36,16 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "libtorrent/file.hpp"
|
#include "libtorrent/file.hpp"
|
||||||
#include "libtorrent/session_status.hpp"
|
#include "libtorrent/session_status.hpp"
|
||||||
#include "libtorrent/torrent_info.hpp"
|
#include "libtorrent/torrent_info.hpp"
|
||||||
#include <boost/bind.hpp>
|
|
||||||
#include <boost/tuple/tuple.hpp>
|
|
||||||
|
|
||||||
#include "test.hpp"
|
#include "test.hpp"
|
||||||
#include "test_utils.hpp"
|
#include "test_utils.hpp"
|
||||||
#include "setup_transfer.hpp"
|
#include "setup_transfer.hpp"
|
||||||
|
|
||||||
|
#include "libtorrent/aux_/disable_warnings_push.hpp"
|
||||||
|
|
||||||
|
#include <boost/bind.hpp>
|
||||||
|
#include <boost/tuple/tuple.hpp>
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <boost/asio/connect.hpp>
|
#include <boost/asio/connect.hpp>
|
||||||
|
@ -50,6 +54,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <boost/asio/ssl/error.hpp> // for asio::error::get_ssl_category()
|
#include <boost/asio/ssl/error.hpp> // for asio::error::get_ssl_category()
|
||||||
#include <boost/asio/ssl.hpp>
|
#include <boost/asio/ssl.hpp>
|
||||||
|
|
||||||
|
#include "libtorrent/aux_/disable_warnings_pop.hpp"
|
||||||
|
|
||||||
using namespace libtorrent;
|
using namespace libtorrent;
|
||||||
using boost::tuples::ignore;
|
using boost::tuples::ignore;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue