summaryrefslogtreecommitdiffstats
path: root/libktorrent
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 00:12:44 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 00:12:44 -0600
commitd46a1fe34693137bbc38a0a79593af420ea0914b (patch)
tree038dbf461083bda9b7a6398908572591a80012d3 /libktorrent
parent604bf3f969d880708ea9a1affce0b304c29e6ff5 (diff)
downloadktorrent-d46a1fe34693137bbc38a0a79593af420ea0914b.tar.gz
ktorrent-d46a1fe34693137bbc38a0a79593af420ea0914b.zip
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'libktorrent')
-rw-r--r--libktorrent/interfaces/exitoperation.cpp6
-rw-r--r--libktorrent/interfaces/exitoperation.h6
-rw-r--r--libktorrent/kademlia/rpcmsg.h4
-rw-r--r--libktorrent/kademlia/rpcserver.cpp4
-rw-r--r--libktorrent/kademlia/rpcserver.h4
-rw-r--r--libktorrent/torrent/cache.h6
-rw-r--r--libktorrent/torrent/chunkmanager.cpp4
-rw-r--r--libktorrent/torrent/chunkmanager.h6
-rw-r--r--libktorrent/torrent/httptracker.cpp28
-rw-r--r--libktorrent/torrent/httptracker.h10
-rw-r--r--libktorrent/torrent/movedatafilesjob.cpp22
-rw-r--r--libktorrent/torrent/movedatafilesjob.h10
-rw-r--r--libktorrent/torrent/multifilecache.cpp4
-rw-r--r--libktorrent/torrent/multifilecache.h4
-rw-r--r--libktorrent/torrent/singlefilecache.cpp6
-rw-r--r--libktorrent/torrent/singlefilecache.h4
-rw-r--r--libktorrent/torrent/torrentcontrol.cpp6
-rw-r--r--libktorrent/torrent/torrentcontrol.h4
-rw-r--r--libktorrent/torrent/udptracker.h2
-rw-r--r--libktorrent/torrent/udptrackersocket.cpp4
-rw-r--r--libktorrent/torrent/udptrackersocket.h6
-rw-r--r--libktorrent/util/autorotatelogjob.cpp12
-rw-r--r--libktorrent/util/autorotatelogjob.h4
-rw-r--r--libktorrent/util/fileops.cpp18
-rw-r--r--libktorrent/util/fileops.h2
-rw-r--r--libktorrent/util/httprequest.cpp2
-rw-r--r--libktorrent/util/waitjob.cpp6
-rw-r--r--libktorrent/util/waitjob.h2
28 files changed, 98 insertions, 98 deletions
diff --git a/libktorrent/interfaces/exitoperation.cpp b/libktorrent/interfaces/exitoperation.cpp
index 08a39df..fd9883f 100644
--- a/libktorrent/interfaces/exitoperation.cpp
+++ b/libktorrent/interfaces/exitoperation.cpp
@@ -29,16 +29,16 @@ namespace kt
ExitOperation::~ExitOperation()
{}
- ExitJobOperation::ExitJobOperation(KIO::Job* j)
+ ExitJobOperation::ExitJobOperation(TDEIO::Job* j)
{
- connect(j,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(onResult( KIO::Job* )));
+ connect(j,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(onResult( TDEIO::Job* )));
}
ExitJobOperation::~ExitJobOperation()
{
}
- void ExitJobOperation::onResult(KIO::Job* )
+ void ExitJobOperation::onResult(TDEIO::Job* )
{
operationFinished(this);
}
diff --git a/libktorrent/interfaces/exitoperation.h b/libktorrent/interfaces/exitoperation.h
index 631acb4..e45dab4 100644
--- a/libktorrent/interfaces/exitoperation.h
+++ b/libktorrent/interfaces/exitoperation.h
@@ -50,19 +50,19 @@ namespace kt
};
/**
- * Exit operation which waits for a KIO::Job
+ * Exit operation which waits for a TDEIO::Job
*/
class ExitJobOperation : public ExitOperation
{
Q_OBJECT
public:
- ExitJobOperation(KIO::Job* j);
+ ExitJobOperation(TDEIO::Job* j);
virtual ~ExitJobOperation();
virtual bool deleteAllowed() const {return false;}
private slots:
- virtual void onResult(KIO::Job* j);
+ virtual void onResult(TDEIO::Job* j);
};
}
diff --git a/libktorrent/kademlia/rpcmsg.h b/libktorrent/kademlia/rpcmsg.h
index 68a3367..58f6891 100644
--- a/libktorrent/kademlia/rpcmsg.h
+++ b/libktorrent/kademlia/rpcmsg.h
@@ -86,13 +86,13 @@ namespace dht
virtual void encode(TQByteArray & arr) = 0;
/// Set the origin (i.e. where the message came from)
- void setOrigin(const KNetwork::KSocketAddress & o) {origin = o;}
+ void setOrigin(const KNetwork::TDESocketAddress & o) {origin = o;}
/// Get the origin
const KNetwork::KInetSocketAddress & getOrigin() const {return origin;}
/// Set the origin (i.e. where the message came from)
- void setDestination(const KNetwork::KSocketAddress & o) {origin = o;}
+ void setDestination(const KNetwork::TDESocketAddress & o) {origin = o;}
/// Get the origin
const KNetwork::KInetSocketAddress & getDestination() const {return origin;}
diff --git a/libktorrent/kademlia/rpcserver.cpp b/libktorrent/kademlia/rpcserver.cpp
index 8839de2..571d4d8 100644
--- a/libktorrent/kademlia/rpcserver.cpp
+++ b/libktorrent/kademlia/rpcserver.cpp
@@ -157,7 +157,7 @@ namespace dht
}
- void RPCServer::send(const KNetwork::KSocketAddress & addr,const TQByteArray & msg)
+ void RPCServer::send(const KNetwork::TDESocketAddress & addr,const TQByteArray & msg)
{
sock->send(KNetwork::KDatagramPacket(msg,addr));
}
@@ -230,7 +230,7 @@ namespace dht
return calls.find(mtid);
}
- void RPCServer::ping(const dht::Key & our_id,const KNetwork::KSocketAddress & addr)
+ void RPCServer::ping(const dht::Key & our_id,const KNetwork::TDESocketAddress & addr)
{
Out(SYS_DHT|LOG_NOTICE) << "DHT: pinging " << addr.nodeName() << endl;
PingReq* pr = new PingReq(our_id);
diff --git a/libktorrent/kademlia/rpcserver.h b/libktorrent/kademlia/rpcserver.h
index 387daee..b555fb4 100644
--- a/libktorrent/kademlia/rpcserver.h
+++ b/libktorrent/kademlia/rpcserver.h
@@ -91,7 +91,7 @@ namespace dht
* Ping a node, we don't care about the MTID.
* @param addr The address
*/
- void ping(const dht::Key & our_id,const KNetwork::KSocketAddress & addr);
+ void ping(const dht::Key & our_id,const KNetwork::TDESocketAddress & addr);
/**
* Find a RPC call, based on the mtid
@@ -106,7 +106,7 @@ namespace dht
void readPacket();
private:
- void send(const KNetwork::KSocketAddress & addr,const TQByteArray & msg);
+ void send(const KNetwork::TDESocketAddress & addr,const TQByteArray & msg);
void doQueuedCalls();
private:
diff --git a/libktorrent/torrent/cache.h b/libktorrent/torrent/cache.h
index 8630bc7..1aff44b 100644
--- a/libktorrent/torrent/cache.h
+++ b/libktorrent/torrent/cache.h
@@ -70,15 +70,15 @@ namespace bt
/**
* Move the data files to a new directory.
* @param ndir The directory
- * @return The KIO::Job doing the move
+ * @return The TDEIO::Job doing the move
*/
- virtual KIO::Job* moveDataFiles(const TQString & ndir) = 0;
+ virtual TDEIO::Job* moveDataFiles(const TQString & ndir) = 0;
/**
* The move data files job is done.
* @param job The job that did it
*/
- virtual void moveDataFilesCompleted(KIO::Job* job) = 0;
+ virtual void moveDataFilesCompleted(TDEIO::Job* job) = 0;
/**
* Changes output path. All data files should already been moved.
diff --git a/libktorrent/torrent/chunkmanager.cpp b/libktorrent/torrent/chunkmanager.cpp
index e98c58b..aa50ad8 100644
--- a/libktorrent/torrent/chunkmanager.cpp
+++ b/libktorrent/torrent/chunkmanager.cpp
@@ -148,12 +148,12 @@ namespace bt
file_priority_file = data_dir + "file_priority";
}
- KIO::Job* ChunkManager::moveDataFiles(const TQString & ndir)
+ TDEIO::Job* ChunkManager::moveDataFiles(const TQString & ndir)
{
return cache->moveDataFiles(ndir);
}
- void ChunkManager::moveDataFilesCompleted(KIO::Job* job)
+ void ChunkManager::moveDataFilesCompleted(TDEIO::Job* job)
{
cache->moveDataFilesCompleted(job);
}
diff --git a/libktorrent/torrent/chunkmanager.h b/libktorrent/torrent/chunkmanager.h
index 19a0a30..fa6491a 100644
--- a/libktorrent/torrent/chunkmanager.h
+++ b/libktorrent/torrent/chunkmanager.h
@@ -30,7 +30,7 @@
class TQStringList;
-namespace KIO
+namespace TDEIO
{
class Job;
}
@@ -109,13 +109,13 @@ namespace bt
* @param ndir The new directory
* @return The job doing the move
*/
- KIO::Job* moveDataFiles(const TQString & ndir);
+ TDEIO::Job* moveDataFiles(const TQString & ndir);
/**
* The move data files job has finished
* @param job The move job
*/
- void moveDataFilesCompleted(KIO::Job* job);
+ void moveDataFilesCompleted(TDEIO::Job* job);
/**
* Loads the index file.
diff --git a/libktorrent/torrent/httptracker.cpp b/libktorrent/torrent/httptracker.cpp
index e64f8ce..5bbaae8 100644
--- a/libktorrent/torrent/httptracker.cpp
+++ b/libktorrent/torrent/httptracker.cpp
@@ -116,18 +116,18 @@ namespace bt
scrape_url.setEncodedPathAndQuery(epq);
Out(SYS_TRK|LOG_NOTICE) << "Doing scrape request to url : " << scrape_url.prettyURL() << endl;
- KIO::MetaData md;
+ TDEIO::MetaData md;
setupMetaData(md);
- KIO::StoredTransferJob* j = KIO::storedGet(scrape_url,false,false);
+ TDEIO::StoredTransferJob* j = TDEIO::storedGet(scrape_url,false,false);
// set the meta data
j->setMetaData(md);
- KIO::Scheduler::scheduleJob(j);
+ TDEIO::Scheduler::scheduleJob(j);
- connect(j,TQT_SIGNAL(result(KIO::Job* )),this,TQT_SLOT(onScrapeResult( KIO::Job* )));
+ connect(j,TQT_SIGNAL(result(TDEIO::Job* )),this,TQT_SLOT(onScrapeResult( TDEIO::Job* )));
}
- void HTTPTracker::onScrapeResult(KIO::Job* j)
+ void HTTPTracker::onScrapeResult(TDEIO::Job* j)
{
if (j->error())
{
@@ -135,7 +135,7 @@ namespace bt
return;
}
- KIO::StoredTransferJob* st = (KIO::StoredTransferJob*)j;
+ TDEIO::StoredTransferJob* st = (TDEIO::StoredTransferJob*)j;
BDecoder dec(st->data(),false,0);
BNode* n = 0;
@@ -355,11 +355,11 @@ namespace bt
}
- void HTTPTracker::onAnnounceResult(KIO::Job* j)
+ void HTTPTracker::onAnnounceResult(TDEIO::Job* j)
{
if (j->error())
{
- KIO::StoredTransferJob* st = (KIO::StoredTransferJob*)j;
+ TDEIO::StoredTransferJob* st = (TDEIO::StoredTransferJob*)j;
KURL u = st->url();
active_job = 0;
@@ -376,7 +376,7 @@ namespace bt
}
else
{
- KIO::StoredTransferJob* st = (KIO::StoredTransferJob*)j;
+ TDEIO::StoredTransferJob* st = (TDEIO::StoredTransferJob*)j;
KURL u = st->url();
active_job = 0;
@@ -415,7 +415,7 @@ namespace bt
requestFailed(i18n("Invalid tracker URL"));
}
- void HTTPTracker::setupMetaData(KIO::MetaData & md)
+ void HTTPTracker::setupMetaData(TDEIO::MetaData & md)
{
md["UserAgent"] = "ktorrent/" VERSION;
md["SendLanguageSettings"] = "false";
@@ -446,14 +446,14 @@ namespace bt
void HTTPTracker::doAnnounce(const KURL & u)
{
Out(SYS_TRK|LOG_NOTICE) << "Doing tracker request to url : " << u.prettyURL() << endl;
- KIO::MetaData md;
+ TDEIO::MetaData md;
setupMetaData(md);
- KIO::StoredTransferJob* j = KIO::storedGet(u,false,false);
+ TDEIO::StoredTransferJob* j = TDEIO::storedGet(u,false,false);
// set the meta data
j->setMetaData(md);
- KIO::Scheduler::scheduleJob(j);
+ TDEIO::Scheduler::scheduleJob(j);
- connect(j,TQT_SIGNAL(result(KIO::Job* )),this,TQT_SLOT(onAnnounceResult( KIO::Job* )));
+ connect(j,TQT_SIGNAL(result(TDEIO::Job* )),this,TQT_SLOT(onAnnounceResult( TDEIO::Job* )));
active_job = j;
requestPending();
diff --git a/libktorrent/torrent/httptracker.h b/libktorrent/torrent/httptracker.h
index b9433cd..8457934 100644
--- a/libktorrent/torrent/httptracker.h
+++ b/libktorrent/torrent/httptracker.h
@@ -23,7 +23,7 @@
#include <tqtimer.h>
#include "tracker.h"
-namespace KIO
+namespace TDEIO
{
class Job;
class MetaData;
@@ -55,19 +55,19 @@ namespace bt
virtual void scrape();
private slots:
- void onAnnounceResult(KIO::Job* j);
- void onScrapeResult(KIO::Job* j);
+ void onAnnounceResult(TDEIO::Job* j);
+ void onScrapeResult(TDEIO::Job* j);
void emitInvalidURLFailure();
private:
void doRequest(WaitJob* wjob = 0);
bool updateData(const TQByteArray & data);
- void setupMetaData(KIO::MetaData & md);
+ void setupMetaData(TDEIO::MetaData & md);
void doAnnounceQueue();
void doAnnounce(const KURL & u);
private:
- KIO::Job* active_job;
+ TDEIO::Job* active_job;
KURL::List announce_queue;
TQString event;
Uint32 failures;
diff --git a/libktorrent/torrent/movedatafilesjob.cpp b/libktorrent/torrent/movedatafilesjob.cpp
index c3fc854..7fc3fa6 100644
--- a/libktorrent/torrent/movedatafilesjob.cpp
+++ b/libktorrent/torrent/movedatafilesjob.cpp
@@ -23,7 +23,7 @@
namespace bt
{
- MoveDataFilesJob::MoveDataFilesJob() : KIO::Job(false),err(false),active_job(0)
+ MoveDataFilesJob::MoveDataFilesJob() : TDEIO::Job(false),err(false),active_job(0)
{}
@@ -35,12 +35,12 @@ namespace bt
todo.insert(src,dst);
}
- void MoveDataFilesJob::onJobDone(KIO::Job* j)
+ void MoveDataFilesJob::onJobDone(TDEIO::Job* j)
{
if (j->error() || err)
{
if (!err)
- m_error = KIO::ERR_INTERNAL;
+ m_error = TDEIO::ERR_INTERNAL;
active_job = 0;
if (j->error())
@@ -59,9 +59,9 @@ namespace bt
}
}
- void MoveDataFilesJob::onCanceled(KIO::Job* j)
+ void MoveDataFilesJob::onCanceled(TDEIO::Job* j)
{
- m_error = KIO::ERR_USER_CANCELED;
+ m_error = TDEIO::ERR_USER_CANCELED;
active_job = 0;
err = true;
recover();
@@ -77,12 +77,12 @@ namespace bt
}
TQMap<TQString,TQString>::iterator i = todo.begin();
- active_job = KIO::move(KURL::fromPathOrURL(i.key()),KURL::fromPathOrURL(i.data()),false);
+ active_job = TDEIO::move(KURL::fromPathOrURL(i.key()),KURL::fromPathOrURL(i.data()),false);
active_src = i.key();
active_dst = i.data();
Out(SYS_GEN|LOG_DEBUG) << "Moving " << active_src << " -> " << active_dst << endl;
- connect(active_job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(onJobDone(KIO::Job*)));
- connect(active_job,TQT_SIGNAL(canceled(KIO::Job*)),this,TQT_SLOT(onCanceled(KIO::Job*)));
+ connect(active_job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(onJobDone(TDEIO::Job*)));
+ connect(active_job,TQT_SIGNAL(canceled(TDEIO::Job*)),this,TQT_SLOT(onCanceled(TDEIO::Job*)));
todo.erase(i);
}
@@ -94,9 +94,9 @@ namespace bt
return;
}
TQMap<TQString,TQString>::iterator i = success.begin();
- active_job = KIO::move(KURL::fromPathOrURL(i.data()),KURL::fromPathOrURL(i.key()),false);
- connect(active_job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(onJobDone(KIO::Job*)));
- connect(active_job,TQT_SIGNAL(canceled(KIO::Job*)),this,TQT_SLOT(onCanceled(KIO::Job*)));
+ active_job = TDEIO::move(KURL::fromPathOrURL(i.data()),KURL::fromPathOrURL(i.key()),false);
+ connect(active_job,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(onJobDone(TDEIO::Job*)));
+ connect(active_job,TQT_SIGNAL(canceled(TDEIO::Job*)),this,TQT_SLOT(onCanceled(TDEIO::Job*)));
success.erase(i);
}
}
diff --git a/libktorrent/torrent/movedatafilesjob.h b/libktorrent/torrent/movedatafilesjob.h
index 22e7e60..e64a62f 100644
--- a/libktorrent/torrent/movedatafilesjob.h
+++ b/libktorrent/torrent/movedatafilesjob.h
@@ -27,9 +27,9 @@ namespace bt
/**
* @author Joris Guisson <joris.guisson@gmail.com>
- * KIO::Job to move all the files of a torrent.
+ * TDEIO::Job to move all the files of a torrent.
*/
- class MoveDataFilesJob : public KIO::Job
+ class MoveDataFilesJob : public TDEIO::Job
{
Q_OBJECT
@@ -50,15 +50,15 @@ namespace bt
void startMoving();
private slots:
- void onJobDone(KIO::Job* j);
- void onCanceled(KIO::Job* j);
+ void onJobDone(TDEIO::Job* j);
+ void onCanceled(TDEIO::Job* j);
private:
void recover();
private:
bool err;
- KIO::Job* active_job;
+ TDEIO::Job* active_job;
TQString active_src,active_dst;
TQMap<TQString,TQString> todo;
TQMap<TQString,TQString> success;
diff --git a/libktorrent/torrent/multifilecache.cpp b/libktorrent/torrent/multifilecache.cpp
index 9d41fb8..c6cd8b7 100644
--- a/libktorrent/torrent/multifilecache.cpp
+++ b/libktorrent/torrent/multifilecache.cpp
@@ -195,7 +195,7 @@ namespace bt
}
}
- KIO::Job* MultiFileCache::moveDataFiles(const TQString & ndir)
+ TDEIO::Job* MultiFileCache::moveDataFiles(const TQString & ndir)
{
if (!bt::Exists(ndir))
bt::MakeDir(ndir);
@@ -239,7 +239,7 @@ namespace bt
return 0;
}
- void MultiFileCache::moveDataFilesCompleted(KIO::Job* job)
+ void MultiFileCache::moveDataFilesCompleted(TDEIO::Job* job)
{
if (!job->error())
{
diff --git a/libktorrent/torrent/multifilecache.h b/libktorrent/torrent/multifilecache.h
index ed09525..7de197a 100644
--- a/libktorrent/torrent/multifilecache.h
+++ b/libktorrent/torrent/multifilecache.h
@@ -55,8 +55,8 @@ namespace bt
virtual void open();
virtual TQString getOutputPath() const;
virtual void changeOutputPath(const TQString & outputpath);
- virtual KIO::Job* moveDataFiles(const TQString & ndir);
- virtual void moveDataFilesCompleted(KIO::Job* job);
+ virtual TDEIO::Job* moveDataFiles(const TQString & ndir);
+ virtual void moveDataFilesCompleted(TDEIO::Job* job);
virtual void preallocateDiskSpace(PreallocationThread* prealloc);
virtual bool hasMissingFiles(TQStringList & sl);
virtual void deleteDataFiles();
diff --git a/libktorrent/torrent/singlefilecache.cpp b/libktorrent/torrent/singlefilecache.cpp
index 8986f98..9df0719 100644
--- a/libktorrent/torrent/singlefilecache.cpp
+++ b/libktorrent/torrent/singlefilecache.cpp
@@ -52,12 +52,12 @@ namespace bt
cache_file = tmpdir + "cache";
}
- KIO::Job* SingleFileCache::moveDataFiles(const TQString & ndir)
+ TDEIO::Job* SingleFileCache::moveDataFiles(const TQString & ndir)
{
- return KIO::move(KURL::fromPathOrURL(output_file),KURL::fromPathOrURL(ndir));
+ return TDEIO::move(KURL::fromPathOrURL(output_file),KURL::fromPathOrURL(ndir));
}
- void SingleFileCache::moveDataFilesCompleted(KIO::Job* /*job*/)
+ void SingleFileCache::moveDataFilesCompleted(TDEIO::Job* /*job*/)
{
}
diff --git a/libktorrent/torrent/singlefilecache.h b/libktorrent/torrent/singlefilecache.h
index fc96fe7..4a787b1 100644
--- a/libktorrent/torrent/singlefilecache.h
+++ b/libktorrent/torrent/singlefilecache.h
@@ -49,8 +49,8 @@ namespace bt
virtual void close();
virtual void open();
virtual void changeTmpDir(const TQString & ndir);
- virtual KIO::Job* moveDataFiles(const TQString & ndir);
- virtual void moveDataFilesCompleted(KIO::Job* job);
+ virtual TDEIO::Job* moveDataFiles(const TQString & ndir);
+ virtual void moveDataFilesCompleted(TDEIO::Job* job);
virtual void changeOutputPath(const TQString& outputpath);
virtual TQString getOutputPath() const {return output_file;}
virtual void preallocateDiskSpace(PreallocationThread* prealloc);
diff --git a/libktorrent/torrent/torrentcontrol.cpp b/libktorrent/torrent/torrentcontrol.cpp
index 3cedfe9..4ac512b 100644
--- a/libktorrent/torrent/torrentcontrol.cpp
+++ b/libktorrent/torrent/torrentcontrol.cpp
@@ -843,7 +843,7 @@ namespace bt
if (stats.output_path != nd)
{
- KIO::Job* j = 0;
+ TDEIO::Job* j = 0;
if(moveFiles)
{
if (stats.multi_file_torrent)
@@ -855,7 +855,7 @@ namespace bt
move_data_files_destination_path = nd;
if (j)
{
- connect(j,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(moveDataFilesJobDone(KIO::Job*)));
+ connect(j,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(moveDataFilesJobDone(TDEIO::Job*)));
return true;
}
else
@@ -884,7 +884,7 @@ namespace bt
return true;
}
- void TorrentControl::moveDataFilesJobDone(KIO::Job* job)
+ void TorrentControl::moveDataFilesJobDone(TDEIO::Job* job)
{
if (job)
cman->moveDataFilesCompleted(job);
diff --git a/libktorrent/torrent/torrentcontrol.h b/libktorrent/torrent/torrentcontrol.h
index 8313afe..885e9fe 100644
--- a/libktorrent/torrent/torrentcontrol.h
+++ b/libktorrent/torrent/torrentcontrol.h
@@ -34,7 +34,7 @@
class TQStringList;
class TQString;
-namespace KIO
+namespace TDEIO
{
class Job;
}
@@ -308,7 +308,7 @@ namespace bt
/// Update the stats of the torrent.
void updateStats();
void corrupted(Uint32 chunk);
- void moveDataFilesJobDone(KIO::Job* job);
+ void moveDataFilesJobDone(TDEIO::Job* job);
private:
void updateTracker(const TQString & ev,bool last_succes = true);
diff --git a/libktorrent/torrent/udptracker.h b/libktorrent/torrent/udptracker.h
index 240a4ff..648aa8a 100644
--- a/libktorrent/torrent/udptracker.h
+++ b/libktorrent/torrent/udptracker.h
@@ -87,7 +87,7 @@ namespace bt
bool doRequest();
private:
- KNetwork::KSocketAddress address;
+ KNetwork::TDESocketAddress address;
Int32 transaction_id;
Int64 connection_id;
diff --git a/libktorrent/torrent/udptrackersocket.cpp b/libktorrent/torrent/udptrackersocket.cpp
index 2baf3e4..bab6f02 100644
--- a/libktorrent/torrent/udptrackersocket.cpp
+++ b/libktorrent/torrent/udptrackersocket.cpp
@@ -75,7 +75,7 @@ namespace bt
delete sock;
}
- void UDPTrackerSocket::sendConnect(Int32 tid,const KNetwork::KSocketAddress & addr)
+ void UDPTrackerSocket::sendConnect(Int32 tid,const KNetwork::TDESocketAddress & addr)
{
Int64 cid = 0x41727101980LL;
Uint8 buf[16];
@@ -88,7 +88,7 @@ namespace bt
transactions.insert(tid,CONNECT);
}
- void UDPTrackerSocket::sendAnnounce(Int32 tid,const Uint8* data,const KNetwork::KSocketAddress & addr)
+ void UDPTrackerSocket::sendAnnounce(Int32 tid,const Uint8* data,const KNetwork::TDESocketAddress & addr)
{
transactions.insert(tid,ANNOUNCE);
sock->send(KDatagramPacket((char*)data,98,addr));
diff --git a/libktorrent/torrent/udptrackersocket.h b/libktorrent/torrent/udptrackersocket.h
index 2f2900b..a926b8c 100644
--- a/libktorrent/torrent/udptrackersocket.h
+++ b/libktorrent/torrent/udptrackersocket.h
@@ -29,7 +29,7 @@
namespace KNetwork
{
class KDatagramSocket;
- class KSocketAddress;
+ class TDESocketAddress;
}
namespace bt
@@ -66,7 +66,7 @@ namespace bt
* @param tid The transaction_id
* @param addr The address to send to
*/
- void sendConnect(Int32 tid,const KNetwork::KSocketAddress & addr);
+ void sendConnect(Int32 tid,const KNetwork::TDESocketAddress & addr);
/**
* Send an announce message. As a response to this, the announceRecieved
@@ -76,7 +76,7 @@ namespace bt
* @param data The data to send (connect input structure, in UDP Tracker specifaction)
* @param addr The address to send to
*/
- void sendAnnounce(Int32 tid,const Uint8* data,const KNetwork::KSocketAddress & addr);
+ void sendAnnounce(Int32 tid,const Uint8* data,const KNetwork::TDESocketAddress & addr);
/**
* If a transaction times out, this should be used to cancel it.
diff --git a/libktorrent/util/autorotatelogjob.cpp b/libktorrent/util/autorotatelogjob.cpp
index c703026..dd1424b 100644
--- a/libktorrent/util/autorotatelogjob.cpp
+++ b/libktorrent/util/autorotatelogjob.cpp
@@ -27,7 +27,7 @@ namespace bt
{
AutoRotateLogJob::AutoRotateLogJob(const TQString & file,Log* lg)
- : KIO::Job(false),file(file),cnt(10),lg(lg)
+ : TDEIO::Job(false),file(file),cnt(10),lg(lg)
{
update();
}
@@ -50,8 +50,8 @@ namespace bt
TQString curr = TQString("%1-%2.gz").arg(file).arg(cnt);
if (bt::Exists(prev)) // if file exists start the move job
{
- KIO::Job* sj = KIO::file_move(KURL::fromPathOrURL(prev),KURL::fromPathOrURL(curr),-1,true,false,false);
- connect(sj,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(moveJobDone(KIO::Job* )));
+ TDEIO::Job* sj = TDEIO::file_move(KURL::fromPathOrURL(prev),KURL::fromPathOrURL(curr),-1,true,false,false);
+ connect(sj,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(moveJobDone(TDEIO::Job* )));
return;
}
else
@@ -64,8 +64,8 @@ namespace bt
{
// move current log to 1 and zip it
bt::Move(file,file + "-1",true);
- KIO::Job* sj = KIO::file_move(KURL::fromPathOrURL(file),KURL::fromPathOrURL(file + "-1"),-1,true,false,false);
- connect(sj,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(moveJobDone(KIO::Job* )));
+ TDEIO::Job* sj = TDEIO::file_move(KURL::fromPathOrURL(file),KURL::fromPathOrURL(file + "-1"),-1,true,false,false);
+ connect(sj,TQT_SIGNAL(result(TDEIO::Job*)),this,TQT_SLOT(moveJobDone(TDEIO::Job* )));
}
else
{
@@ -78,7 +78,7 @@ namespace bt
}
- void AutoRotateLogJob::moveJobDone(KIO::Job*)
+ void AutoRotateLogJob::moveJobDone(TDEIO::Job*)
{
cnt--; // decrease counter so the newt file will be moved in update
update(); // don't care about result of job
diff --git a/libktorrent/util/autorotatelogjob.h b/libktorrent/util/autorotatelogjob.h
index 37e82a7..b1e4af1 100644
--- a/libktorrent/util/autorotatelogjob.h
+++ b/libktorrent/util/autorotatelogjob.h
@@ -33,7 +33,7 @@ namespace bt
Job which handles the rotation of the log file.
This Job must do several move jobs which must be done sequentially.
*/
- class AutoRotateLogJob : public KIO::Job
+ class AutoRotateLogJob : public TDEIO::Job
{
Q_OBJECT
@@ -44,7 +44,7 @@ namespace bt
virtual void kill(bool quietly=true);
private slots:
- void moveJobDone(KIO::Job*);
+ void moveJobDone(TDEIO::Job*);
private:
void update();
diff --git a/libktorrent/util/fileops.cpp b/libktorrent/util/fileops.cpp
index d9ef172..5aadae3 100644
--- a/libktorrent/util/fileops.cpp
+++ b/libktorrent/util/fileops.cpp
@@ -102,48 +102,48 @@ namespace bt
void Move(const TQString & src,const TQString & dst,bool nothrow)
{
// Out() << "Moving " << src << " -> " << dst << endl;
- if (!KIO::NetAccess::move(KURL::fromPathOrURL(src),KURL::fromPathOrURL(dst),0))
+ if (!TDEIO::NetAccess::move(KURL::fromPathOrURL(src),KURL::fromPathOrURL(dst),0))
{
if (!nothrow)
throw Error(i18n("Cannot move %1 to %2: %3")
.arg(src).arg(dst)
- .arg(KIO::NetAccess::lastErrorString()));
+ .arg(TDEIO::NetAccess::lastErrorString()));
else
Out() << TQString("Error : Cannot move %1 to %2: %3")
.arg(src).arg(dst)
- .arg(KIO::NetAccess::lastErrorString()) << endl;
+ .arg(TDEIO::NetAccess::lastErrorString()) << endl;
}
}
void CopyFile(const TQString & src,const TQString & dst,bool nothrow)
{
- if (!KIO::NetAccess::file_copy(KURL::fromPathOrURL(src),KURL::fromPathOrURL(dst)))
+ if (!TDEIO::NetAccess::file_copy(KURL::fromPathOrURL(src),KURL::fromPathOrURL(dst)))
{
if (!nothrow)
throw Error(i18n("Cannot copy %1 to %2: %3")
.arg(src).arg(dst)
- .arg(KIO::NetAccess::lastErrorString()));
+ .arg(TDEIO::NetAccess::lastErrorString()));
else
Out() << TQString("Error : Cannot copy %1 to %2: %3")
.arg(src).arg(dst)
- .arg(KIO::NetAccess::lastErrorString()) << endl;
+ .arg(TDEIO::NetAccess::lastErrorString()) << endl;
}
}
void CopyDir(const TQString & src,const TQString & dst,bool nothrow)
{
- if (!KIO::NetAccess::dircopy(KURL::fromPathOrURL(src),KURL::fromPathOrURL(dst),0))
+ if (!TDEIO::NetAccess::dircopy(KURL::fromPathOrURL(src),KURL::fromPathOrURL(dst),0))
{
if (!nothrow)
throw Error(i18n("Cannot copy %1 to %2: %3")
.arg(src).arg(dst)
- .arg(KIO::NetAccess::lastErrorString()));
+ .arg(TDEIO::NetAccess::lastErrorString()));
else
Out() << TQString("Error : Cannot copy %1 to %2: %3")
.arg(src).arg(dst)
- .arg(KIO::NetAccess::lastErrorString()) << endl;
+ .arg(TDEIO::NetAccess::lastErrorString()) << endl;
}
}
diff --git a/libktorrent/util/fileops.h b/libktorrent/util/fileops.h
index 067bd03..d1c3437 100644
--- a/libktorrent/util/fileops.h
+++ b/libktorrent/util/fileops.h
@@ -32,7 +32,7 @@ namespace bt
/**
* Creates a directory. Convenience function around
- * KIO::NetAccess::mkdir .
+ * TDEIO::NetAccess::mkdir .
* @param dir The url of the dir
* @param nothrow wether or not we shouldn't throw an Error upon failure
* @throw Error upon error
diff --git a/libktorrent/util/httprequest.cpp b/libktorrent/util/httprequest.cpp
index a52788e..4c869a5 100644
--- a/libktorrent/util/httprequest.cpp
+++ b/libktorrent/util/httprequest.cpp
@@ -103,7 +103,7 @@ namespace bt
void HTTPRequest::onError(int)
{
- Out() << "HTTPRequest error : " << sock->KSocketBase::errorString() << endl;
+ Out() << "HTTPRequest error : " << sock->TDESocketBase::errorString() << endl;
error(this,false);
sock->close();
operationFinished(this);
diff --git a/libktorrent/util/waitjob.cpp b/libktorrent/util/waitjob.cpp
index 9fec771..ed00f89 100644
--- a/libktorrent/util/waitjob.cpp
+++ b/libktorrent/util/waitjob.cpp
@@ -25,7 +25,7 @@
namespace bt
{
- WaitJob::WaitJob(Uint32 millis) : KIO::Job(false)
+ WaitJob::WaitJob(Uint32 millis) : TDEIO::Job(false)
{
connect(&timer,TQT_SIGNAL(timeout()),this,TQT_SLOT(timerDone()));
timer.start(millis,true);
@@ -70,14 +70,14 @@ namespace bt
void WaitJob::execute(WaitJob* job)
{
- KIO::NetAccess::synchronousRun(job,0);
+ TDEIO::NetAccess::synchronousRun(job,0);
}
void SynchronousWait(Uint32 millis)
{
Out() << "SynchronousWait" << endl;
WaitJob* j = new WaitJob(millis);
- KIO::NetAccess::synchronousRun(j,0);
+ TDEIO::NetAccess::synchronousRun(j,0);
}
}
diff --git a/libktorrent/util/waitjob.h b/libktorrent/util/waitjob.h
index c0754d6..232546a 100644
--- a/libktorrent/util/waitjob.h
+++ b/libktorrent/util/waitjob.h
@@ -35,7 +35,7 @@ namespace bt
* Job to wait for a certain amount of time or until one or more ExitOperation's have
* finished.
*/
- class WaitJob : public KIO::Job
+ class WaitJob : public TDEIO::Job
{
Q_OBJECT