summaryrefslogtreecommitdiffstats
path: root/libktorrent/torrent
diff options
context:
space:
mode:
Diffstat (limited to 'libktorrent/torrent')
-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
16 files changed, 63 insertions, 63 deletions
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.