diff options
Diffstat (limited to 'kresources/scalix/kioslave/scalix.cpp')
-rw-r--r-- | kresources/scalix/kioslave/scalix.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/kresources/scalix/kioslave/scalix.cpp b/kresources/scalix/kioslave/scalix.cpp index 199bd0980..043b0f4a1 100644 --- a/kresources/scalix/kioslave/scalix.cpp +++ b/kresources/scalix/kioslave/scalix.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qapplication.h> -#include <qeventloop.h> +#include <tqapplication.h> +#include <tqeventloop.h> #include <kapplication.h> #include <kcmdlineargs.h> @@ -62,7 +62,7 @@ int kdemain( int argc, char **argv ) return 0; } -Scalix::Scalix( const QCString &protocol, const QCString &pool, const QCString &app ) +Scalix::Scalix( const TQCString &protocol, const TQCString &pool, const TQCString &app ) : SlaveBase( protocol, pool, app ) { } @@ -71,7 +71,7 @@ void Scalix::get( const KURL &url ) { mimeType( "text/plain" ); - QString path = url.path(); + TQString path = url.path(); if ( path.contains( "/freebusy/" ) ) { retrieveFreeBusy( url ); @@ -82,7 +82,7 @@ void Scalix::get( const KURL &url ) void Scalix::put( const KURL& url, int, bool, bool ) { - QString path = url.path(); + TQString path = url.path(); if ( path.contains( "/freebusy/" ) ) { publishFreeBusy( url ); @@ -99,27 +99,27 @@ void Scalix::retrieveFreeBusy( const KURL &url ) */ // Extract user@domain (e.g. everything between '/freebusy/' and '.ifb') - const QString requestUser = url.path().mid( 10, url.path().length() - 14 ); + const TQString requestUser = url.path().mid( 10, url.path().length() - 14 ); - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); - const QString argument = QString( "BEGIN:VFREEBUSY\nATTENDEE:MAILTO:%1\nEND:VFREEBUSY" ).arg( requestUser ); - const QString command = QString( "X-GET-ICAL-FREEBUSY {%1}" ).arg( argument.length() ); + const TQString argument = TQString( "BEGIN:VFREEBUSY\nATTENDEE:MAILTO:%1\nEND:VFREEBUSY" ).arg( requestUser ); + const TQString command = TQString( "X-GET-ICAL-FREEBUSY {%1}" ).arg( argument.length() ); stream << (int) 'X' << 'E' << command << argument; - QString imapUrl = QString( "imap://%1@%3/" ).arg( url.pass().isEmpty() ? + TQString imapUrl = TQString( "imap://%1@%3/" ).arg( url.pass().isEmpty() ? url.user() : url.user() + ":" + url.pass() ) .arg( url.host() ); - mFreeBusyData = QString(); + mFreeBusyData = TQString(); KIO::SimpleJob *job = KIO::special( imapUrl, packedArgs, false ); - connect( job, SIGNAL( infoMessage( KIO::Job*, const QString& ) ), - this, SLOT( slotInfoMessage( KIO::Job*, const QString& ) ) ); - connect( job, SIGNAL( result( KIO::Job* ) ), - this, SLOT( slotRetrieveResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString& ) ), + this, TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString& ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( slotRetrieveResult( KIO::Job* ) ) ); qApp->eventLoop()->enterLoop(); } @@ -130,8 +130,8 @@ void Scalix::publishFreeBusy( const KURL &url ) * The url is of the following form: * scalix://user:password@host/freebusy/path/to/calendar/user@domain */ - QString requestUser, calendar; - QString path = url.path(); + TQString requestUser, calendar; + TQString path = url.path(); // extract user name int lastSlash = path.findRev( '/' ); @@ -149,11 +149,11 @@ void Scalix::publishFreeBusy( const KURL &url ) }; // read freebusy information - QByteArray data; + TQByteArray data; while ( true ) { dataReq(); - QByteArray buffer; + TQByteArray buffer; const int newSize = readData(buffer); if ( newSize < 0 ) { // read error: network in unknown state so disconnect @@ -169,26 +169,26 @@ void Scalix::publishFreeBusy( const KURL &url ) memcpy( data.data() + oldSize, buffer.data(), buffer.size() ); } - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); - const QString argument = QString::fromUtf8( data ); - const QString command = QString( "X-PUT-ICAL-FREEBUSY Calendar {%1}" ).arg( argument.length() ); + const TQString argument = TQString::fromUtf8( data ); + const TQString command = TQString( "X-PUT-ICAL-FREEBUSY Calendar {%1}" ).arg( argument.length() ); stream << (int) 'X' << 'E' << command << argument; - QString imapUrl = QString( "imap://%1@%3/" ).arg( url.pass().isEmpty() ? + TQString imapUrl = TQString( "imap://%1@%3/" ).arg( url.pass().isEmpty() ? url.user() : url.user() + ":" + url.pass() ) .arg( url.host() ); KIO::SimpleJob *job = KIO::special( imapUrl, packedArgs, false ); - connect( job, SIGNAL( result( KIO::Job* ) ), - this, SLOT( slotPublishResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( slotPublishResult( KIO::Job* ) ) ); qApp->eventLoop()->enterLoop(); } -void Scalix::slotInfoMessage( KIO::Job *job, const QString &data ) +void Scalix::slotInfoMessage( KIO::Job *job, const TQString &data ) { if ( job->error() ) { // error is handled in slotResult |