summaryrefslogtreecommitdiffstats
path: root/korn/tdeio_delete.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'korn/tdeio_delete.cpp')
-rw-r--r--korn/tdeio_delete.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/korn/tdeio_delete.cpp b/korn/tdeio_delete.cpp
index 1bb87d258..f26b5fe3d 100644
--- a/korn/tdeio_delete.cpp
+++ b/korn/tdeio_delete.cpp
@@ -20,7 +20,7 @@
#include "mailid.h"
#include "stringid.h"
-#include "kio.h"
+#include "tdeio.h"
#include "tdeio_proto.h"
#include <kdebug.h>
@@ -32,8 +32,8 @@
#include <tqptrlist.h>
-KIO_Delete::KIO_Delete( TQObject * parent, const char * name ) : TQObject( parent, name ),
- _kio( 0 ),
+TDEIO_Delete::TDEIO_Delete( TQObject * parent, const char * name ) : TQObject( parent, name ),
+ _tdeio( 0 ),
_total( 0 ),
_jobs( 0 ),
_slave( 0 ),
@@ -42,25 +42,25 @@ KIO_Delete::KIO_Delete( TQObject * parent, const char * name ) : TQObject( paren
_jobs = new TQPtrList< TDEIO::Job >;
}
-KIO_Delete::~KIO_Delete( )
+TDEIO_Delete::~TDEIO_Delete( )
{
disConnect( );
delete _jobs;
}
-bool KIO_Delete::deleteMails( TQPtrList< const KornMailId > * ids, KKioDrop *drop )
+bool TDEIO_Delete::deleteMails( TQPtrList< const KornMailId > * ids, KKioDrop *drop )
{
KURL kurl = *drop->_kurl;
TDEIO::MetaData metadata = *drop->_metadata;
- _kio = drop;
+ _tdeio = drop;
_valid = true;
//disConnect earlier operations
disConnect( );
- if( _kio->_protocol->connectionBased( ) )
+ if( _tdeio->_protocol->connectionBased( ) )
{
- if( ! setupSlave( kurl, metadata, _kio->_protocol ) )
+ if( ! setupSlave( kurl, metadata, _tdeio->_protocol ) )
{
_valid = false;
return false;
@@ -70,24 +70,24 @@ bool KIO_Delete::deleteMails( TQPtrList< const KornMailId > * ids, KKioDrop *dro
_total = ids->count( );
for( const KornMailId * item = ids->first(); item; item = ids->next() )
- deleteItem( item, kurl, metadata, _kio->_protocol );
+ deleteItem( item, kurl, metadata, _tdeio->_protocol );
if( _jobs->count() == 0 )
{
- _kio->emitDeleteMailsReady( true );
+ _tdeio->emitDeleteMailsReady( true );
disConnect( );
return true;
}
- if( _kio->_protocol->commitDelete() )
- commitDelete( kurl, metadata, _kio->_protocol );
+ if( _tdeio->_protocol->commitDelete() )
+ commitDelete( kurl, metadata, _tdeio->_protocol );
- _kio->emitDeleteMailsTotalSteps( _total );
+ _tdeio->emitDeleteMailsTotalSteps( _total );
return true;
}
-void KIO_Delete::disConnect( )
+void TDEIO_Delete::disConnect( )
{
_jobs->clear( );
@@ -98,12 +98,12 @@ void KIO_Delete::disConnect( )
}
}
-bool KIO_Delete::setupSlave( KURL kurl, TDEIO::MetaData metadata, const KIO_Protocol *& protocol )
+bool TDEIO_Delete::setupSlave( KURL kurl, TDEIO::MetaData metadata, const TDEIO_Protocol *& protocol )
{
protocol->deleteMailConnectKURL( kurl, metadata );
if( kurl.port() == 0 )
- kurl.setPort( protocol->defaultPort( _kio->_ssl ) );
+ kurl.setPort( protocol->defaultPort( _tdeio->_ssl ) );
if( ! ( _slave = TDEIO::Scheduler::getConnectedSlave( kurl, metadata ) ) )
{
@@ -115,7 +115,7 @@ bool KIO_Delete::setupSlave( KURL kurl, TDEIO::MetaData metadata, const KIO_Prot
return true;
}
-void KIO_Delete::deleteItem( const KornMailId *item, KURL kurl, TDEIO::MetaData metadata, const KIO_Protocol *& protocol )
+void TDEIO_Delete::deleteItem( const KornMailId *item, KURL kurl, TDEIO::MetaData metadata, const TDEIO_Protocol *& protocol )
{
TDEIO::Job* job = 0;
@@ -124,9 +124,9 @@ void KIO_Delete::deleteItem( const KornMailId *item, KURL kurl, TDEIO::MetaData
protocol->deleteMailKURL( kurl, metadata );
if( kurl.port() == 0 )
- kurl.setPort( protocol->defaultPort( _kio->_ssl ) );
+ kurl.setPort( protocol->defaultPort( _tdeio->_ssl ) );
- if( protocol->deleteFunction() == KIO_Protocol::get )
+ if( protocol->deleteFunction() == TDEIO_Protocol::get )
{
job = TDEIO::get( kurl, true, false );
@@ -135,7 +135,7 @@ void KIO_Delete::deleteItem( const KornMailId *item, KURL kurl, TDEIO::MetaData
else
TDEIO::Scheduler::scheduleJob( dynamic_cast< TDEIO::SimpleJob* >( job ) );
}
- else if( protocol->deleteFunction() == KIO_Protocol::del )
+ else if( protocol->deleteFunction() == TDEIO_Protocol::del )
{
job = TDEIO::del( kurl, false, false );
}
@@ -152,12 +152,12 @@ void KIO_Delete::deleteItem( const KornMailId *item, KURL kurl, TDEIO::MetaData
/*
* Some protocols needs to a command to commit protocols.
*/
-void KIO_Delete::commitDelete( KURL kurl, TDEIO::MetaData metadata, const KIO_Protocol *& protocol )
+void TDEIO_Delete::commitDelete( KURL kurl, TDEIO::MetaData metadata, const TDEIO_Protocol *& protocol )
{
protocol->deleteCommitKURL( kurl, metadata );
if( kurl.port() == 0 )
- kurl.setPort( protocol->defaultPort( _kio->_ssl ) );
+ kurl.setPort( protocol->defaultPort( _tdeio->_ssl ) );
TDEIO::TransferJob *job = TDEIO::get( kurl, true, false );
job->addMetaData( metadata );
@@ -173,12 +173,12 @@ void KIO_Delete::commitDelete( KURL kurl, TDEIO::MetaData metadata, const KIO_Pr
_total++;
}
-void KIO_Delete::canceled( )
+void TDEIO_Delete::canceled( )
{
disConnect( );
}
-void KIO_Delete::slotResult( TDEIO::Job* job )
+void TDEIO_Delete::slotResult( TDEIO::Job* job )
{
if( job->error() )
{
@@ -188,11 +188,11 @@ void KIO_Delete::slotResult( TDEIO::Job* job )
_jobs->remove( job );
- _kio->emitDeleteMailsProgress( _total - _jobs->count() );
+ _tdeio->emitDeleteMailsProgress( _total - _jobs->count() );
if( _jobs->isEmpty() )
{
- _kio->emitDeleteMailsReady( _valid );
+ _tdeio->emitDeleteMailsReady( _valid );
disConnect();
}
}