summaryrefslogtreecommitdiffstats
path: root/libktorrent/torrent/peermanager.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 20:34:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 20:34:15 +0000
commit1c1403293485f35fd53db45aaa77a01cdd9627e7 (patch)
tree38559cd68cd4f63023fb5f6375def9db3b8b491e /libktorrent/torrent/peermanager.h
parent894f94545727610df22c4f73911d62d58266f695 (diff)
downloadktorrent-1c1403293485f35fd53db45aaa77a01cdd9627e7.tar.gz
ktorrent-1c1403293485f35fd53db45aaa77a01cdd9627e7.zip
TQt4 port ktorrent
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktorrent@1238733 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libktorrent/torrent/peermanager.h')
-rw-r--r--libktorrent/torrent/peermanager.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/libktorrent/torrent/peermanager.h b/libktorrent/torrent/peermanager.h
index d5fdb9f..df55beb 100644
--- a/libktorrent/torrent/peermanager.h
+++ b/libktorrent/torrent/peermanager.h
@@ -21,8 +21,8 @@
#define BTPEERMANAGER_H
#include <map>
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include <util/ptrmap.h>
#include "globals.h"
#include "peerid.h"
@@ -53,9 +53,10 @@ namespace bt
* This class manages all Peer objects.
* It can also open connections to other peers.
*/
- class PeerManager : public QObject
+ class PeerManager : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
@@ -180,14 +181,14 @@ namespace bt
/**
* Save the IP's and port numbers of all peers.
*/
- void savePeerList(const QString & file);
+ void savePeerList(const TQString & file);
/**
* Load the peer list again and add them to the potential peers
*/
- void loadPeerList(const QString & file);
+ void loadPeerList(const TQString & file);
- typedef QPtrList<Peer>::const_iterator CItr;
+ typedef TQPtrList<Peer>::const_iterator CItr;
CItr beginPeerList() const {return peer_list.begin();}
CItr endPeerList() const {return peer_list.end();}
@@ -212,13 +213,13 @@ namespace bt
void updateAvailableChunks();
bool killBadPeer();
void createPeer(mse::StreamSocket* sock,const PeerID & peer_id,Uint32 support,bool local);
- bool connectedTo(const QString & ip,Uint16 port) const;
+ bool connectedTo(const TQString & ip,Uint16 port) const;
private slots:
void onHave(Peer* p,Uint32 index);
void onBitSetRecieved(const BitSet & bs);
void onRerunChoker();
- void pex(const QByteArray & arr);
+ void pex(const TQByteArray & arr);
signals:
@@ -228,8 +229,8 @@ namespace bt
private:
PtrMap<Uint32,Peer> peer_map;
- QPtrList<Peer> peer_list;
- QPtrList<Peer> killed;
+ TQPtrList<Peer> peer_list;
+ TQPtrList<Peer> killed;
Torrent & tor;
bool started;
BitSet available_chunks;
@@ -241,9 +242,9 @@ namespace bt
static Uint32 max_total_connections;
static Uint32 total_connections;
- std::multimap<QString,kt::PotentialPeer> potential_peers;
+ std::multimap<TQString,kt::PotentialPeer> potential_peers;
- typedef std::multimap<QString,kt::PotentialPeer>::iterator PPItr;
+ typedef std::multimap<TQString,kt::PotentialPeer>::iterator PPItr;
};
}