improve deprecation macros. increase default warning level. fix deprecation warnings while building libtorrent itself (gcc and clang)

This commit is contained in:
Arvid Norberg 2015-04-17 01:49:49 +00:00
parent 1faf2e201f
commit 8ac5a32548
17 changed files with 339 additions and 303 deletions

View File

@ -743,6 +743,7 @@ lib torrent
: # default build
<link>static
<threading>multi
<warnings>all
: # usage requirements
$(usage-requirements)

View File

@ -257,10 +257,10 @@ namespace libtorrent {
// determines whether or not an alert is allowed to be discarded
// when the alert queue is full. There are a few alerts which may not be discared,
// since they would break the user contract, such as save_resume_data_alert.
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
virtual bool discardable() const TORRENT_DEPRECATED { return true; }
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
severity_t severity() const TORRENT_DEPRECATED { return warning; }
// returns a pointer to a copy of the alert.

View File

@ -1685,7 +1685,7 @@ namespace libtorrent
//
// This alert is only posted if the ``rss_notifications`` category is enabled
// in the alert_mask.
struct TORRENT_EXPORT rss_alert: alert
struct TORRENT_DEPRECATED TORRENT_EXPORT rss_alert: alert
{
// internal
rss_alert(aux::stack_allocator& alloc, feed_handle h

View File

@ -119,7 +119,7 @@ POSSIBILITY OF SUCH DAMAGE.
// '_vsnprintf': This function or variable may be unsafe
#pragma warning(disable:4996)
#define TORRENT_DEPRECATED_PREFIX __declspec(deprecated)
#define TORRENT_DEPRECATED __declspec(deprecated)
#endif
@ -462,18 +462,14 @@ int snprintf(char* buf, int len, char const* fmt, ...)
#define TORRENT_HAS_FALLOCATE 1
#endif
#ifndef TORRENT_DEPRECATED_PREFIX
#define TORRENT_DEPRECATED_PREFIX
#ifndef TORRENT_DEPRECATED
#define TORRENT_DEPRECATED
#endif
#ifndef TORRENT_USE_COMMONCRYPTO
#define TORRENT_USE_COMMONCRYPTO 0
#endif
#ifndef TORRENT_DEPRECATED
#define TORRENT_DEPRECATED
#endif
#ifndef TORRENT_HAVE_MMAP
#define TORRENT_HAVE_MMAP 0
#endif

View File

@ -445,21 +445,21 @@ namespace libtorrent
// and pass in utf8 strings
#ifndef TORRENT_NO_DEPRECATE
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
TORRENT_EXPORT void add_files(file_storage& fs, std::wstring const& wfile
, boost::function<bool(std::string)> p, boost::uint32_t flags = 0) TORRENT_DEPRECATED;
, boost::function<bool(std::string)> p, boost::uint32_t flags = 0);
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
TORRENT_EXPORT void add_files(file_storage& fs, std::wstring const& wfile
, boost::uint32_t flags = 0) TORRENT_DEPRECATED;
, boost::uint32_t flags = 0);
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
TORRENT_EXPORT void set_piece_hashes(create_torrent& t, std::wstring const& p
, boost::function<void(int)> f, error_code& ec) TORRENT_DEPRECATED;
, boost::function<void(int)> f, error_code& ec);
#ifndef BOOST_NO_EXCEPTIONS
template <class Fun>
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
void TORRENT_DEPRECATED set_piece_hashes(create_torrent& t, std::wstring const& p, Fun f)
{
error_code ec;
@ -467,7 +467,7 @@ namespace libtorrent
if (ec) throw libtorrent_exception(ec);
}
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
inline void TORRENT_DEPRECATED set_piece_hashes(create_torrent& t, std::wstring const& p)
{
error_code ec;
@ -476,7 +476,7 @@ namespace libtorrent
}
#endif
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
inline void TORRENT_DEPRECATED set_piece_hashes(create_torrent& t, std::wstring const& p, error_code& ec)
{
set_piece_hashes(t, p, detail::nop, ec);

View File

@ -59,9 +59,9 @@ namespace libtorrent
// is deprecated. It can be either be passed in the
// add_torrent_params::extensions field, or
// via torrent_handle::add_extension().
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
TORRENT_EXPORT boost::shared_ptr<torrent_plugin>
create_metadata_plugin(torrent*, void*) TORRENT_DEPRECATED;
create_metadata_plugin(torrent*, void*);
#endif
}
#endif

View File

@ -303,20 +303,20 @@ namespace libtorrent
void rename_file(int index, std::string const& new_filename);
#ifndef TORRENT_NO_DEPRECATE
TORRENT_DEPRECATED_PREFIX
void add_file(file_entry const& fe, char const* infohash = NULL) TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void add_file(file_entry const& fe, char const* infohash = NULL);
#if TORRENT_USE_WSTRING
// all wstring APIs are deprecated since 0.16.11
// instead, use the wchar -> utf8 conversion functions
// and pass in utf8 strings
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
void add_file(std::wstring const& p, boost::int64_t size, int flags = 0
, std::time_t mtime = 0, std::string const& s_p = "") TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void rename_file(int index, std::wstring const& new_filename) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void set_name(std::wstring const& n) TORRENT_DEPRECATED;
, std::time_t mtime = 0, std::string const& s_p = "");
TORRENT_DEPRECATED
void rename_file(int index, std::wstring const& new_filename);
TORRENT_DEPRECATED
void set_name(std::wstring const& n);
void rename_file_deprecated(int index, std::wstring const& new_filename);
#endif // TORRENT_USE_WSTRING
@ -343,30 +343,30 @@ namespace libtorrent
typedef std::vector<internal_file_entry>::const_iterator iterator;
typedef std::vector<internal_file_entry>::const_reverse_iterator reverse_iterator;
TORRENT_DEPRECATED_PREFIX
iterator file_at_offset(boost::int64_t offset) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
iterator file_at_offset(boost::int64_t offset) const;
TORRENT_DEPRECATED
iterator begin() const TORRENT_DEPRECATED { return m_files.begin(); }
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
iterator end() const TORRENT_DEPRECATED { return m_files.end(); }
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
reverse_iterator rbegin() const TORRENT_DEPRECATED { return m_files.rbegin(); }
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
reverse_iterator rend() const TORRENT_DEPRECATED { return m_files.rend(); }
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
internal_file_entry const& internal_at(int index) const TORRENT_DEPRECATED
{
TORRENT_ASSERT(index >= 0);
TORRENT_ASSERT(index < int(m_files.size()));
return m_files[index];
}
TORRENT_DEPRECATED_PREFIX
file_entry at(iterator i) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
file_entry at(iterator i) const;
// returns a file_entry with information about the file
// at ``index``. Index must be in the range [0, ``num_files()`` ).
TORRENT_DEPRECATED_PREFIX
file_entry at(int index) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
file_entry at(int index) const;
iterator begin_deprecated() const { return m_files.begin(); }
iterator end_deprecated() const { return m_files.end(); }
@ -524,34 +524,35 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
// deprecated in 1.1
TORRENT_DEPRECATED_PREFIX
boost::int64_t file_base(int index) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void set_file_base(int index, boost::int64_t off) TORRENT_DEPRECATED;
boost::int64_t file_base_deprecated(int index) const;
TORRENT_DEPRECATED
boost::int64_t file_base(int index) const;
TORRENT_DEPRECATED
void set_file_base(int index, boost::int64_t off);
// these were deprecated in 1.0. Use the versions that take an index instead
TORRENT_DEPRECATED_PREFIX
sha1_hash hash(internal_file_entry const& fe) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
std::string const& symlink(internal_file_entry const& fe) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
time_t mtime(internal_file_entry const& fe) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
int file_index(internal_file_entry const& fe) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
boost::int64_t file_base(internal_file_entry const& fe) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void set_file_base(internal_file_entry const& fe, boost::int64_t off) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
std::string file_path(internal_file_entry const& fe, std::string const& save_path = "") const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
std::string file_name(internal_file_entry const& fe) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
boost::int64_t file_size(internal_file_entry const& fe) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
bool pad_file_at(internal_file_entry const& fe) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
boost::int64_t file_offset(internal_file_entry const& fe) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
sha1_hash hash(internal_file_entry const& fe) const;
TORRENT_DEPRECATED
std::string const& symlink(internal_file_entry const& fe) const;
TORRENT_DEPRECATED
time_t mtime(internal_file_entry const& fe) const;
TORRENT_DEPRECATED
int file_index(internal_file_entry const& fe) const;
TORRENT_DEPRECATED
boost::int64_t file_base(internal_file_entry const& fe) const;
TORRENT_DEPRECATED
void set_file_base(internal_file_entry const& fe, boost::int64_t off);
TORRENT_DEPRECATED
std::string file_path(internal_file_entry const& fe, std::string const& save_path = "") const;
TORRENT_DEPRECATED
std::string file_name(internal_file_entry const& fe) const;
TORRENT_DEPRECATED
boost::int64_t file_size(internal_file_entry const& fe) const;
TORRENT_DEPRECATED
bool pad_file_at(internal_file_entry const& fe) const;
TORRENT_DEPRECATED
boost::int64_t file_offset(internal_file_entry const& fe) const;
#endif
// if the backing buffer changed for this storage, this is the pointer

View File

@ -81,17 +81,17 @@ namespace libtorrent
// in case the function fails. ``error_pos`` is an optional pointer to an int,
// which will be set to the byte offset into the buffer where an error occurred,
// in case the function fails.
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
TORRENT_EXPORT int lazy_bdecode(char const* start, char const* end
, lazy_entry& ret, error_code& ec, int* error_pos = 0
, int depth_limit = 1000, int item_limit = 1000000) TORRENT_DEPRECATED;
, int depth_limit = 1000, int item_limit = 1000000);
#ifndef TORRENT_NO_DEPRECATE
// for backwards compatibility, does not report error code
// deprecated in 0.16
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
TORRENT_EXPORT int lazy_bdecode(char const* start, char const* end
, lazy_entry& ret, int depth_limit = 1000, int item_limit = 1000000) TORRENT_DEPRECATED;
, lazy_entry& ret, int depth_limit = 1000, int item_limit = 1000000);
#endif
// this is a string that is not NULL-terminated. Instead it
@ -397,15 +397,14 @@ namespace libtorrent
// print the bencoded structure in a human-readable format to a string
// that's returned.
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
TORRENT_EXPORT std::string print_entry(lazy_entry const& e
, bool single_line = false, int indent = 0) TORRENT_DEPRECATED;
, bool single_line = false, int indent = 0);
// defined in bdecode.cpp
TORRENT_DEPRECATED_PREFIX
TORRENT_EXTRA_EXPORT char const* parse_int(char const* start
, char const* end, char delimiter, boost::int64_t& val
, bdecode_errors::error_code_enum& ec) TORRENT_DEPRECATED;
, bdecode_errors::error_code_enum& ec);
}

View File

@ -54,24 +54,24 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
#ifndef BOOST_NO_EXCEPTIONS
// deprecated in 0.14
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
torrent_handle TORRENT_EXPORT add_magnet_uri(session& ses, std::string const& uri
, std::string const& save_path
, storage_mode_t storage_mode = storage_mode_sparse
, bool paused = false
, storage_constructor_type sc = default_storage_constructor
, void* userdata = 0) TORRENT_DEPRECATED;
, void* userdata = 0);
// deprecated in 0.16. Instead, pass in the magnet link as add_torrent_params::url
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
torrent_handle TORRENT_EXPORT add_magnet_uri(session& ses, std::string const& uri
, add_torrent_params p) TORRENT_DEPRECATED;
, add_torrent_params p);
#endif
// deprecated in 0.16. Instead, pass in the magnet link as add_torrent_params::url
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
torrent_handle TORRENT_EXPORT add_magnet_uri(session& ses, std::string const& uri
, add_torrent_params p, error_code& ec) TORRENT_DEPRECATED;
, add_torrent_params p, error_code& ec);
#endif

View File

@ -131,10 +131,10 @@ namespace libtorrent
TORRENT_EXPORT void high_performance_seed(settings_pack& set);
#ifndef TORRENT_NO_DEPRECATE
TORRENT_DEPRECATED_PREFIX
TORRENT_EXPORT session_settings min_memory_usage() TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
TORRENT_EXPORT session_settings high_performance_seed() TORRENT_DEPRECATED;
TORRENT_DEPRECATED
TORRENT_EXPORT session_settings min_memory_usage();
TORRENT_DEPRECATED
TORRENT_EXPORT session_settings high_performance_seed();
#endif
#ifndef TORRENT_CFG
@ -420,17 +420,17 @@ namespace libtorrent
#ifndef BOOST_NO_EXCEPTIONS
#ifndef TORRENT_NO_DEPRECATE
// deprecated in 0.14
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
torrent_handle add_torrent(
torrent_info const& ti
, std::string const& save_path
, entry const& resume_data = entry()
, storage_mode_t storage_mode = storage_mode_sparse
, bool paused = false
, storage_constructor_type sc = default_storage_constructor) TORRENT_DEPRECATED;
, storage_constructor_type sc = default_storage_constructor);
// deprecated in 0.14
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
torrent_handle add_torrent(
char const* tracker_url
, sha1_hash const& info_hash
@ -440,7 +440,7 @@ namespace libtorrent
, storage_mode_t storage_mode = storage_mode_sparse
, bool paused = false
, storage_constructor_type sc = default_storage_constructor
, void* userdata = 0) TORRENT_DEPRECATED;
, void* userdata = 0);
#endif
#endif
@ -500,21 +500,21 @@ namespace libtorrent
// deprecated in libtorrent 1.1, use performance_counters instead
// returns session wide-statistics and status. For more information, see
// the ``session_status`` struct.
TORRENT_DEPRECATED_PREFIX
session_status status() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
session_status status() const;
// deprecated in libtorrent 1.1
// fills out the supplied vector with information for each piece that is
// currently in the disk cache for the torrent with the specified
// info-hash (``ih``).
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
void get_cache_info(sha1_hash const& ih
, std::vector<cached_piece_info>& ret) const TORRENT_DEPRECATED;
, std::vector<cached_piece_info>& ret) const;
// Returns status of the disk cache for this session.
// For more information, see the cache_status type.
TORRENT_DEPRECATED_PREFIX
cache_status get_cache_status() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
cache_status get_cache_status() const;
#endif
enum { disk_cache_no_pieces = 1 };
@ -534,28 +534,28 @@ namespace libtorrent
// is a handle which is used to interact with the feed, things like
// forcing a refresh or querying for information about the items in the
// feed. For more information, see feed_handle.
TORRENT_DEPRECATED_PREFIX
feed_handle add_feed(feed_settings const& feed) TORRENT_DEPRECATED;
TORRENT_DEPRECATED
feed_handle add_feed(feed_settings const& feed);
// Removes a feed from being watched by the session. When this
// call returns, the feed handle is invalid and won't refer
// to any feed.
TORRENT_DEPRECATED_PREFIX
void remove_feed(feed_handle h) TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void remove_feed(feed_handle h);
// Returns a list of all RSS feeds that are being watched by the session.
TORRENT_DEPRECATED_PREFIX
void get_feeds(std::vector<feed_handle>& f) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void get_feeds(std::vector<feed_handle>& f) const;
// ``start_dht`` starts the dht node and makes the trackerless service
// available to torrents.
//
// ``stop_dht`` stops the dht node.
// deprecated. use settings_pack::enable_dht instead
TORRENT_DEPRECATED_PREFIX
void start_dht() TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void stop_dht() TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void start_dht();
TORRENT_DEPRECATED
void stop_dht();
#endif
// ``set_dht_settings`` sets some parameters availavle to the dht node.
@ -648,10 +648,10 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
// deprecated in 0.15
// use save_state and load_state instead
TORRENT_DEPRECATED_PREFIX
entry dht_state() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void start_dht(entry const& startup_state) TORRENT_DEPRECATED;
TORRENT_DEPRECATED
entry dht_state() const;
TORRENT_DEPRECATED
void start_dht(entry const& startup_state);
#endif
// This function adds an extension to this session. The argument is a
@ -718,31 +718,31 @@ namespace libtorrent
//
// .. _`MaxMind ASN database`: http://www.maxmind.com/app/asnum
// .. _`MaxMind GeoIP database`: http://www.maxmind.com/app/geolitecountry
TORRENT_DEPRECATED_PREFIX
void load_asnum_db(char const* file) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void load_country_db(char const* file) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
int as_for_ip(address const& addr) TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void load_asnum_db(char const* file);
TORRENT_DEPRECATED
void load_country_db(char const* file);
TORRENT_DEPRECATED
int as_for_ip(address const& addr);
#if TORRENT_USE_WSTRING
// all wstring APIs are deprecated since 0.16.11
// instead, use the wchar -> utf8 conversion functions
// and pass in utf8 strings
TORRENT_DEPRECATED_PREFIX
void load_country_db(wchar_t const* file) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void load_asnum_db(wchar_t const* file) TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void load_country_db(wchar_t const* file);
TORRENT_DEPRECATED
void load_asnum_db(wchar_t const* file);
#endif // TORRENT_USE_WSTRING
// deprecated in 0.15
// use load_state and save_state instead
TORRENT_DEPRECATED_PREFIX
void load_state(entry const& ses_state) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
entry state() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void load_state(entry const& ses_state);
TORRENT_DEPRECATED
entry state() const;
// deprecated in 1.1
TORRENT_DEPRECATED_PREFIX
void load_state(lazy_entry const& ses_state) TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void load_state(lazy_entry const& ses_state);
#endif // TORRENT_NO_DEPRECATE
// Sets a filter that will be used to reject and accept incoming as well
@ -764,8 +764,8 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
// deprecated in 1.1, use settings_pack::peer_fingerprint instead
TORRENT_DEPRECATED_PREFIX
void set_peer_id(peer_id const& pid) TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void set_peer_id(peer_id const& pid);
#endif
// returns the raw peer ID used by libtorrent. When anonymous mode is set
// the peer ID is randomized per peer.
@ -939,17 +939,17 @@ namespace libtorrent
// specify which interfaces to bind outgoing connections to
// This has been moved to a session setting
TORRENT_DEPRECATED_PREFIX
void use_interfaces(char const* interfaces) TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void use_interfaces(char const* interfaces);
// instead of using this, specify listen interface and port in
// the settings_pack::listen_interfaces setting
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
void listen_on(
std::pair<int, int> const& port_range
, error_code& ec
, const char* net_interface = 0
, int flags = 0) TORRENT_DEPRECATED;
, int flags = 0);
#endif
@ -990,16 +990,16 @@ namespace libtorrent
// Sets the session settings and the packet encryption settings
// respectively. See session_settings and pe_settings for more
// information on available options.
TORRENT_DEPRECATED_PREFIX
void set_settings(session_settings const& s) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
session_settings settings() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void set_settings(session_settings const& s);
TORRENT_DEPRECATED
session_settings settings() const;
// deprecated in libtorrent 1.1. use settings_pack instead
TORRENT_DEPRECATED_PREFIX
void set_pe_settings(pe_settings const& settings) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
pe_settings get_pe_settings() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void set_pe_settings(pe_settings const& settings);
TORRENT_DEPRECATED
pe_settings get_pe_settings() const;
#endif
// Applies the settings specified by the settings_pack ``s``. This is an
@ -1017,10 +1017,10 @@ namespace libtorrent
//
// .. _i2p: http://www.i2p2.de
TORRENT_DEPRECATED_PREFIX
void set_i2p_proxy(proxy_settings const& s) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
proxy_settings i2p_proxy() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void set_i2p_proxy(proxy_settings const& s);
TORRENT_DEPRECATED
proxy_settings i2p_proxy() const;
// These functions sets and queries the proxy settings to be used for the
// session.
@ -1031,77 +1031,77 @@ namespace libtorrent
// will flow without using any proxy. If you want to enforce using a
// proxy, even when the proxy doesn't work, enable anonymous_mode in
// session_settings.
TORRENT_DEPRECATED_PREFIX
void set_proxy(proxy_settings const& s) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
proxy_settings proxy() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void set_proxy(proxy_settings const& s);
TORRENT_DEPRECATED
proxy_settings proxy() const;
// deprecated in 0.16
// Get the number of uploads.
TORRENT_DEPRECATED_PREFIX
int num_uploads() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
int num_uploads() const;
// Get the number of connections. This number also contains the
// number of half open connections.
TORRENT_DEPRECATED_PREFIX
int num_connections() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
int num_connections() const;
// deprecated in 0.15.
TORRENT_DEPRECATED_PREFIX
void set_peer_proxy(proxy_settings const& s) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void set_web_seed_proxy(proxy_settings const& s) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void set_tracker_proxy(proxy_settings const& s) TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void set_peer_proxy(proxy_settings const& s);
TORRENT_DEPRECATED
void set_web_seed_proxy(proxy_settings const& s);
TORRENT_DEPRECATED
void set_tracker_proxy(proxy_settings const& s);
TORRENT_DEPRECATED_PREFIX
proxy_settings peer_proxy() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
proxy_settings web_seed_proxy() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
proxy_settings tracker_proxy() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
proxy_settings peer_proxy() const;
TORRENT_DEPRECATED
proxy_settings web_seed_proxy() const;
TORRENT_DEPRECATED
proxy_settings tracker_proxy() const;
TORRENT_DEPRECATED_PREFIX
void set_dht_proxy(proxy_settings const& s) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
proxy_settings dht_proxy() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void set_dht_proxy(proxy_settings const& s);
TORRENT_DEPRECATED
proxy_settings dht_proxy() const;
// deprecated in 0.16
TORRENT_DEPRECATED_PREFIX
int upload_rate_limit() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
int download_rate_limit() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
int local_upload_rate_limit() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
int local_download_rate_limit() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
int max_half_open_connections() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
int upload_rate_limit() const;
TORRENT_DEPRECATED
int download_rate_limit() const;
TORRENT_DEPRECATED
int local_upload_rate_limit() const;
TORRENT_DEPRECATED
int local_download_rate_limit() const;
TORRENT_DEPRECATED
int max_half_open_connections() const;
TORRENT_DEPRECATED_PREFIX
void set_local_upload_rate_limit(int bytes_per_second) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void set_local_download_rate_limit(int bytes_per_second) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void set_upload_rate_limit(int bytes_per_second) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void set_download_rate_limit(int bytes_per_second) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void set_max_uploads(int limit) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void set_max_connections(int limit) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void set_max_half_open_connections(int limit) TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void set_local_upload_rate_limit(int bytes_per_second);
TORRENT_DEPRECATED
void set_local_download_rate_limit(int bytes_per_second);
TORRENT_DEPRECATED
void set_upload_rate_limit(int bytes_per_second);
TORRENT_DEPRECATED
void set_download_rate_limit(int bytes_per_second);
TORRENT_DEPRECATED
void set_max_uploads(int limit);
TORRENT_DEPRECATED
void set_max_connections(int limit);
TORRENT_DEPRECATED
void set_max_half_open_connections(int limit);
TORRENT_DEPRECATED_PREFIX
int max_connections() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
int max_uploads() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
int max_connections() const;
TORRENT_DEPRECATED
int max_uploads() const;
TORRENT_DEPRECATED_PREFIX
std::auto_ptr<alert> pop_alert() TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void pop_alerts(std::deque<alert*>* alerts) TORRENT_DEPRECATED;
TORRENT_DEPRECATED
std::auto_ptr<alert> pop_alert();
TORRENT_DEPRECATED
void pop_alerts(std::deque<alert*>* alerts);
#endif
@ -1161,12 +1161,12 @@ namespace libtorrent
void set_alert_notify(boost::function<void()> const& fun);
#ifndef TORRENT_NO_DEPRECATE
TORRENT_DEPRECATED_PREFIX
void set_severity_level(alert::severity_t s) TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void set_severity_level(alert::severity_t s);
// use the setting instead
TORRENT_DEPRECATED_PREFIX
size_t set_alert_queue_size_limit(size_t queue_size_limit_) TORRENT_DEPRECATED;
TORRENT_DEPRECATED
size_t set_alert_queue_size_limit(size_t queue_size_limit_);
// Changes the mask of which alerts to receive. By default only errors
// are reported. ``m`` is a bitmask where each bit represents a category
@ -1175,10 +1175,10 @@ namespace libtorrent
// ``get_alert_mask()`` returns the current mask;
//
// See category_t enum for options.
TORRENT_DEPRECATED_PREFIX
void set_alert_mask(boost::uint32_t m) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
boost::uint32_t get_alert_mask() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void set_alert_mask(boost::uint32_t m);
TORRENT_DEPRECATED
boost::uint32_t get_alert_mask() const;
// This sets a function to be called (from within libtorrent's netowrk
// thread) every time an alert is posted. Since the function (``fun``) is
@ -1188,19 +1188,19 @@ namespace libtorrent
// platform-dependent message queues or signalling systems. For instance,
// on windows, one could post a message to an HNWD or on linux, write to
// a pipe or an eventfd.
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
void set_alert_dispatch(
boost::function<void(std::auto_ptr<alert>)> const& fun) TORRENT_DEPRECATED;
boost::function<void(std::auto_ptr<alert>)> const& fun);
// Starts and stops Local Service Discovery. This service will broadcast
// the infohashes of all the non-private torrents on the local network to
// look for peers on the same swarm within multicast reach.
//
// deprecated. use settings_pack::enable_lsd instead
TORRENT_DEPRECATED_PREFIX
void start_lsd() TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void stop_lsd() TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void start_lsd();
TORRENT_DEPRECATED
void stop_lsd();
// Starts and stops the UPnP service. When started, the listen port and
// the DHT port are attempted to be forwarded on local UPnP router
@ -1212,10 +1212,10 @@ namespace libtorrent
// until ``stop_upnp()`` is called. See upnp-and-nat-pmp_.
//
// deprecated. use settings_pack::enable_upnp instead
TORRENT_DEPRECATED_PREFIX
void start_upnp() TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void stop_upnp() TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void start_upnp();
TORRENT_DEPRECATED
void stop_upnp();
// Starts and stops the NAT-PMP service. When started, the listen port
// and the DHT port are attempted to be forwarded on the router through
@ -1227,10 +1227,10 @@ namespace libtorrent
// valid until ``stop_natpmp()`` is called. See upnp-and-nat-pmp_.
//
// deprecated. use settings_pack::enable_natpmp instead
TORRENT_DEPRECATED_PREFIX
void start_natpmp() TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void stop_natpmp() TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void start_natpmp();
TORRENT_DEPRECATED
void stop_natpmp();
#endif
// protocols used by add_port_mapping()

