summaryrefslogtreecommitdiffstats
path: root/kresources/scalix/scalixadmin/jobs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kresources/scalix/scalixadmin/jobs.cpp')
-rw-r--r--kresources/scalix/scalixadmin/jobs.cpp130
1 files changed, 65 insertions, 65 deletions
diff --git a/kresources/scalix/scalixadmin/jobs.cpp b/kresources/scalix/scalixadmin/jobs.cpp
index c463463d2..f1bce9f2c 100644
--- a/kresources/scalix/scalixadmin/jobs.cpp
+++ b/kresources/scalix/scalixadmin/jobs.cpp
@@ -30,7 +30,7 @@ Delegate::Delegate()
{
}
-Delegate::Delegate( const QString &email, int rights )
+Delegate::Delegate( const TQString &email, int rights )
: mEmail( email ), mRights( rights )
{
}
@@ -40,7 +40,7 @@ bool Delegate::isValid() const
return ( !mEmail.isEmpty() && mRights != -1 );
}
-QString Delegate::email() const
+TQString Delegate::email() const
{
return mEmail;
}
@@ -50,9 +50,9 @@ int Delegate::rights() const
return mRights;
}
-QString Delegate::rightsAsString( int rights )
+TQString Delegate::rightsAsString( int rights )
{
- QStringList rightNames;
+ TQStringList rightNames;
if ( rights & SendOnBehalfOf )
rightNames.append( i18n( "Send on behalf of" ) );
@@ -68,21 +68,21 @@ QString Delegate::rightsAsString( int rights )
SetPasswordJob* Scalix::setPassword( KIO::Slave* slave, const KURL& url,
- const QString &oldPassword, const QString& newPassword )
+ const TQString &oldPassword, const TQString& newPassword )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'X' << (int)'N'
- << QString( "X-SCALIX-PASSWORD" ) << QString( "%1 %2" ).arg( oldPassword ).arg( newPassword );
+ << TQString( "X-SCALIX-PASSWORD" ) << TQString( "%1 %2" ).arg( oldPassword ).arg( newPassword );
SetPasswordJob* job = new SetPasswordJob( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( slave, job );
return job;
}
-SetDelegateJob* Scalix::setDelegate( KIO::Slave* slave, const KURL& url, const QString& email, int params )
+SetDelegateJob* Scalix::setDelegate( KIO::Slave* slave, const KURL& url, const TQString& email, int params )
{
- QStringList types;
+ TQStringList types;
if ( params & SendOnBehalfOf )
types.append( "SOBO" );
if ( params & SeePrivate )
@@ -92,22 +92,22 @@ SetDelegateJob* Scalix::setDelegate( KIO::Slave* slave, const KURL& url, const Q
if ( params & InsteadOfMe )
types.append( "INSTEADOFME" );
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'X' << (int)'N'
- << QString( "X-SET-DELEGATE" ) << QString( "%1 %2" ).arg( email ).arg( types.join( " " ) );
+ << TQString( "X-SET-DELEGATE" ) << TQString( "%1 %2" ).arg( email ).arg( types.join( " " ) );
SetDelegateJob* job = new SetDelegateJob( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( slave, job );
return job;
}
-DeleteDelegateJob* Scalix::deleteDelegate( KIO::Slave* slave, const KURL& url, const QString& email )
+DeleteDelegateJob* Scalix::deleteDelegate( KIO::Slave* slave, const KURL& url, const TQString& email )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'X' << (int)'N'
- << QString( "X-DELETE-DELEGATE" ) << email;
+ << TQString( "X-DELETE-DELEGATE" ) << email;
DeleteDelegateJob* job = new DeleteDelegateJob( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( slave, job );
@@ -116,33 +116,33 @@ DeleteDelegateJob* Scalix::deleteDelegate( KIO::Slave* slave, const KURL& url, c
GetDelegatesJob* Scalix::getDelegates( KIO::Slave* slave, const KURL& url )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
- stream << (int)'X' << (int)'N' << QString( "X-GET-DELEGATES" ) << QString();
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
+ stream << (int)'X' << (int)'N' << TQString( "X-GET-DELEGATES" ) << TQString();
GetDelegatesJob* job = new GetDelegatesJob( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( slave, job );
return job;
}
-AddOtherUserJob* Scalix::addOtherUser( KIO::Slave* slave, const KURL& url, const QString& email )
+AddOtherUserJob* Scalix::addOtherUser( KIO::Slave* slave, const KURL& url, const TQString& email )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'X' << (int)'N'
- << QString( "X-ADD-OTHER-USER" ) << email;
+ << TQString( "X-ADD-OTHER-USER" ) << email;
AddOtherUserJob* job = new AddOtherUserJob( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( slave, job );
return job;
}
-DeleteOtherUserJob* Scalix::deleteOtherUser( KIO::Slave* slave, const KURL& url, const QString& email )
+DeleteOtherUserJob* Scalix::deleteOtherUser( KIO::Slave* slave, const KURL& url, const TQString& email )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'X' << (int)'N'
- << QString( "X-DELETE-OTHER-USER" ) << email;
+ << TQString( "X-DELETE-OTHER-USER" ) << email;
DeleteOtherUserJob* job = new DeleteOtherUserJob( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( slave, job );
@@ -151,25 +151,25 @@ DeleteOtherUserJob* Scalix::deleteOtherUser( KIO::Slave* slave, const KURL& url,
GetOtherUsersJob* Scalix::getOtherUsers( KIO::Slave* slave, const KURL& url )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'X' << (int)'N'
- << QString( "X-GET-OTHER-USERS" ) << QString();
+ << TQString( "X-GET-OTHER-USERS" ) << TQString();
GetOtherUsersJob* job = new GetOtherUsersJob( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( slave, job );
return job;
}
-SetOutOfOfficeJob* Scalix::setOutOfOffice( KIO::Slave* slave, const KURL& url, bool enabled, const QString& msg )
+SetOutOfOfficeJob* Scalix::setOutOfOffice( KIO::Slave* slave, const KURL& url, bool enabled, const TQString& msg )
{
- const QString argument = msg;
- const QString command = QString( "X-SET-OUT-OF-OFFICE %1 %2 {%3}" ).arg( enabled ? "ENABLED" : "DISABLED" )
+ const TQString argument = msg;
+ const TQString command = TQString( "X-SET-OUT-OF-OFFICE %1 %2 {%3}" ).arg( enabled ? "ENABLED" : "DISABLED" )
.arg( "UTF-8" )
.arg( msg.utf8().length() );
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int) 'X' << (int)'E' << command << argument;
SetOutOfOfficeJob* job = new SetOutOfOfficeJob( url, packedArgs, false );
@@ -179,36 +179,36 @@ SetOutOfOfficeJob* Scalix::setOutOfOffice( KIO::Slave* slave, const KURL& url, b
GetOutOfOfficeJob* Scalix::getOutOfOffice( KIO::Slave* slave, const KURL& url )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'X' << (int)'N'
- << QString( "X-GET-OUT-OF-OFFICE" ) << QString();
+ << TQString( "X-GET-OUT-OF-OFFICE" ) << TQString();
GetOutOfOfficeJob* job = new GetOutOfOfficeJob( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( slave, job );
return job;
}
-SetPasswordJob::SetPasswordJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+SetPasswordJob::SetPasswordJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
}
-SetDelegateJob::SetDelegateJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+SetDelegateJob::SetDelegateJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
}
-DeleteDelegateJob::DeleteDelegateJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+DeleteDelegateJob::DeleteDelegateJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
}
-GetDelegatesJob::GetDelegatesJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+GetDelegatesJob::GetDelegatesJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
- connect( this, SIGNAL( infoMessage( KIO::Job*, const QString& ) ),
- this, SLOT( slotInfoMessage( KIO::Job*, const QString& ) ) );
+ connect( this, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString& ) ),
+ this, TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString& ) ) );
}
Delegate::List GetDelegatesJob::delegates() const
@@ -216,21 +216,21 @@ Delegate::List GetDelegatesJob::delegates() const
return mDelegates;
}
-void GetDelegatesJob::slotInfoMessage( KIO::Job*, const QString &data )
+void GetDelegatesJob::slotInfoMessage( KIO::Job*, const TQString &data )
{
/**
* The passed data have the following form:
*
* "user1@host.com:right1,right2,right4 user2@host.com:right3,right5"
*/
- QStringList delegates = QStringList::split( ' ', data );
+ TQStringList delegates = TQStringList::split( ' ', data );
for ( uint i = 0; i < delegates.count(); ++i ) {
- QStringList delegate = QStringList::split( ':', delegates[ i ] );
+ TQStringList delegate = TQStringList::split( ':', delegates[ i ] );
- const QString email = delegate[ 0 ];
+ const TQString email = delegate[ 0 ];
int rights = 0;
- QStringList rightsList = QStringList::split( ',', delegate[ 1 ] );
+ TQStringList rightsList = TQStringList::split( ',', delegate[ 1 ] );
for ( uint j = 0; j < rightsList.count(); ++j ) {
if ( rightsList[ j ] == "SOBO" )
rights |= SendOnBehalfOf;
@@ -246,43 +246,43 @@ void GetDelegatesJob::slotInfoMessage( KIO::Job*, const QString &data )
}
}
-AddOtherUserJob::AddOtherUserJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+AddOtherUserJob::AddOtherUserJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
}
-DeleteOtherUserJob::DeleteOtherUserJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+DeleteOtherUserJob::DeleteOtherUserJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
}
-GetOtherUsersJob::GetOtherUsersJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+GetOtherUsersJob::GetOtherUsersJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
- connect( this, SIGNAL( infoMessage( KIO::Job*, const QString& ) ),
- this, SLOT( slotInfoMessage( KIO::Job*, const QString& ) ) );
+ connect( this, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString& ) ),
+ this, TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString& ) ) );
}
-QStringList GetOtherUsersJob::otherUsers() const
+TQStringList GetOtherUsersJob::otherUsers() const
{
return mOtherUsers;
}
-void GetOtherUsersJob::slotInfoMessage( KIO::Job*, const QString &data )
+void GetOtherUsersJob::slotInfoMessage( KIO::Job*, const TQString &data )
{
- mOtherUsers = QStringList::split( ' ', data );
+ mOtherUsers = TQStringList::split( ' ', data );
}
-SetOutOfOfficeJob::SetOutOfOfficeJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+SetOutOfOfficeJob::SetOutOfOfficeJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
}
-GetOutOfOfficeJob::GetOutOfOfficeJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+GetOutOfOfficeJob::GetOutOfOfficeJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
- connect( this, SIGNAL( infoMessage( KIO::Job*, const QString& ) ),
- this, SLOT( slotInfoMessage( KIO::Job*, const QString& ) ) );
+ connect( this, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString& ) ),
+ this, TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString& ) ) );
}
bool GetOutOfOfficeJob::enabled() const
@@ -290,14 +290,14 @@ bool GetOutOfOfficeJob::enabled() const
return mEnabled;
}
-QString GetOutOfOfficeJob::message() const
+TQString GetOutOfOfficeJob::message() const
{
return mMessage;
}
-void GetOutOfOfficeJob::slotInfoMessage( KIO::Job*, const QString &data )
+void GetOutOfOfficeJob::slotInfoMessage( KIO::Job*, const TQString &data )
{
- const QStringList fields = QStringList::split( '^', data );
+ const TQStringList fields = TQStringList::split( '^', data );
mEnabled = ( fields[ 0 ] == "ENABLED" );
mMessage = fields[ 1 ];