forked from premiere/premiere-libtorrent
deprecate torrent_handle::super_seeding() and move it into torrent_status
This commit is contained in:
parent
9cd5c6cc2f
commit
8d754b9674
|
@ -2359,7 +2359,6 @@ Its declaration looks like this::
|
|||
void rename_file(int index, boost::filesystem::wpath) const;
|
||||
storage_interface* get_storage_impl() const;
|
||||
|
||||
bool super_seeding() const;
|
||||
void super_seeding(bool on) const;
|
||||
|
||||
enum flags_t { overwrite_existing = 1 };
|
||||
|
@ -2586,12 +2585,10 @@ super_seeding()
|
|||
|
||||
::
|
||||
|
||||
bool super_seeding() const;
|
||||
void super_seeding(bool on) const;
|
||||
|
||||
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
|
||||
tells you of super seeding is enabled or not.
|
||||
needs to be a seed for this to take effect.
|
||||
|
||||
add_piece()
|
||||
-----------
|
||||
|
@ -3479,6 +3476,7 @@ It contains the following fields::
|
|||
bool seed_mode;
|
||||
bool upload_mode;
|
||||
bool share_mode;
|
||||
bool super_seeding;
|
||||
|
||||
int priority;
|
||||
|
||||
|
@ -3750,6 +3748,8 @@ torrent_handle_.
|
|||
``share_mode`` is true if the torrent is currently in share-mode, i.e.
|
||||
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
|
||||
``time(NULL)`` returned at the time.
|
||||
|
||||
|
|
|
@ -296,6 +296,8 @@ namespace libtorrent
|
|||
bool is_sequential_download() const TORRENT_DEPRECATED;
|
||||
TORRENT_DEPRECATED_PREFIX
|
||||
bool has_metadata() const TORRENT_DEPRECATED;
|
||||
TORRENT_DEPRECATED_PREFIX
|
||||
bool super_seeding() const TORRENT_DEPRECATED;
|
||||
|
||||
// deprecated in 0.13
|
||||
// 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;
|
||||
#endif
|
||||
|
||||
bool super_seeding() const;
|
||||
void super_seeding(bool on) const;
|
||||
|
||||
sha1_hash info_hash() const;
|
||||
|
@ -486,6 +487,7 @@ namespace libtorrent
|
|||
, seed_mode(false)
|
||||
, upload_mode(false)
|
||||
, share_mode(false)
|
||||
, super_seeding(false)
|
||||
, priority(0)
|
||||
, added_time(0)
|
||||
, completed_time(0)
|
||||
|
@ -690,6 +692,9 @@ namespace libtorrent
|
|||
// this is true if the torrent is in share-mode
|
||||
bool share_mode;
|
||||
|
||||
// true if the torrent is in super seeding mode
|
||||
bool super_seeding;
|
||||
|
||||
// the priority of this torrent
|
||||
int priority;
|
||||
|
||||
|
|
|
@ -8165,6 +8165,7 @@ namespace libtorrent
|
|||
st->sequential_download = m_sequential_download;
|
||||
st->is_seeding = is_seed();
|
||||
st->is_finished = is_finished();
|
||||
st->super_seeding = m_super_seeding;
|
||||
st->has_metadata = valid_metadata();
|
||||
bytes_done(*st, flags & torrent_handle::query_accurate_download_counters);
|
||||
TORRENT_ASSERT(st->total_wanted_done >= 0);
|
||||
|
|
|
@ -658,6 +658,13 @@ namespace libtorrent
|
|||
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 ===============
|
||||
#endif
|
||||
|
||||
|
@ -841,13 +848,6 @@ namespace libtorrent
|
|||
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
|
||||
{
|
||||
INVARIANT_CHECK;
|
||||
|
|
Loading…
Reference in New Issue