deprecate torrent_handle::super_seeding() and move it into torrent_status
This commit is contained in:
@@ -2359,7 +2359,6 @@ Its declaration looks like this::
|
|||||||
void rename_file(int index, boost::filesystem::wpath) const;
|
void rename_file(int index, boost::filesystem::wpath) const;
|
||||||
storage_interface* get_storage_impl() const;
|
storage_interface* get_storage_impl() const;
|
||||||
|
|
||||||
bool super_seeding() const;
|
|
||||||
void super_seeding(bool on) const;
|
void super_seeding(bool on) const;
|
||||||
|
|
||||||
enum flags_t { overwrite_existing = 1 };
|
enum flags_t { overwrite_existing = 1 };
|
||||||
@@ -2586,12 +2585,10 @@ super_seeding()
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
bool super_seeding() const;
|
|
||||||
void super_seeding(bool on) const;
|
void super_seeding(bool on) const;
|
||||||
|
|
||||||
Enables or disabled super seeding/initial seeding for this torrent. The torrent
|
Enables or disabled super seeding/initial seeding for this torrent. The torrent
|
||||||
needs to be a seed for this to take effect. The overload that returns a bool
|
needs to be a seed for this to take effect.
|
||||||
tells you of super seeding is enabled or not.
|
|
||||||
|
|
||||||
add_piece()
|
add_piece()
|
||||||
-----------
|
-----------
|
||||||
@@ -3479,6 +3476,7 @@ It contains the following fields::
|
|||||||
bool seed_mode;
|
bool seed_mode;
|
||||||
bool upload_mode;
|
bool upload_mode;
|
||||||
bool share_mode;
|
bool share_mode;
|
||||||
|
bool super_seeding;
|
||||||
|
|
||||||
int priority;
|
int priority;
|
||||||
|
|
||||||
@@ -3750,6 +3748,8 @@ torrent_handle_.
|
|||||||
``share_mode`` is true if the torrent is currently in share-mode, i.e.
|
``share_mode`` is true if the torrent is currently in share-mode, i.e.
|
||||||
not downloading the torrent, but just helping the swarm out.
|
not downloading the torrent, but just helping the swarm out.
|
||||||
|
|
||||||
|
``super_seeding`` is true if the torrent is in super seeding mode.
|
||||||
|
|
||||||
``added_time`` is the posix-time when this torrent was added. i.e. what
|
``added_time`` is the posix-time when this torrent was added. i.e. what
|
||||||
``time(NULL)`` returned at the time.
|
``time(NULL)`` returned at the time.
|
||||||
|
|
||||||
|
@@ -296,6 +296,8 @@ namespace libtorrent
|
|||||||
bool is_sequential_download() const TORRENT_DEPRECATED;
|
bool is_sequential_download() const TORRENT_DEPRECATED;
|
||||||
TORRENT_DEPRECATED_PREFIX
|
TORRENT_DEPRECATED_PREFIX
|
||||||
bool has_metadata() const TORRENT_DEPRECATED;
|
bool has_metadata() const TORRENT_DEPRECATED;
|
||||||
|
TORRENT_DEPRECATED_PREFIX
|
||||||
|
bool super_seeding() const TORRENT_DEPRECATED;
|
||||||
|
|
||||||
// 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
|
||||||
@@ -402,7 +404,6 @@ namespace libtorrent
|
|||||||
void rename_file(int index, std::wstring const& new_name) const;
|
void rename_file(int index, std::wstring const& new_name) const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool super_seeding() const;
|
|
||||||
void super_seeding(bool on) const;
|
void super_seeding(bool on) const;
|
||||||
|
|
||||||
sha1_hash info_hash() const;
|
sha1_hash info_hash() const;
|
||||||
@@ -486,6 +487,7 @@ namespace libtorrent
|
|||||||
, seed_mode(false)
|
, seed_mode(false)
|
||||||
, upload_mode(false)
|
, upload_mode(false)
|
||||||
, share_mode(false)
|
, share_mode(false)
|
||||||
|
, super_seeding(false)
|
||||||
, priority(0)
|
, priority(0)
|
||||||
, added_time(0)
|
, added_time(0)
|
||||||
, completed_time(0)
|
, completed_time(0)
|
||||||
@@ -690,6 +692,9 @@ namespace libtorrent
|
|||||||
// this is true if the torrent is in share-mode
|
// this is true if the torrent is in share-mode
|
||||||
bool share_mode;
|
bool share_mode;
|
||||||
|
|
||||||
|
// true if the torrent is in super seeding mode
|
||||||
|
bool super_seeding;
|
||||||
|
|
||||||
// the priority of this torrent
|
// the priority of this torrent
|
||||||
int priority;
|
int priority;
|
||||||
|
|
||||||
|
@@ -8165,6 +8165,7 @@ namespace libtorrent
|
|||||||
st->sequential_download = m_sequential_download;
|
st->sequential_download = m_sequential_download;
|
||||||
st->is_seeding = is_seed();
|
st->is_seeding = is_seed();
|
||||||
st->is_finished = is_finished();
|
st->is_finished = is_finished();
|
||||||
|
st->super_seeding = m_super_seeding;
|
||||||
st->has_metadata = valid_metadata();
|
st->has_metadata = valid_metadata();
|
||||||
bytes_done(*st, flags & torrent_handle::query_accurate_download_counters);
|
bytes_done(*st, flags & torrent_handle::query_accurate_download_counters);
|
||||||
TORRENT_ASSERT(st->total_wanted_done >= 0);
|
TORRENT_ASSERT(st->total_wanted_done >= 0);
|
||||||
|
@@ -658,6 +658,13 @@ namespace libtorrent
|
|||||||
TORRENT_ASYNC_CALL1(filter_files, files);
|
TORRENT_ASYNC_CALL1(filter_files, files);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool torrent_handle::super_seeding() const
|
||||||
|
{
|
||||||
|
INVARIANT_CHECK;
|
||||||
|
TORRENT_SYNC_CALL_RET(bool, false, super_seeding);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
// ============ end deprecation ===============
|
// ============ end deprecation ===============
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -841,13 +848,6 @@ namespace libtorrent
|
|||||||
TORRENT_ASYNC_CALL(scrape_tracker);
|
TORRENT_ASYNC_CALL(scrape_tracker);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool torrent_handle::super_seeding() const
|
|
||||||
{
|
|
||||||
INVARIANT_CHECK;
|
|
||||||
TORRENT_SYNC_CALL_RET(bool, false, super_seeding);
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
void torrent_handle::super_seeding(bool on) const
|
void torrent_handle::super_seeding(bool on) const
|
||||||
{
|
{
|
||||||
INVARIANT_CHECK;
|
INVARIANT_CHECK;
|
||||||
|
Reference in New Issue
Block a user