diff options
Diffstat (limited to 'kio/kio/observer.cpp')
-rw-r--r-- | kio/kio/observer.cpp | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/kio/kio/observer.cpp b/kio/kio/observer.cpp index 599703f9b..347db9df9 100644 --- a/kio/kio/observer.cpp +++ b/kio/kio/observer.cpp @@ -41,15 +41,15 @@ #include <ksslcertchain.h> #include <klocale.h> -using namespace KIO; +using namespace TDEIO; -template class TQIntDict<KIO::Job>; +template class TQIntDict<TDEIO::Job>; Observer * Observer::s_pObserver = 0L; const int KDEBUG_OBSERVER = 7007; // Should be 7028 -Observer::Observer() : DCOPObject("KIO::Observer") +Observer::Observer() : DCOPObject("TDEIO::Observer") { // Register app as able to receive DCOP messages if (kapp && !kapp->dcopClient()->isAttached()) @@ -78,7 +78,7 @@ Observer::Observer() : DCOPObject("KIO::Observer") m_uiserver = new UIServer_stub( "kio_uiserver", "UIServer" ); } -int Observer::newJob( KIO::Job * job, bool showProgress ) +int Observer::newJob( TDEIO::Job * job, bool showProgress ) { // Tell the UI Server about this new job, and give it the application id // at the same time @@ -98,7 +98,7 @@ void Observer::jobFinished( int progressId ) void Observer::killJob( int progressId ) { - KIO::Job * job = m_dctJobs[ progressId ]; + TDEIO::Job * job = m_dctJobs[ progressId ]; if (!job) { kdWarning() << "Can't find job to kill ! There is no job with progressId=" << progressId << " in this process" << endl; @@ -109,111 +109,111 @@ void Observer::killJob( int progressId ) MetaData Observer::metadata( int progressId ) { - KIO::Job * job = m_dctJobs[ progressId ]; + TDEIO::Job * job = m_dctJobs[ progressId ]; assert(job); return job->metaData(); } -void Observer::slotTotalSize( KIO::Job* job, KIO::filesize_t size ) +void Observer::slotTotalSize( TDEIO::Job* job, TDEIO::filesize_t size ) { - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotTotalSize " << job << " " << KIO::number(size) << endl; + //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotTotalSize " << job << " " << TDEIO::number(size) << endl; m_uiserver->totalSize64( job->progressId(), size ); } -void Observer::slotTotalFiles( KIO::Job* job, unsigned long files ) +void Observer::slotTotalFiles( TDEIO::Job* job, unsigned long files ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotTotalFiles " << job << " " << files << endl; m_uiserver->totalFiles( job->progressId(), files ); } -void Observer::slotTotalDirs( KIO::Job* job, unsigned long dirs ) +void Observer::slotTotalDirs( TDEIO::Job* job, unsigned long dirs ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotTotalDirs " << job << " " << dirs << endl; m_uiserver->totalDirs( job->progressId(), dirs ); } -void Observer::slotProcessedSize( KIO::Job* job, KIO::filesize_t size ) +void Observer::slotProcessedSize( TDEIO::Job* job, TDEIO::filesize_t size ) { - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotProcessedSize " << job << " " << job->progressId() << " " << KIO::number(size) << endl; + //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotProcessedSize " << job << " " << job->progressId() << " " << TDEIO::number(size) << endl; m_uiserver->processedSize64( job->progressId(), size ); } -void Observer::slotProcessedFiles( KIO::Job* job, unsigned long files ) +void Observer::slotProcessedFiles( TDEIO::Job* job, unsigned long files ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotProcessedFiles " << job << " " << files << endl; m_uiserver->processedFiles( job->progressId(), files ); } -void Observer::slotProcessedDirs( KIO::Job* job, unsigned long dirs ) +void Observer::slotProcessedDirs( TDEIO::Job* job, unsigned long dirs ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotProcessedDirs " << job << " " << dirs << endl; m_uiserver->processedDirs( job->progressId(), dirs ); } -void Observer::slotSpeed( KIO::Job* job, unsigned long speed ) +void Observer::slotSpeed( TDEIO::Job* job, unsigned long speed ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotSpeed " << job << " " << speed << endl; m_uiserver->speed( job->progressId(), speed ); } -void Observer::slotPercent( KIO::Job* job, unsigned long percent ) +void Observer::slotPercent( TDEIO::Job* job, unsigned long percent ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotPercent " << job << " " << percent << endl; m_uiserver->percent( job->progressId(), percent ); } -void Observer::slotInfoMessage( KIO::Job* job, const TQString & msg ) +void Observer::slotInfoMessage( TDEIO::Job* job, const TQString & msg ) { m_uiserver->infoMessage( job->progressId(), msg ); } -void Observer::slotCopying( KIO::Job* job, const KURL& from, const KURL& to ) +void Observer::slotCopying( TDEIO::Job* job, const KURL& from, const KURL& to ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotCopying " << job << " " << from.url() << " " << to.url() << endl; m_uiserver->copying( job->progressId(), from, to ); } -void Observer::slotMoving( KIO::Job* job, const KURL& from, const KURL& to ) +void Observer::slotMoving( TDEIO::Job* job, const KURL& from, const KURL& to ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotMoving " << job << " " << from.url() << " " << to.url() << endl; m_uiserver->moving( job->progressId(), from, to ); } -void Observer::slotDeleting( KIO::Job* job, const KURL& url ) +void Observer::slotDeleting( TDEIO::Job* job, const KURL& url ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotDeleting " << job << " " << url.url() << endl; m_uiserver->deleting( job->progressId(), url ); } -void Observer::slotTransferring( KIO::Job* job, const KURL& url ) +void Observer::slotTransferring( TDEIO::Job* job, const KURL& url ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotTransferring " << job << " " << url.url() << endl; m_uiserver->transferring( job->progressId(), url ); } -void Observer::slotCreatingDir( KIO::Job* job, const KURL& dir ) +void Observer::slotCreatingDir( TDEIO::Job* job, const KURL& dir ) { //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotCreatingDir " << job << " " << dir.url() << endl; m_uiserver->creatingDir( job->progressId(), dir ); } -void Observer::slotCanResume( KIO::Job* job, KIO::filesize_t offset ) +void Observer::slotCanResume( TDEIO::Job* job, TDEIO::filesize_t offset ) { - //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotCanResume " << job << " " << KIO::number(offset) << endl; + //kdDebug(KDEBUG_OBSERVER) << "** Observer::slotCanResume " << job << " " << TDEIO::number(offset) << endl; m_uiserver->canResume64( job->progressId(), offset ); } -void Observer::stating( KIO::Job* job, const KURL& url ) +void Observer::stating( TDEIO::Job* job, const KURL& url ) { m_uiserver->stating( job->progressId(), url ); } -void Observer::mounting( KIO::Job* job, const TQString & dev, const TQString & point ) +void Observer::mounting( TDEIO::Job* job, const TQString & dev, const TQString & point ) { m_uiserver->mounting( job->progressId(), dev, point ); } -void Observer::unmounting( KIO::Job* job, const TQString & point ) +void Observer::unmounting( TDEIO::Job* job, const TQString & point ) { m_uiserver->unmounting( job->progressId(), point ); } @@ -235,11 +235,11 @@ bool Observer::openPassDlg( const TQString& prompt, TQString& user, return result; } -bool Observer::openPassDlg( KIO::AuthInfo& info ) +bool Observer::openPassDlg( TDEIO::AuthInfo& info ) { kdDebug(KDEBUG_OBSERVER) << "Observer::openPassDlg: User= " << info.username << ", Message= " << info.prompt << endl; - int result = KIO::PasswordDialog::getNameAndPassword( info.username, info.password, + int result = TDEIO::PasswordDialog::getNameAndPassword( info.username, info.password, &info.keepPassword, info.prompt, info.readOnly, info.caption, info.comment, info.commentLabel ); @@ -264,39 +264,39 @@ int Observer::messageBox( int progressId, int type, const TQString &text, { kdDebug() << "Observer::messageBox " << type << " " << text << " - " << caption << endl; int result = -1; - KConfig *config = new KConfig("kioslaverc"); + TDEConfig *config = new TDEConfig("kioslaverc"); KMessageBox::setDontShowAskAgainConfig(config); switch (type) { - case KIO::SlaveBase::QuestionYesNo: + case TDEIO::SlaveBase::QuestionYesNo: result = KMessageBox::questionYesNo( 0L, // parent ? text, caption, buttonYes, buttonNo, dontAskAgainName ); break; - case KIO::SlaveBase::WarningYesNo: + case TDEIO::SlaveBase::WarningYesNo: result = KMessageBox::warningYesNo( 0L, // parent ? text, caption, buttonYes, buttonNo, dontAskAgainName ); break; - case KIO::SlaveBase::WarningContinueCancel: + case TDEIO::SlaveBase::WarningContinueCancel: result = KMessageBox::warningContinueCancel( 0L, // parent ? text, caption, buttonYes, dontAskAgainName ); break; - case KIO::SlaveBase::WarningYesNoCancel: + case TDEIO::SlaveBase::WarningYesNoCancel: result = KMessageBox::warningYesNoCancel( 0L, // parent ? text, caption, buttonYes, buttonNo, dontAskAgainName ); break; - case KIO::SlaveBase::Information: + case TDEIO::SlaveBase::Information: KMessageBox::information( 0L, // parent ? text, caption, dontAskAgainName ); result = 1; // whatever break; - case KIO::SlaveBase::SSLMessageBox: + case TDEIO::SlaveBase::SSLMessageBox: { TQCString observerAppId = caption.utf8(); // hack, see slaveinterface.cpp - // Contact the object "KIO::Observer" in the application <appId> + // Contact the object "TDEIO::Observer" in the application <appId> // Yes, this could be the same application we are, but not necessarily. - Observer_stub observer( observerAppId, "KIO::Observer" ); + Observer_stub observer( observerAppId, "TDEIO::Observer" ); - KIO::MetaData meta = observer.metadata( progressId ); + TDEIO::MetaData meta = observer.metadata( progressId ); KSSLInfoDlg *kid = new KSSLInfoDlg(meta["ssl_in_use"].upper()=="TRUE", 0L /*parent?*/, 0L, true); KSSLCertificate *x = KSSLCertificate::fromString(meta["ssl_peer_certificate"].local8Bit()); if (x) { @@ -367,12 +367,12 @@ int Observer::messageBox( int progressId, int type, const TQString &text, #endif } -RenameDlg_Result Observer::open_RenameDlg( KIO::Job* job, +RenameDlg_Result Observer::open_RenameDlg( TDEIO::Job* job, const TQString & caption, const TQString& src, const TQString & dest, RenameDlg_Mode mode, TQString& newDest, - KIO::filesize_t sizeSrc, - KIO::filesize_t sizeDest, + TDEIO::filesize_t sizeSrc, + TDEIO::filesize_t sizeDest, time_t ctimeSrc, time_t ctimeDest, time_t mtimeSrc, @@ -387,7 +387,7 @@ RenameDlg_Result Observer::open_RenameDlg( KIO::Job* job, m_uiserver->setJobVisible( job->progressId(), false ); // We now do it in process => KDE4: move this code out of Observer (back to job.cpp), so that // opening the rename dialog doesn't start uiserver for nothing if progressId=0 (e.g. F2 in konq) - RenameDlg_Result res = KIO::open_RenameDlg( caption, src, dest, mode, + RenameDlg_Result res = TDEIO::open_RenameDlg( caption, src, dest, mode, newDest, sizeSrc, sizeDest, ctimeSrc, ctimeDest, mtimeSrc, mtimeDest ); @@ -396,7 +396,7 @@ RenameDlg_Result Observer::open_RenameDlg( KIO::Job* job, return res; } -SkipDlg_Result Observer::open_SkipDlg( KIO::Job* job, +SkipDlg_Result Observer::open_SkipDlg( TDEIO::Job* job, bool _multi, const TQString& _error_text ) { @@ -404,8 +404,8 @@ SkipDlg_Result Observer::open_SkipDlg( KIO::Job* job, // Hide existing dialog box if any if (job && job->progressId()) m_uiserver->setJobVisible( job->progressId(), false ); - // We now do it in process. So this method is a useless wrapper around KIO::open_RenameDlg. - SkipDlg_Result res = KIO::open_SkipDlg( _multi, _error_text ); + // We now do it in process. So this method is a useless wrapper around TDEIO::open_RenameDlg. + SkipDlg_Result res = TDEIO::open_SkipDlg( _multi, _error_text ); if (job && job->progressId()) m_uiserver->setJobVisible( job->progressId(), true ); return res; |