added deprecation messages to gcc

This commit is contained in:
Arvid Norberg 2007-08-10 16:57:37 +00:00
parent 11b63bc93e
commit fc74e5d147
4 changed files with 15 additions and 8 deletions

View File

@ -35,6 +35,12 @@ POSSIBILITY OF SUCH DAMAGE.
#include <boost/config.hpp>
#if defined(__GNUC__)
#define TORRENT_DEPRECATED __attribute__ ((deprecated))
#else
#define TORRENT_DEPRECATED
#endif
#if defined(__GNUC__) && __GNUC__ >= 4
# if defined(TORRENT_BUILDING_SHARED) || defined(TORRENT_LINKING_SHARED)

View File

@ -59,7 +59,7 @@ POSSIBILITY OF SUCH DAMAGE.
*/
#include <iostream>
#include <iosfwd>
#include <map>
#include <list>
#include <string>

View File

@ -144,14 +144,15 @@ namespace libtorrent
, int block_size = 16 * 1024
, storage_constructor_type sc = default_storage_constructor);
// TODO: deprecated, this is for backwards compatibility only
// ==== deprecated, this is for backwards compatibility only
// instead, use one of the other add_torrent overloads
torrent_handle add_torrent(
entry const& e
, fs::path const& save_path
, entry const& resume_data = entry()
, bool compact_mode = true
, int block_size = 16 * 1024
, storage_constructor_type sc = default_storage_constructor)
, storage_constructor_type sc = default_storage_constructor) TORRENT_DEPRECATED
{
return add_torrent(torrent_info(e), save_path, resume_data
, compact_mode, block_size, sc);

View File

@ -296,13 +296,13 @@ namespace libtorrent
// marks the piece with the given index as filtered
// it will not be downloaded
void filter_piece(int index, bool filter) const;
void filter_pieces(std::vector<bool> const& pieces) const;
bool is_piece_filtered(int index) const;
std::vector<bool> filtered_pieces() const;
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 TORRENT_DEPRECATED;
// marks the file with the given index as filtered
// it will not be downloaded
void filter_files(std::vector<bool> const& files) const;
void filter_files(std::vector<bool> const& files) const TORRENT_DEPRECATED;
// ================ end deprecation ============