diff --git a/include/libtorrent/alert.hpp b/include/libtorrent/alert.hpp index b43d17589..22156727e 100644 --- a/include/libtorrent/alert.hpp +++ b/include/libtorrent/alert.hpp @@ -101,6 +101,7 @@ namespace libtorrent { virtual int category() const = 0; #ifndef TORRENT_NO_DEPRECATE + TORRENT_DEPRECATED_PREFIX severity_t severity() const TORRENT_DEPRECATED { return warning; } #endif diff --git a/include/libtorrent/config.hpp b/include/libtorrent/config.hpp index fc20d59a7..029753191 100644 --- a/include/libtorrent/config.hpp +++ b/include/libtorrent/config.hpp @@ -77,10 +77,16 @@ POSSIBILITY OF SUCH DAMAGE. # define TORRENT_EXPORT # endif +#define TORRENT_DEPRECATED_PREFIX __declspec(deprecated("function is deprecated")) + #else # define TORRENT_EXPORT #endif +#ifndef TORRENT_DEPRECATED_PREFIX +#define TORRENT_DEPRECATED_PREFIX +#endif + #ifndef TORRENT_DEPRECATED #define TORRENT_DEPRECATED #endif diff --git a/include/libtorrent/session.hpp b/include/libtorrent/session.hpp index 3bb95d662..980d2de59 100644 --- a/include/libtorrent/session.hpp +++ b/include/libtorrent/session.hpp @@ -233,6 +233,7 @@ namespace libtorrent #ifndef TORRENT_NO_DEPRECATE // deprecated in 0.14 + TORRENT_DEPRECATED_PREFIX torrent_handle add_torrent( torrent_info const& ti , fs::path const& save_path @@ -242,6 +243,7 @@ namespace libtorrent , storage_constructor_type sc = default_storage_constructor) TORRENT_DEPRECATED; // deprecated in 0.14 + TORRENT_DEPRECATED_PREFIX torrent_handle add_torrent( boost::intrusive_ptr ti , fs::path const& save_path @@ -252,6 +254,7 @@ namespace libtorrent , void* userdata = 0) TORRENT_DEPRECATED; // deprecated in 0.14 + TORRENT_DEPRECATED_PREFIX torrent_handle add_torrent( char const* tracker_url , sha1_hash const& info_hash @@ -391,6 +394,7 @@ namespace libtorrent std::auto_ptr pop_alert(); #ifndef TORRENT_NO_DEPRECATE + TORRENT_DEPRECATED_PREFIX void set_severity_level(alert::severity_t s) TORRENT_DEPRECATED; #endif void set_alert_mask(int m); diff --git a/include/libtorrent/torrent_handle.hpp b/include/libtorrent/torrent_handle.hpp index 02411a2e2..bf2ebe722 100644 --- a/include/libtorrent/torrent_handle.hpp +++ b/include/libtorrent/torrent_handle.hpp @@ -385,6 +385,7 @@ 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& progress) const TORRENT_DEPRECATED; #endif #endif @@ -454,12 +455,17 @@ namespace libtorrent // deprecated in 0.13 // 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 const& pieces) const TORRENT_DEPRECATED; + TORRENT_DEPRECATED_PREFIX bool is_piece_filtered(int index) const TORRENT_DEPRECATED; + TORRENT_DEPRECATED_PREFIX std::vector filtered_pieces() const TORRENT_DEPRECATED; // marks the file with the given index as filtered // it will not be downloaded + TORRENT_DEPRECATED_PREFIX void filter_files(std::vector const& files) const TORRENT_DEPRECATED; // ================ end deprecation ============ @@ -489,6 +495,7 @@ namespace libtorrent // 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; #endif diff --git a/include/libtorrent/torrent_info.hpp b/include/libtorrent/torrent_info.hpp index 8b394856a..efeb7ee39 100644 --- a/include/libtorrent/torrent_info.hpp +++ b/include/libtorrent/torrent_info.hpp @@ -245,7 +245,9 @@ 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; // ------- end deprecation ------- #endif