forked from premiere/premiere-libtorrent
added support for deprecation warnings on windows
This commit is contained in:
parent
ab26b1a5ff
commit
4f4f96db5a
|
@ -101,6 +101,7 @@ namespace libtorrent {
|
||||||
virtual int category() const = 0;
|
virtual int category() const = 0;
|
||||||
|
|
||||||
#ifndef TORRENT_NO_DEPRECATE
|
#ifndef TORRENT_NO_DEPRECATE
|
||||||
|
TORRENT_DEPRECATED_PREFIX
|
||||||
severity_t severity() const TORRENT_DEPRECATED { return warning; }
|
severity_t severity() const TORRENT_DEPRECATED { return warning; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -77,10 +77,16 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
# define TORRENT_EXPORT
|
# define TORRENT_EXPORT
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
#define TORRENT_DEPRECATED_PREFIX __declspec(deprecated("function is deprecated"))
|
||||||
|
|
||||||
#else
|
#else
|
||||||
# define TORRENT_EXPORT
|
# define TORRENT_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef TORRENT_DEPRECATED_PREFIX
|
||||||
|
#define TORRENT_DEPRECATED_PREFIX
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef TORRENT_DEPRECATED
|
#ifndef TORRENT_DEPRECATED
|
||||||
#define TORRENT_DEPRECATED
|
#define TORRENT_DEPRECATED
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -233,6 +233,7 @@ namespace libtorrent
|
||||||
|
|
||||||
#ifndef TORRENT_NO_DEPRECATE
|
#ifndef TORRENT_NO_DEPRECATE
|
||||||
// deprecated in 0.14
|
// deprecated in 0.14
|
||||||
|
TORRENT_DEPRECATED_PREFIX
|
||||||
torrent_handle add_torrent(
|
torrent_handle add_torrent(
|
||||||
torrent_info const& ti
|
torrent_info const& ti
|
||||||
, fs::path const& save_path
|
, fs::path const& save_path
|
||||||
|
@ -242,6 +243,7 @@ namespace libtorrent
|
||||||
, storage_constructor_type sc = default_storage_constructor) TORRENT_DEPRECATED;
|
, storage_constructor_type sc = default_storage_constructor) TORRENT_DEPRECATED;
|
||||||
|
|
||||||
// deprecated in 0.14
|
// deprecated in 0.14
|
||||||
|
TORRENT_DEPRECATED_PREFIX
|
||||||
torrent_handle add_torrent(
|
torrent_handle add_torrent(
|
||||||
boost::intrusive_ptr<torrent_info> ti
|
boost::intrusive_ptr<torrent_info> ti
|
||||||
, fs::path const& save_path
|
, fs::path const& save_path
|
||||||
|
@ -252,6 +254,7 @@ namespace libtorrent
|
||||||
, void* userdata = 0) TORRENT_DEPRECATED;
|
, void* userdata = 0) TORRENT_DEPRECATED;
|
||||||
|
|
||||||
// deprecated in 0.14
|
// deprecated in 0.14
|
||||||
|
TORRENT_DEPRECATED_PREFIX
|
||||||
torrent_handle add_torrent(
|
torrent_handle add_torrent(
|
||||||
char const* tracker_url
|
char const* tracker_url
|
||||||
, sha1_hash const& info_hash
|
, sha1_hash const& info_hash
|
||||||
|
@ -391,6 +394,7 @@ namespace libtorrent
|
||||||
|
|
||||||
std::auto_ptr<alert> pop_alert();
|
std::auto_ptr<alert> pop_alert();
|
||||||
#ifndef TORRENT_NO_DEPRECATE
|
#ifndef TORRENT_NO_DEPRECATE
|
||||||
|
TORRENT_DEPRECATED_PREFIX
|
||||||
void set_severity_level(alert::severity_t s) TORRENT_DEPRECATED;
|
void set_severity_level(alert::severity_t s) TORRENT_DEPRECATED;
|
||||||
#endif
|
#endif
|
||||||
void set_alert_mask(int m);
|
void set_alert_mask(int m);
|
||||||
|
|
|
@ -385,6 +385,7 @@ namespace libtorrent
|
||||||
// fills the specified vector with the download progress [0, 1]
|
// fills the specified vector with the download progress [0, 1]
|
||||||
// of each file in the torrent. The files are ordered as in
|
// of each file in the torrent. The files are ordered as in
|
||||||
// the torrent_info.
|
// the torrent_info.
|
||||||
|
TORRENT_DEPRECATED_PREFIX
|
||||||
void file_progress(std::vector<float>& progress) const TORRENT_DEPRECATED;
|
void file_progress(std::vector<float>& progress) const TORRENT_DEPRECATED;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -454,12 +455,17 @@ namespace libtorrent
|
||||||
// deprecated in 0.13
|
// deprecated in 0.13
|
||||||
// marks the piece with the given index as filtered
|
// marks the piece with the given index as filtered
|
||||||
// it will not be downloaded
|
// it will not be downloaded
|
||||||
|
TORRENT_DEPRECATED_PREFIX
|
||||||
void filter_piece(int index, bool filter) const TORRENT_DEPRECATED;
|
void filter_piece(int index, bool filter) const TORRENT_DEPRECATED;
|
||||||
|
TORRENT_DEPRECATED_PREFIX
|
||||||
void filter_pieces(std::vector<bool> const& pieces) const TORRENT_DEPRECATED;
|
void filter_pieces(std::vector<bool> const& pieces) const TORRENT_DEPRECATED;
|
||||||
|
TORRENT_DEPRECATED_PREFIX
|
||||||
bool is_piece_filtered(int index) const TORRENT_DEPRECATED;
|
bool is_piece_filtered(int index) const TORRENT_DEPRECATED;
|
||||||
|
TORRENT_DEPRECATED_PREFIX
|
||||||
std::vector<bool> filtered_pieces() const TORRENT_DEPRECATED;
|
std::vector<bool> filtered_pieces() const TORRENT_DEPRECATED;
|
||||||
// marks the file with the given index as filtered
|
// marks the file with the given index as filtered
|
||||||
// it will not be downloaded
|
// it will not be downloaded
|
||||||
|
TORRENT_DEPRECATED_PREFIX
|
||||||
void filter_files(std::vector<bool> const& files) const TORRENT_DEPRECATED;
|
void filter_files(std::vector<bool> const& files) const TORRENT_DEPRECATED;
|
||||||
|
|
||||||
// ================ end deprecation ============
|
// ================ end deprecation ============
|
||||||
|
@ -489,6 +495,7 @@ namespace libtorrent
|
||||||
// deprecated in 0.14
|
// deprecated in 0.14
|
||||||
// use save_resume_data() instead. It is async. and
|
// use save_resume_data() instead. It is async. and
|
||||||
// will return the resume data in an alert
|
// will return the resume data in an alert
|
||||||
|
TORRENT_DEPRECATED_PREFIX
|
||||||
entry write_resume_data() const TORRENT_DEPRECATED;
|
entry write_resume_data() const TORRENT_DEPRECATED;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -245,7 +245,9 @@ namespace libtorrent
|
||||||
#ifndef TORRENT_NO_DEPRECATE
|
#ifndef TORRENT_NO_DEPRECATE
|
||||||
// ------- start deprecation -------
|
// ------- start deprecation -------
|
||||||
// these functions will be removed in a future version
|
// these functions will be removed in a future version
|
||||||
|
TORRENT_DEPRECATED_PREFIX
|
||||||
torrent_info(entry const& torrent_file) TORRENT_DEPRECATED;
|
torrent_info(entry const& torrent_file) TORRENT_DEPRECATED;
|
||||||
|
TORRENT_DEPRECATED_PREFIX
|
||||||
void print(std::ostream& os) const TORRENT_DEPRECATED;
|
void print(std::ostream& os) const TORRENT_DEPRECATED;
|
||||||
// ------- end deprecation -------
|
// ------- end deprecation -------
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue