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;
|
||||
|
||||
#ifndef TORRENT_NO_DEPRECATE
|
||||
TORRENT_DEPRECATED_PREFIX
|
||||
severity_t severity() const TORRENT_DEPRECATED { return warning; }
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<torrent_info> 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<alert> 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);
|
||||
|
|
|
@ -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<float>& 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<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;
|
||||
// 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;
|
||||
|
||||
// ================ 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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue