libktorrent  2.2.0
Public Member Functions | List of all members
bt::TrackersList Class Referenceabstract

#include <trackerslist.h>

Inheritance diagram for bt::TrackersList:
Inheritance graph
[legend]

Public Member Functions

virtual TrackerInterfaceaddTracker (const QUrl &url, bool custom=true, int tier=1)=0
 
virtual bool canRemoveTracker (TrackerInterface *t)=0
 
virtual TrackerInterfacegetCurrentTracker () const =0
 
virtual QList< TrackerInterface * > getTrackers ()=0
 
virtual TrackersStatusInfo getTrackersStatusInfo () const =0
 
void merge (const bt::TrackerTier *first)
 
virtual bool noTrackersReachable () const =0
 
virtual bool removeTracker (const QUrl &url)=0
 
virtual bool removeTracker (TrackerInterface *t)=0
 
virtual void restoreDefault ()=0
 
virtual void setCurrentTracker (const QUrl &url)=0
 
virtual void setCurrentTracker (TrackerInterface *t)=0
 
virtual void setTrackerEnabled (const QUrl &url, bool on)=0
 

Detailed Description

Author
Ivan Vasić ivasi.nosp@m.c@gm.nosp@m.ail.c.nosp@m.om

This interface is used to provide access to AnnounceList object which holds a list of available trackers for a torrent.

Definition at line 61 of file trackerslist.h.

Member Function Documentation

◆ addTracker()

virtual TrackerInterface* bt::TrackersList::addTracker ( const QUrl &  url,
bool  custom = true,
int  tier = 1 
)
pure virtual

Adds a tracker URL to the list.

Parameters
urlThe URL
customIs it a custom tracker
tierWhich tier (or priority) the tracker has, tier 1 are the main trackers, tier 2 are backups ...
Returns
The Tracker

Implemented in bt::TrackerManager.

◆ canRemoveTracker()

virtual bool bt::TrackersList::canRemoveTracker ( TrackerInterface t)
pure virtual

Return true if a tracker can be removed

Parameters
tThe tracker

Implemented in bt::TrackerManager.

◆ getCurrentTracker()

virtual TrackerInterface* bt::TrackersList::getCurrentTracker ( ) const
pure virtual

Get the current tracker (for non private torrents this returns 0, seeing that all trackers are used at the same time)

Implemented in bt::TrackerManager.

◆ getTrackers()

virtual QList<TrackerInterface*> bt::TrackersList::getTrackers ( )
pure virtual

Gets a list of all available trackers.

Implemented in bt::TrackerManager.

◆ getTrackersStatusInfo()

virtual TrackersStatusInfo bt::TrackersList::getTrackersStatusInfo ( ) const
pure virtual

Returns true if any tracker has time out error

Implemented in bt::TrackerManager.

◆ merge()

void bt::TrackersList::merge ( const bt::TrackerTier first)

Merge an other tracker list.

Parameters
firstThe first TrackerTier

◆ noTrackersReachable()

virtual bool bt::TrackersList::noTrackersReachable ( ) const
pure virtual

Returns true if no tracker is reachable

Implemented in bt::TrackerManager.

◆ removeTracker() [1/2]

virtual bool bt::TrackersList::removeTracker ( const QUrl &  url)
pure virtual

Removes the tracker from the list.

Parameters
urlThe tracker url

Implemented in bt::TrackerManager.

◆ removeTracker() [2/2]

virtual bool bt::TrackersList::removeTracker ( TrackerInterface t)
pure virtual

Removes the tracker from the list.

Parameters
tThe Tracker

Implemented in bt::TrackerManager.

◆ restoreDefault()

virtual void bt::TrackersList::restoreDefault ( )
pure virtual

Restores the default tracker and does the announce.

Implemented in bt::TrackerManager.

◆ setCurrentTracker() [1/2]

virtual void bt::TrackersList::setCurrentTracker ( const QUrl &  url)
pure virtual

Sets the current tracker and does the announce. For non private torrents, this does nothing.

Parameters
urlUrl of the tracker

Implemented in bt::TrackerManager.

◆ setCurrentTracker() [2/2]

virtual void bt::TrackersList::setCurrentTracker ( TrackerInterface t)
pure virtual

Sets the current tracker and does the announce. For non private torrents, this does nothing.

Parameters
tThe Tracker

Implemented in bt::TrackerManager.

◆ setTrackerEnabled()

virtual void bt::TrackersList::setTrackerEnabled ( const QUrl &  url,
bool  on 
)
pure virtual

Set a tracker enabled or not

Implemented in bt::TrackerManager.


The documentation for this class was generated from the following file: