merged RC_1_1 into master

This commit is contained in:
arvidn 2017-03-19 12:58:55 -04:00
commit 64f5567cdd
12 changed files with 158 additions and 95 deletions

View File

@ -189,9 +189,6 @@ std::vector<libtorrent::dht_lookup> dht_active_requests;
std::vector<libtorrent::dht_routing_bucket> dht_routing_table;
#endif
torrent_view view;
session_view ses_view;
std::string to_hex(lt::sha1_hash const& s)
{
std::stringstream ret;
@ -844,7 +841,8 @@ int save_file(std::string const& filename, std::vector<char> const& v)
// returns true if the alert was handled (and should not be printed to the log)
// returns false if the alert was not handled
bool handle_alert(libtorrent::session& ses, libtorrent::alert* a
bool handle_alert(torrent_view& view, session_view& ses_view
, libtorrent::session& ses, libtorrent::alert* a
, handles_t& files, std::set<libtorrent::torrent_handle>& non_files)
{
using namespace libtorrent;
@ -1195,6 +1193,9 @@ int main(int argc, char* argv[])
using namespace libtorrent;
namespace lt = libtorrent;
torrent_view view;
session_view ses_view;
settings_pack settings;
settings.set_int(settings_pack::cache_size, cache_size);
settings.set_int(settings_pack::choking_algorithm, settings_pack::rate_based_choker);
@ -1775,7 +1776,7 @@ int main(int argc, char* argv[])
{
try
{
if (!::handle_alert(ses, *i, files, non_files))
if (!::handle_alert(view, ses_view, ses, *i, files, non_files))
{
// if we didn't handle the alert, print it to the log
std::string event_string;
@ -2138,7 +2139,7 @@ int main(int argc, char* argv[])
for (std::vector<alert*>::iterator i = alerts.begin()
, end(alerts.end()); i != end; ++i)
{
if (!::handle_alert(ses, *i, files, non_files))
if (!::handle_alert(view, ses_view, ses, *i, files, non_files))
{
// if we didn't handle the alert, print it to the log
std::string event_string;

View File

@ -79,8 +79,10 @@ namespace libtorrent
// new session. For serialization and deserialization of
// ``add_torrent_params`` objects, see read_resume_data() and
// write_resume_data().
#include "libtorrent/aux_/disable_warnings_push.hpp"
struct TORRENT_EXPORT add_torrent_params
{
#include "libtorrent/aux_/disable_warnings_pop.hpp"
// The constructor can be used to initialize the storage constructor,
// which determines the storage mechanism for the downloaded or seeding
// data for the torrent. For more information, see the ``storage`` field.
@ -192,7 +194,7 @@ namespace libtorrent
// indicates that this torrent should never be unloaded from RAM, even
// if unloading torrents are allowed in general. Setting this makes
// the torrent exempt from loading/unloading management.
flag_pinned = 0x1000,
flag_pinned TORRENT_DEPRECATED_ENUM = 0x1000,
#endif
// the stop when ready flag. Setting this flag is equivalent to calling
@ -231,7 +233,7 @@ namespace libtorrent
// resume data, which has its own flag (for historic reasons).
// If this flag is set, but file_priorities is empty, file priorities
// are still loaded from the resume data, if present.
flag_override_resume_data = 0x20000,
flag_override_resume_data TORRENT_DEPRECATED_ENUM = 0x20000,
// defaults to on and specifies whether tracker URLs loaded from
// resume data should be added to the trackers in the torrent or
@ -240,12 +242,12 @@ namespace libtorrent
// replaced by any trackers in the resume data. The default behavior is
// to have the resume data override the .torrent file _and_ the
// trackers added in add_torrent_params.
flag_merge_resume_trackers = 0x40000,
flag_merge_resume_trackers TORRENT_DEPRECATED_ENUM = 0x40000,
// if this flag is set, the save path from the resume data file, if
// present, is honored. This defaults to not being set, in which
// case the save_path specified in add_torrent_params is always used.
flag_use_resume_save_path = 0x80000,
flag_use_resume_save_path TORRENT_DEPRECATED_ENUM = 0x80000,
// defaults to on and specifies whether web seed URLs loaded from
// resume data should be added to the ones in the torrent file or
@ -255,9 +257,11 @@ namespace libtorrent
// add_torrent_params are also replaced. The default behavior is to
// have any web seeds in the resume data take precedence over whatever
// is passed in here as well as the .torrent file.
flag_merge_resume_http_seeds = 0x100000,
flag_merge_resume_http_seeds TORRENT_DEPRECATED_ENUM = 0x100000,
#endif
#include "libtorrent/aux_/disable_warnings_push.hpp"
// internal
default_flags = flag_update_subscribe
| flag_auto_managed | flag_paused | flag_apply_ip_filter
@ -267,6 +271,8 @@ namespace libtorrent
| flag_merge_resume_http_seeds
| flag_merge_resume_trackers
#endif
#include "libtorrent/aux_/disable_warnings_pop.hpp"
};
// filled in by the constructor and should be left untouched. It is used
@ -475,7 +481,7 @@ namespace libtorrent
// torrent is already running with the same UUID as the one being added,
// it will be considered a duplicate. This is mainly useful for RSS feed
// items which has UUIDs specified.
std::string uuid;
std::string TORRENT_DEPRECATED_MEMBER uuid;
// The optional parameter, ``resume_data`` can be given if up to date
// fast-resume data is available. The fast-resume data can be acquired
@ -483,7 +489,7 @@ namespace libtorrent
// torrent_handle. See fast-resume_. The ``vector`` that is passed in
// will be swapped into the running torrent instance with
// ``std::vector::swap()``.
std::vector<char> resume_data;
std::vector<char> TORRENT_DEPRECATED_MEMBER resume_data;
// to support the deprecated use case of reading the resume data into
// resume_data field and getting a reject alert, any parse failure is

View File

@ -81,7 +81,7 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
// only here for backwards compatibility
enum severity_t { debug, info, warning, critical, fatal, none };
enum TORRENT_DEPRECATED severity_t { debug, info, warning, critical, fatal, none };
#endif
// these are bits for the alert_mask used by the session. See
@ -146,7 +146,7 @@ namespace libtorrent
// Alerts on RSS related events, like feeds being updated, feed error
// conditions and successful RSS feed updates. Enabling this category
// will make you receive rss_alert alerts.
rss_notification = 0x1000,
rss_notification TORRENT_DEPRECATED_ENUM = 0x1000,
#endif
// Enables debug logging alerts. These are available unless libtorrent
@ -247,6 +247,8 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
#include "libtorrent/aux_/disable_warnings_push.hpp"
// 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.
@ -260,6 +262,8 @@ namespace libtorrent
virtual bool discardable_impl() const { return true; }
#include "libtorrent/aux_/disable_warnings_pop.hpp"
#endif // TORRENT_NO_DEPRECATE
private:

View File

@ -87,7 +87,7 @@ namespace libtorrent
char const* torrent_name() const;
#ifndef TORRENT_NO_DEPRECATE
std::string name;
std::string TORRENT_DEPRECATED_MEMBER name;
#endif
protected:
@ -141,7 +141,7 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
// The tracker URL
std::string url;
std::string TORRENT_DEPRECATED_MEMBER url;
#endif
private:
aux::allocation_slot const m_url_idx;
@ -260,7 +260,7 @@ namespace libtorrent
static const int static_category = alert::storage_notification;
virtual std::string message() const override;
#ifndef TORRENT_NO_DEPRECATE
std::string name;
std::string TORRENT_DEPRECATED_MEMBER name;
#endif
char const* new_name() const;
@ -435,7 +435,7 @@ namespace libtorrent
int const status_code;
error_code const error;
#ifndef TORRENT_NO_DEPRECATE
std::string msg;
std::string TORRENT_DEPRECATED_MEMBER msg;
#endif
// the message associated with this error
@ -461,7 +461,7 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
// contains the warning message from the tracker.
std::string msg;
std::string TORRENT_DEPRECATED_MEMBER msg;
#endif
// the message associated with this warning
@ -506,7 +506,7 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
// contains a message describing the error.
std::string msg;
std::string TORRENT_DEPRECATED_MEMBER msg;
#endif
// the error itself. This may indicate that the tracker sent an error
@ -659,7 +659,7 @@ namespace libtorrent
error_code const error;
#ifndef TORRENT_NO_DEPRECATE
std::string msg;
std::string TORRENT_DEPRECATED_MEMBER msg;
#endif
};
@ -707,7 +707,7 @@ namespace libtorrent
close_reason_t const reason;
#ifndef TORRENT_NO_DEPRECATE
std::string msg;
std::string TORRENT_DEPRECATED_MEMBER msg;
#endif
};
@ -841,7 +841,7 @@ namespace libtorrent
virtual std::string message() const override;
#ifndef TORRENT_NO_DEPRECATE
char const* peer_speedmsg;
char const* TORRENT_DEPRECATED_MEMBER peer_speedmsg;
#endif
int const block_index;
piece_index_t const piece_index;
@ -880,7 +880,7 @@ namespace libtorrent
virtual std::string message() const override;
#ifndef TORRENT_NO_DEPRECATE
std::string path;
std::string TORRENT_DEPRECATED_MEMBER path;
#endif
// the path the torrent was moved to
@ -908,7 +908,7 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
// If the error happened for a specific file, ``file`` is its path.
std::string file;
std::string TORRENT_DEPRECATED_MEMBER file;
#endif
// If the error happened for a specific file, this returns its path.
@ -965,7 +965,7 @@ namespace libtorrent
sha1_hash const info_hash;
#ifndef TORRENT_NO_DEPRECATE
std::string msg;
std::string TORRENT_DEPRECATED_MEMBER msg;
#endif
};
@ -1012,7 +1012,7 @@ namespace libtorrent
error_code const error;
#ifndef TORRENT_NO_DEPRECATE
std::string msg;
std::string TORRENT_DEPRECATED_MEMBER msg;
#endif
};
@ -1072,10 +1072,10 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
// the HTTP seed that failed
std::string url;
std::string TORRENT_DEPRECATED_MEMBER url;
// the error message, potentially from the server
std::string msg;
std::string TORRENT_DEPRECATED_MEMBER msg;
#endif
// the error the web seed encountered. If this is not set, the server
@ -1111,7 +1111,7 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
// the path to the file that was accessed when the error occurred.
std::string file;
std::string TORRENT_DEPRECATED_MEMBER file;
#endif
// the error code describing the error.
@ -1122,7 +1122,7 @@ namespace libtorrent
char const* filename() const;
#ifndef TORRENT_NO_DEPRECATE
std::string msg;
std::string TORRENT_DEPRECATED_MEMBER msg;
#endif
private:
aux::allocation_slot const m_file_idx;
@ -1386,7 +1386,7 @@ namespace libtorrent
// tells you what failed.
error_code const error;
#ifndef TORRENT_NO_DEPRECATE
std::string msg;
std::string TORRENT_DEPRECATED_MEMBER msg;
#endif
};
@ -1443,7 +1443,7 @@ namespace libtorrent
int const map_type;
#ifndef TORRENT_NO_DEPRECATE
std::string msg;
std::string TORRENT_DEPRECATED_MEMBER msg;
#endif
// the message associated with this log line
@ -1477,7 +1477,7 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
// If the error happened to a specific file, ``file`` is the path to it.
std::string file;
std::string TORRENT_DEPRECATED_MEMBER file;
#endif
// If the error happened to a specific file, this returns the path to it.
@ -1488,7 +1488,7 @@ namespace libtorrent
char const* operation;
#ifndef TORRENT_NO_DEPRECATE
std::string msg;
std::string TORRENT_DEPRECATED_MEMBER msg;
#endif
private:
aux::allocation_slot const m_path_idx;
@ -1586,16 +1586,16 @@ namespace libtorrent
download_protocol,
upload_ip_protocol,
#ifndef TORRENT_NO_DEPRECATE
upload_dht_protocol,
upload_tracker_protocol,
upload_dht_protocol TORRENT_DEPRECATED_ENUM,
upload_tracker_protocol TORRENT_DEPRECATED_ENUM,
#else
deprecated1,
deprecated2,
#endif
download_ip_protocol,
#ifndef TORRENT_NO_DEPRECATE
download_dht_protocol,
download_tracker_protocol,
download_dht_protocol TORRENT_DEPRECATED_ENUM,
download_tracker_protocol TORRENT_DEPRECATED_ENUM,
#else
deprecated3,
deprecated4,
@ -1687,7 +1687,7 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
// The tracker ID returned by the tracker
std::string trackerid;
std::string TORRENT_DEPRECATED_MEMBER trackerid;
#endif
// The tracker ID returned by the tracker
@ -1726,7 +1726,7 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
// the filename (or object) the error occurred on.
std::string error_file;
std::string TORRENT_DEPRECATED_MEMBER error_file;
#endif
// the filename (or object) the error occurred on.

View File

@ -529,8 +529,13 @@ namespace libtorrent
int rate_limit(peer_class_t c, int channel) const;
bool preemptive_unchoke() const override;
// deprecated, use stats counters ``num_peers_up_unchoked`` instead
int num_uploads() const override
{ return int(m_stats_counters[counters::num_peers_up_unchoked]); }
// deprecated, use stats counters ``num_peers_connected`` +
// ``num_peers_half_open`` instead.
int num_connections() const override { return int(m_connections.size()); }
int peak_up_rate() const { return m_peak_up_rate; }

View File

@ -63,9 +63,19 @@ POSSIBILITY OF SUCH DAMAGE.
#pragma GCC diagnostic ignored "-Wformat-extra-args"
#endif
// ====== CLANG ========
#if defined __clang__
# if !defined TORRENT_BUILDING_LIBRARY
// TODO: figure out which version of clang this is supported in
# define TORRENT_DEPRECATED_ENUM __attribute__ ((deprecated))
# define TORRENT_DEPRECATED_MEMBER __attribute__ ((deprecated))
# endif
// ======= GCC =========
#if defined __GNUC__
#elif defined __GNUC__
#ifdef _GLIBCXX_CONCEPT_CHECKS
#define TORRENT_COMPLETE_TYPES_REQUIRED 1
@ -78,6 +88,11 @@ POSSIBILITY OF SUCH DAMAGE.
# define TORRENT_DEPRECATED __attribute__ ((deprecated))
# endif
# if __GNUC__ >= 6 && !defined TORRENT_BUILDING_LIBRARY
# define TORRENT_DEPRECATED_ENUM __attribute__ ((deprecated))
# define TORRENT_DEPRECATED_MEMBER __attribute__ ((deprecated))
# endif
// ======= SUNPRO =========
#elif defined __SUNPRO_CC
@ -409,6 +424,14 @@ POSSIBILITY OF SUCH DAMAGE.
#define TORRENT_DEPRECATED
#endif
#ifndef TORRENT_DEPRECATED_ENUM
#define TORRENT_DEPRECATED_ENUM
#endif
#ifndef TORRENT_DEPRECATED_MEMBER
#define TORRENT_DEPRECATED_MEMBER
#endif
#ifndef TORRENT_USE_COMMONCRYPTO
#define TORRENT_USE_COMMONCRYPTO 0
#endif

View File

@ -108,7 +108,7 @@ namespace libtorrent
optimize_alignment = 1,
#ifndef TORRENT_NO_DEPRECATE
// same as optimize_alignment, for backwards compatibility
optimize = 1,
optimize TORRENT_DEPRECATED_ENUM = 1,
#endif
// This will create a merkle hash tree torrent. A merkle torrent cannot
@ -432,16 +432,16 @@ namespace libtorrent
// and pass in utf8 strings
#ifndef TORRENT_NO_DEPRECATE
TORRENT_DEPRECATED
TORRENT_EXPORT void add_files(file_storage& fs, std::wstring const& wfile
TORRENT_DEPRECATED_EXPORT
void add_files(file_storage& fs, std::wstring const& wfile
, std::function<bool(std::string)> p, std::uint32_t flags = 0);
TORRENT_DEPRECATED
TORRENT_EXPORT void add_files(file_storage& fs, std::wstring const& wfile
TORRENT_DEPRECATED_EXPORT
void add_files(file_storage& fs, std::wstring const& wfile
, std::uint32_t flags = 0);
TORRENT_DEPRECATED
TORRENT_EXPORT void set_piece_hashes(create_torrent& t, std::wstring const& p
TORRENT_DEPRECATED_EXPORT
void set_piece_hashes(create_torrent& t, std::wstring const& p
, std::function<void(int)> f, error_code& ec);
TORRENT_EXPORT void set_piece_hashes_deprecated(create_torrent& t

View File

@ -50,7 +50,7 @@ namespace libtorrent
{
#ifndef TORRENT_NO_DEPRECATE
// information about a file in a file_storage
struct TORRENT_EXPORT file_entry
struct TORRENT_DEPRECATED_EXPORT file_entry
{
// hidden
file_entry();

View File

@ -82,18 +82,14 @@ 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
TORRENT_EXPORT int lazy_bdecode(char const* start, char const* end
TORRENT_DEPRECATED_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);
#ifndef TORRENT_NO_DEPRECATE
// for backwards compatibility, does not report error code
// deprecated in 0.16
TORRENT_DEPRECATED
TORRENT_EXPORT int lazy_bdecode(char const* start, char const* end
TORRENT_DEPRECATED_EXPORT int lazy_bdecode(char const* start, char const* end
, lazy_entry& ret, int depth_limit = 1000, int item_limit = 1000000);
#endif
// this is a string that is not 0-terminated. Instead it
// comes with a length, specified in bytes. This is particularly
@ -102,7 +98,7 @@ namespace libtorrent
// would require copying the string.
//
// see lazy_entry::string_pstr().
struct TORRENT_EXPORT pascal_string
struct TORRENT_DEPRECATED_EXPORT pascal_string
{
// construct a string pointing to the characters at ``p``
// of length ``l`` characters. No 0-termination is required.
@ -137,7 +133,7 @@ namespace libtorrent
//
// There is also a ``none`` type, which is used for uninitialized
// lazy_entries.
struct TORRENT_EXPORT lazy_entry
struct TORRENT_DEPRECATED_EXPORT lazy_entry
{
// The different types a lazy_entry can have
enum entry_type_t
@ -390,7 +386,7 @@ namespace libtorrent
lazy_entry const& operator=(lazy_entry const&);
};
struct lazy_dict_entry
struct TORRENT_DEPRECATED lazy_dict_entry
{
char const* name;
lazy_entry val;
@ -398,11 +394,11 @@ namespace libtorrent
// print the bencoded structure in a human-readable format to a string
// that's returned.
TORRENT_DEPRECATED
TORRENT_EXPORT std::string print_entry(lazy_entry const& e
TORRENT_DEPRECATED_EXPORT std::string print_entry(lazy_entry const& e
, bool single_line = false, int indent = 0);
// defined in bdecode.cpp
TORRENT_DEPRECATED
TORRENT_EXTRA_EXPORT char const* parse_int(char const* start
, char const* end, char delimiter, std::int64_t& val
, bdecode_errors::error_code_enum& ec);

View File

@ -345,18 +345,42 @@ namespace libtorrent
num_ssl_http_proxy_peers,
num_ssl_utp_peers,
// the number of peer connections that are half-open (i.e. in the
// process of completing a connection attempt) and fully connected.
// These states are mutually exclusive (a connection cannot be in both
// states simultaneously).
num_peers_half_open,
num_peers_connected,
// the number of peers interested in us (``up_interested``) and peers
// we are interested in (``down_interested``).
num_peers_up_interested,
num_peers_down_interested,
// the total number of unchoked peers (``up_unchoked_all``), the number
// of peers unchoked via the optimistic unchoke
// (``up_unchoked_optimistic``) and peers unchoked via the
// reciprocation (regular) unchoke mechanism (``up_unchoked``).
// and the number of peers that have unchoked us (``down_unchoked).
num_peers_up_unchoked_all,
num_peers_up_unchoked_optimistic,
num_peers_up_unchoked,
num_peers_down_unchoked,
// the number of peers with at least one piece request pending,
// downloading (``down_requests``) or uploading (``up_requests``)
num_peers_up_requests,
num_peers_down_requests,
// the number of peers that have at least one outstanding disk request,
// either reading (``up_disk``) or writing (``down_disk``).
num_peers_up_disk,
num_peers_down_disk,
// the number of peers in end-game mode. End game mode is where there
// are no blocks that we have not sent any requests to download. In ths
// mode, blocks are allowed to be requested from more than one peer at
// at time.
num_peers_end_game,
write_cache_blocks,

View File

@ -106,13 +106,13 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
,
save_as_map = 0x040,
save_proxy = 0x008,
save_i2p_proxy = 0x010,
save_dht_proxy = save_proxy,
save_peer_proxy = save_proxy,
save_web_proxy = save_proxy,
save_tracker_proxy = save_proxy
save_as_map TORRENT_DEPRECATED_ENUM = 0x040,
save_proxy TORRENT_DEPRECATED_ENUM = 0x008,
save_i2p_proxy TORRENT_DEPRECATED_ENUM = 0x010,
save_dht_proxy TORRENT_DEPRECATED_ENUM = save_proxy,
save_peer_proxy TORRENT_DEPRECATED_ENUM = save_proxy,
save_web_proxy TORRENT_DEPRECATED_ENUM = save_proxy,
save_tracker_proxy TORRENT_DEPRECATED_ENUM = save_proxy
#endif
};
@ -712,8 +712,8 @@ namespace libtorrent
enum listen_on_flags_t
{
// this is always on starting with 0.16.2
listen_reuse_address = 0x01,
listen_no_system_port = 0x02
listen_reuse_address TORRENT_DEPRECATED_ENUM = 0x01,
listen_no_system_port TORRENT_DEPRECATED_ENUM = 0x02
};
// deprecated in 0.16
@ -934,9 +934,13 @@ namespace libtorrent
void set_alert_notify(std::function<void()> const& fun);
#ifndef TORRENT_NO_DEPRECATE
#include "libtorrent/aux_/disable_warnings_push.hpp"
TORRENT_DEPRECATED
void set_severity_level(alert::severity_t s);
#include "libtorrent/aux_/disable_warnings_pop.hpp"
// use the setting instead
TORRENT_DEPRECATED
size_t set_alert_queue_size_limit(size_t queue_size_limit_);

View File

@ -147,7 +147,7 @@ namespace libtorrent
//
// This feature requires the ``mmap`` system call, on systems that
// don't have ``mmap`` this setting is ignored.
mmap_cache,
mmap_cache TORRENT_DEPRECATED_ENUM,
#else
deprecated21,
#endif
@ -255,7 +255,7 @@ namespace libtorrent
// if set to true, upload, download and unchoke limits are ignored for
// peers on the local network. This option is *DEPRECATED*, please use
// set_peer_class_filter() instead.
ignore_limits_on_local_network,
ignore_limits_on_local_network TORRENT_DEPRECATED_ENUM,
#else
deprecated1,
#endif
@ -270,7 +270,7 @@ namespace libtorrent
// client is seed, a few bits will be set to 0, and later filled in
// with have messages. This is to prevent certain ISPs from stopping
// people from seeding.
lazy_bitfields,
lazy_bitfields TORRENT_DEPRECATED_ENUM,
#else
deprecated12,
#endif
@ -302,12 +302,12 @@ namespace libtorrent
// pieces.
use_read_cache,
#ifndef TORRENT_NO_DEPRECATE
use_write_cache,
use_write_cache TORRENT_DEPRECATED_ENUM,
// this will make the disk cache never flush a write piece if it would
// cause is to have to re-read it once we want to calculate the piece
// hash
dont_flush_write_cache,
dont_flush_write_cache TORRENT_DEPRECATED_ENUM,
#else
deprecated11,
deprecated22,
@ -379,7 +379,7 @@ namespace libtorrent
// will be locked in physical RAM, never to be swapped out. Every time
// a disk buffer is allocated and freed, there will be the extra
// overhead of a system call.
lock_disk_cache,
lock_disk_cache TORRENT_DEPRECATED_ENUM,
#else
deprecated10,
#endif
@ -405,7 +405,7 @@ namespace libtorrent
// overall responsiveness of the system while downloading in the
// background. For high-performance server setups, this might not be
// desirable.
low_prio_disk,
low_prio_disk TORRENT_DEPRECATED_ENUM,
#else
deprecated17,
#endif
@ -424,7 +424,7 @@ namespace libtorrent
// are sending to that peer. The intention is to optimize the RAM
// usage of the cache, to read ahead further for peers that you're
// sending faster to.
guided_read_cache,
guided_read_cache TORRENT_DEPRECATED_ENUM,
#else
deprecated13,
#endif
@ -488,7 +488,7 @@ namespace libtorrent
// if your network is faster than your disk, and it would be faster to
// redownload potentially missed pieces than to go through the whole
// storage to look for them.
ignore_resume_timestamps,
ignore_resume_timestamps TORRENT_DEPRECATED_ENUM,
#else
// hidden
deprecated8,
@ -526,7 +526,7 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
// set to true if uTP connections should be rate limited This option
// is *DEPRECATED*, please use set_peer_class_filter() instead.
rate_limit_utp,
rate_limit_utp TORRENT_DEPRECATED_ENUM,
#else
deprecated2,
#endif
@ -536,7 +536,7 @@ namespace libtorrent
// otherwise specified) will be set to the intermediate IP address if
// the user is double NATed. If the user is not double NATed, this
// option does not have an affect
announce_double_nat,
announce_double_nat TORRENT_DEPRECATED_ENUM,
#else
deprecated18,
#endif
@ -578,7 +578,7 @@ namespace libtorrent
// ``use_disk_read_ahead`` defaults to true and will attempt to
// optimize disk reads by giving the operating system heads up of disk
// read requests as they are queued in the disk job queue.
use_disk_read_ahead,
use_disk_read_ahead TORRENT_DEPRECATED_ENUM,
#else
deprecated19,
#endif
@ -603,7 +603,7 @@ namespace libtorrent
// higher performance. When this is enabled, it will only be used when
// seeding to peers, since that's when it provides performance
// improvements.
contiguous_recv_buffer,
contiguous_recv_buffer TORRENT_DEPRECATED_ENUM,
#else
deprecated15,
#endif
@ -1080,7 +1080,7 @@ namespace libtorrent
// unloading torrents is not enabled, this setting have no effect. If
// this limit is set to 0, it means unlimited. For more information,
// see dynamic-loading-of-torrent-files_.
active_loaded_limit,
active_loaded_limit TORRENT_DEPRECATED_ENUM,
#else
deprecated20,
#endif
@ -1167,7 +1167,7 @@ namespace libtorrent
// be useful for background tasks that doesn't matter if they take a
// bit longer, as long as they leave disk I/O time for other
// processes.
file_checks_delay_per_block,
file_checks_delay_per_block TORRENT_DEPRECATED_ENUM,
#else
deprecated23,
#endif
@ -1226,7 +1226,7 @@ namespace libtorrent
// bound on the time a cache line stays in the cache is an attempt
// to avoid swapping the same pieces in and out of the cache in case
// there is a shortage of spare cache space.
default_cache_min_age,
default_cache_min_age TORRENT_DEPRECATED_ENUM,
#else
deprecated16,
#endif
@ -1293,8 +1293,8 @@ namespace libtorrent
upload_rate_limit,
download_rate_limit,
#ifndef TORRENT_NO_DEPRECATE
local_upload_rate_limit,
local_download_rate_limit,
local_upload_rate_limit TORRENT_DEPRECATED_ENUM,
local_download_rate_limit TORRENT_DEPRECATED_ENUM,
#else
deprecated3,
deprecated4,
@ -1305,7 +1305,7 @@ namespace libtorrent
// specified in bytes per second and defaults to 4000. For busy boxes
// with lots of torrents that requires more DHT traffic, this should
// be raised.
dht_upload_rate_limit,
dht_upload_rate_limit TORRENT_DEPRECATED_ENUM,
#else
deprecated7,
#endif
@ -1327,7 +1327,7 @@ namespace libtorrent
// have no limit. When limiting the number of simultaneous connection
// attempts, peers will be put in a queue waiting for their turn to
// get connected.
half_open_limit,
half_open_limit TORRENT_DEPRECATED_ENUM,
#else
deprecated5,
#endif
@ -1384,7 +1384,7 @@ namespace libtorrent
utp_num_resends,
utp_connect_timeout,
#ifndef TORRENT_NO_DEPRECATE
utp_delayed_ack,
utp_delayed_ack TORRENT_DEPRECATED_ENUM,
#else
deprecated6,
#endif
@ -1439,7 +1439,7 @@ namespace libtorrent
// higher than the number of CPU cores would presumably not provide
// any benefit of setting it to the number of cores. If it's set to 0,
// hashing is done in the disk thread.
hashing_threads,
hashing_threads TORRENT_DEPRECATED_ENUM,
#else
deprecated14,
#endif
@ -1480,7 +1480,7 @@ namespace libtorrent
// opened on this port. This setting is only taken into account when
// opening the regular listen port, and won't re-open the listen
// socket simply by changing this setting.
ssl_listen,
ssl_listen TORRENT_DEPRECATED_ENUM,
#else
// hidden
deprecated9,
@ -1659,7 +1659,7 @@ namespace libtorrent
{
enable_os_cache = 0,
#ifndef TORRENT_NO_DEPRECATE
disable_os_cache_for_aligned_files = 2,
disable_os_cache_for_aligned_files TORRENT_DEPRECATED_ENUM = 2,
#else
deprecated = 1,
#endif