View File

@ -89,11 +89,11 @@ namespace libtorrent {
#ifndef TORRENT_NO_DEPRECATE
TORRENT_DEPRECATED_PREFIX
time_point time_now() TORRENT_DEPRECATED;
TORRENT_DEPRECATED
time_point time_now();
TORRENT_DEPRECATED_PREFIX
time_point time_now_hires() TORRENT_DEPRECATED;
TORRENT_DEPRECATED
time_point time_now_hires();
inline time_point time_now()
{ return clock_type::now(); }
@ -101,7 +101,7 @@ namespace libtorrent {
inline time_point time_now_hires()
{ return clock_type::now(); }
typedef time_point ptime TORRENT_DEPRECATED;
typedef time_point ptime;
#endif

View File

@ -405,8 +405,8 @@ namespace libtorrent
// fills the specified vector with the download progress [0, 1]
// of each file in the torrent. The files are ordered as in
// the torrent_info.
TORRENT_DEPRECATED_PREFIX
void file_progress(std::vector<float>& progress) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void file_progress(std::vector<float>& progress) const;
#endif
#endif
@ -856,74 +856,74 @@ namespace libtorrent
// deprecated in 1.0
// use status() instead (with query_save_path)
TORRENT_DEPRECATED_PREFIX
std::string save_path() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
std::string save_path() const;
// deprecated in 1.0
// use status() instead (with query_name)
// returns the name of this torrent, in case it doesn't
// have metadata it returns the name assigned to it
// when it was added.
TORRENT_DEPRECATED_PREFIX
std::string name() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
std::string name() const;
// use torrent_file() instead
TORRENT_DEPRECATED_PREFIX
const torrent_info& get_torrent_info() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
const torrent_info& get_torrent_info() const;
// deprecated in 0.16, feature will be removed
TORRENT_DEPRECATED_PREFIX
int get_peer_upload_limit(tcp::endpoint ip) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
int get_peer_download_limit(tcp::endpoint ip) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void set_peer_upload_limit(tcp::endpoint ip, int limit) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void set_peer_download_limit(tcp::endpoint ip, int limit) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
int get_peer_upload_limit(tcp::endpoint ip) const;
TORRENT_DEPRECATED
int get_peer_download_limit(tcp::endpoint ip) const;
TORRENT_DEPRECATED
void set_peer_upload_limit(tcp::endpoint ip, int limit) const;
TORRENT_DEPRECATED
void set_peer_download_limit(tcp::endpoint ip, int limit) const;
// deprecated in 0.16, feature will be removed
TORRENT_DEPRECATED_PREFIX
void set_ratio(float up_down_ratio) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void set_ratio(float up_down_ratio) const;
// deprecated in 0.16. use status() instead
TORRENT_DEPRECATED_PREFIX
bool is_seed() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
bool is_finished() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
bool is_paused() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
bool is_auto_managed() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
bool is_sequential_download() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
bool has_metadata() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
bool super_seeding() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
bool is_seed() const;
TORRENT_DEPRECATED
bool is_finished() const;
TORRENT_DEPRECATED
bool is_paused() const;
TORRENT_DEPRECATED
bool is_auto_managed() const;
TORRENT_DEPRECATED
bool is_sequential_download() const;
TORRENT_DEPRECATED
bool has_metadata() const;
TORRENT_DEPRECATED
bool super_seeding() const;
// deprecated in 0.13
// all these are deprecated, use piece
// priority functions instead
// marks the piece with the given index as filtered
// it will not be downloaded
TORRENT_DEPRECATED_PREFIX
void filter_piece(int index, bool filter) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void filter_pieces(std::vector<bool> const& pieces) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
bool is_piece_filtered(int index) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
std::vector<bool> filtered_pieces() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void filter_piece(int index, bool filter) const;
TORRENT_DEPRECATED
void filter_pieces(std::vector<bool> const& pieces) const;
TORRENT_DEPRECATED
bool is_piece_filtered(int index) const;
TORRENT_DEPRECATED
std::vector<bool> filtered_pieces() const;
// marks the file with the given index as filtered
// it will not be downloaded
TORRENT_DEPRECATED_PREFIX
void filter_files(std::vector<bool> const& files) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void filter_files(std::vector<bool> const& files) const;
// deprecated in 0.14
// use save_resume_data() instead. It is async. and
// will return the resume data in an alert
TORRENT_DEPRECATED_PREFIX
entry write_resume_data() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
entry write_resume_data() const;
// ================ end deprecation ============
#endif
@ -1025,8 +1025,8 @@ namespace libtorrent
// This overrides the default announce interval, and no
// announce will take place until the given time has
// timed out.
TORRENT_DEPRECATED_PREFIX
void force_reannounce(boost::posix_time::time_duration) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void force_reannounce(boost::posix_time::time_duration) const;
#endif
// ``scrape_tracker()`` will send a scrape request to the tracker. A
@ -1196,10 +1196,10 @@ namespace libtorrent
// all wstring APIs are deprecated since 0.16.11
// instead, use the wchar -> utf8 conversion functions
// and pass in utf8 strings
TORRENT_DEPRECATED_PREFIX
void move_storage(std::wstring const& save_path, int flags = 0) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void rename_file(int index, std::wstring const& new_name) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void move_storage(std::wstring const& save_path, int flags = 0) const;
TORRENT_DEPRECATED
void rename_file(int index, std::wstring const& new_name) const;
#endif // TORRENT_USE_WSTRING
#endif // TORRENT_NO_DEPRECATE

View File

@ -195,7 +195,7 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
// deprecated in 1.0
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
bool will_announce(time_point now) const TORRENT_DEPRECATED
{
return now <= next_announce
@ -313,8 +313,8 @@ namespace libtorrent
#if TORRENT_USE_WSTRING
// all wstring APIs are deprecated since 0.16.11 instead, use the wchar
// -> utf8 conversion functions and pass in utf8 strings
TORRENT_DEPRECATED_PREFIX
torrent_info(std::wstring const& filename, int flags = 0) TORRENT_DEPRECATED;
TORRENT_DEPRECATED
torrent_info(std::wstring const& filename, int flags = 0);
#endif // TORRENT_USE_WSTRING
#endif // TORRENT_NO_DEPRECATE
#endif // BOOST_NO_EXCEPTIONS
@ -324,17 +324,17 @@ namespace libtorrent
torrent_info(char const* buffer, int size, error_code& ec, int flags = 0);
torrent_info(std::string const& filename, error_code& ec, int flags = 0);
#ifndef TORRENT_NO_DEPRECATE
TORRENT_DEPRECATED_PREFIX
torrent_info(lazy_entry const& torrent_file, int flags = 0) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
torrent_info(lazy_entry const& torrent_file, int flags = 0);
TORRENT_DEPRECATED
torrent_info(lazy_entry const& torrent_file, error_code& ec
, int flags = 0) TORRENT_DEPRECATED;
, int flags = 0);
#if TORRENT_USE_WSTRING
// all wstring APIs are deprecated since 0.16.11 instead, use the wchar
// -> utf8 conversion functions and pass in utf8 strings
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
torrent_info(std::wstring const& filename, error_code& ec
, int flags = 0) TORRENT_DEPRECATED;
, int flags = 0);
#endif // TORRENT_USE_WSTRING
#endif // TORRENT_NO_DEPRECATE
@ -387,8 +387,8 @@ namespace libtorrent
// all wstring APIs are deprecated since 0.16.11
// instead, use the wchar -> utf8 conversion functions
// and pass in utf8 strings
TORRENT_DEPRECATED_PREFIX
void rename_file(int index, std::wstring const& new_filename) TORRENT_DEPRECATED;
TORRENT_DEPRECATED
void rename_file(int index, std::wstring const& new_filename);
#endif // TORRENT_USE_WSTRING
#endif // TORRENT_NO_DEPRECATE
@ -425,15 +425,15 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
// deprecated in 0.16. Use web_seeds() instead
TORRENT_DEPRECATED_PREFIX
std::vector<std::string> url_seeds() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
std::vector<std::string> http_seeds() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
std::vector<std::string> url_seeds() const;
TORRENT_DEPRECATED
std::vector<std::string> http_seeds() const;
// deprecated in 1.1
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
bool parse_info_section(lazy_entry const& e, error_code& ec
, int flags) TORRENT_DEPRECATED;
, int flags);
#endif // TORRENT_NO_DEPRECATE
// ``web_seeds()`` returns all url seeds and http seeds in the torrent.
@ -493,19 +493,19 @@ namespace libtorrent
// You can resolve it into the public representation of a file
// (``file_entry``) using the ``file_storage::at`` function, which takes
// an index and an iterator.
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
file_iterator begin_files() const TORRENT_DEPRECATED { return m_files.begin_deprecated(); }
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
file_iterator end_files() const TORRENT_DEPRECATED { return m_files.end_deprecated(); }
reverse_file_iterator rbegin_files() const TORRENT_DEPRECATED { return m_files.rbegin_deprecated(); }
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
reverse_file_iterator rend_files() const TORRENT_DEPRECATED { return m_files.rend_deprecated(); }
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
file_iterator file_at_offset(boost::int64_t offset) const TORRENT_DEPRECATED
{ return m_files.file_at_offset_deprecated(offset); }
TORRENT_DEPRECATED_PREFIX
TORRENT_DEPRECATED
file_entry file_at(int index) const TORRENT_DEPRECATED{ return m_files.at(index); }
#endif // TORRENT_NO_DEPRECATE
@ -543,10 +543,10 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
// ------- start deprecation -------
// these functions will be removed in a future version
TORRENT_DEPRECATED_PREFIX
torrent_info(entry const& torrent_file) TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
void print(std::ostream& os) const TORRENT_DEPRECATED;
TORRENT_DEPRECATED
torrent_info(entry const& torrent_file);
TORRENT_DEPRECATED
void print(std::ostream& os) const;
// ------- end deprecation -------
#endif

View File

@ -12,6 +12,9 @@
// only define BOOST_ASIO_DECL if it hasn't already been defined
// or if it has been defined to an empty string
#if TORRENT_HAS_ASIO_DECL == x
#ifdef BOOST_ASIO_DECL
#undef BOOST_ASIO_DECL
#endif
#define BOOST_ASIO_DECL BOOST_SYMBOL_EXPORT
#endif

View File

@ -439,7 +439,7 @@ namespace libtorrent
f.file_index = file_iter - m_files.begin();
f.offset = file_offset
#ifndef TORRENT_NO_DEPRECATE
+ file_base(f.file_index)
+ file_base_deprecated(f.file_index)
#endif
;
f.size = (std::min)(boost::uint64_t(file_iter->size) - file_offset, boost::uint64_t(size));
@ -804,6 +804,12 @@ namespace libtorrent
m_file_base[index] = off;
}
boost::int64_t file_storage::file_base_deprecated(int index) const
{
if (index >= int(m_file_base.size())) return 0;
return m_file_base[index];
}
boost::int64_t file_storage::file_base(int index) const
{
if (index >= int(m_file_base.size())) return 0;

View File

@ -338,6 +338,12 @@ void feed::on_feed(error_code const& ec
// TORRENT_ASSERT(m_updating);
m_updating = false;
// rss_alert is deprecated, and so is all of this code.
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
if (ec && ec != asio::error::eof)
{
++m_failures;
@ -362,6 +368,10 @@ void feed::on_feed(error_code const& ec
return;
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
m_failures = 0;
char* buf = const_cast<char*>(data);
@ -388,6 +398,12 @@ void feed::on_feed(error_code const& ec
m_last_update = now;
// rss_alert is deprecated, and so is all of this code.
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
// report that we successfully updated the feed
if (m_ses.m_alerts.should_post<rss_alert>())
{
@ -395,6 +411,10 @@ void feed::on_feed(error_code const& ec
, rss_alert::state_updated, error_code());
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
// update m_ses.m_next_rss_update timestamps
// now that we have updated our timestamp
m_ses.update_rss_feeds();
@ -579,12 +599,22 @@ int feed::update_feed()
m_last_attempt = time(0);
m_last_update = 0;
// rss_alert is deprecated, and so is all of this code.
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
if (m_ses.m_alerts.should_post<rss_alert>())
{
m_ses.m_alerts.emplace_alert<rss_alert>(my_handle(), m_settings.url
, rss_alert::state_updating, error_code());
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
boost::shared_ptr<http_connection> feed(
new http_connection(m_ses.m_io_service
, m_ses.m_host_resolver

View File

@ -1236,7 +1236,7 @@ namespace libtorrent
boost::int64_t adjusted_offset =
#ifndef TORRENT_NO_DEPRECATE
files().file_base(file_index) +
files().file_base_deprecated(file_index) +
#endif
file_offset;