1 #ifndef _TC_INTERFACE_H_
2 #define _TC_INTERFACE_H_
44 virtual int count() = 0;
56 virtual QString
fileName(
int i,
int file) = 0;
62 virtual bool start(
int i) = 0;
63 virtual bool stop(
int i) = 0;
78 virtual QString
state(
int i) = 0;
82 virtual QString
name(
int i) = 0;
113 virtual const QString &
name() = 0;
118 #define TORR_DECLARE_DESCRIPTOR(_interfaceclass) \
119 class _interfaceclass##Descriptor : public TorrentInterfaceDescriptor \
122 _interfaceclass##Descriptor(); \
123 virtual ~_interfaceclass##Descriptor(); \
126 _interfaceclass * m_pInstance; \
128 QString m_szDescription; \
131 virtual const QString & name(); \
132 virtual const QString & description(); \
133 virtual TorrentInterface * instance(); \
136 #define TORR_IMPLEMENT_DESCRIPTOR(_interfaceclass, _name, _description) \
137 _interfaceclass##Descriptor::_interfaceclass##Descriptor() \
138 : TorrentInterfaceDescriptor() \
142 m_szDescription = _description; \
144 _interfaceclass##Descriptor::~_interfaceclass##Descriptor() \
146 delete m_pInstance; \
148 const QString & _interfaceclass##Descriptor::name() \
152 const QString & _interfaceclass##Descriptor::description() \
154 return m_szDescription; \
156 TorrentInterface * _interfaceclass##Descriptor::instance() \
159 m_pInstance = new _interfaceclass(); \
160 return m_pInstance; \
163 #endif // _TC_INTERFACE_H_
virtual int maxDownloadSpeed()=0
TorrentInterface()
Definition: TorrentInterface.h:38
Definition: TorrentInterface.h:106
virtual bool stop(int i)=0
virtual bool start(int i)=0
virtual ~TorrentInterface()
Definition: TorrentInterface.h:39
static TorrentInterface * selected()
Definition: TorrentInterface.h:99
virtual float trafficDown()=0
#define i
Definition: detector.cpp:73
virtual QString filePriority(int i, int file)=0
virtual int maxUploadSpeed()=0
virtual QString state(int i)=0
virtual bool startAll()=0
virtual bool announce(int i)=0
virtual float speedUp()=0
virtual const QString & name()=0
virtual bool setMaxDownloadSpeed(int kbytes_per_sec)=0
static void select(TorrentInterface *i)
Definition: TorrentInterface.h:98
static TorrentInterface * m_selected
Definition: TorrentInterface.h:103
QString m_lastError
Definition: TorrentInterface.h:102
TorrentInterfaceDescriptor()
Definition: TorrentInterface.h:109
virtual QString name(int i)=0
virtual bool setFilePriority(int i, int file, const QString &prio)=0
virtual ~TorrentInterfaceDescriptor()
Definition: TorrentInterface.h:110
virtual int fileCount(int i)=0
virtual TorrentInterface * instance()=0
Definition: TorrentInterface.h:35
QString lastError()
Definition: TorrentInterface.h:96
This file contains compile time settings.
virtual const QString & description()=0
virtual float trafficUp()=0
virtual QString fileName(int i, int file)=0
Helper functions for the QString class.
virtual float speedDown()=0
virtual bool setMaxUploadSpeed(int kbytes_per_sec)=0