summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/oscar/liboscar/client.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/oscar/liboscar/client.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/oscar/liboscar/client.cpp')
-rw-r--r--kopete/protocols/oscar/liboscar/client.cpp308
1 files changed, 154 insertions, 154 deletions
diff --git a/kopete/protocols/oscar/liboscar/client.cpp b/kopete/protocols/oscar/liboscar/client.cpp
index af967512..222d9d69 100644
--- a/kopete/protocols/oscar/liboscar/client.cpp
+++ b/kopete/protocols/oscar/liboscar/client.cpp
@@ -20,8 +20,8 @@
#include "client.h"
-#include <qtimer.h>
-#include <qtextcodec.h>
+#include <tqtimer.h>
+#include <tqtextcodec.h>
#include <kdebug.h> //for kdDebug()
#include <klocale.h>
@@ -66,13 +66,13 @@ namespace
class DefaultCodecProvider : public Client::CodecProvider
{
public:
- virtual QTextCodec* codecForContact( const QString& ) const
+ virtual TQTextCodec* codecForContact( const TQString& ) const
{
- return QTextCodec::codecForMib( 4 );
+ return TQTextCodec::codecForMib( 4 );
}
- virtual QTextCodec* codecForAccount() const
+ virtual TQTextCodec* codecForAccount() const
{
- return QTextCodec::codecForMib( 4 );
+ return TQTextCodec::codecForMib( 4 );
}
};
@@ -84,7 +84,7 @@ class Client::ClientPrivate
public:
ClientPrivate() {}
- QString host, user, pass;
+ TQString host, user, pass;
uint port;
int tzoffset;
bool active;
@@ -95,11 +95,11 @@ public:
//Protocol specific data
bool isIcq;
bool redirectRequested;
- QValueList<WORD> redirectionServices;
+ TQValueList<WORD> redirectionServices;
WORD currentRedirect;
- QByteArray cookie;
+ TQByteArray cookie;
DWORD connectAsStatus; // icq only
- QString connectWithMessage; // icq only
+ TQString connectWithMessage; // icq only
Oscar::Settings* settings;
//Tasks
@@ -120,25 +120,25 @@ public:
UserDetails ourDetails;
//Infos
- QValueList<int> exchanges;
+ TQValueList<int> exchanges;
- QString statusMessage; // for away-,DND-message etc...
+ TQString statusMessage; // for away-,DND-message etc...
//away messages
struct AwayMsgRequest
{
- QString contact;
+ TQString contact;
ICQStatus contactStatus;
};
- QValueList<AwayMsgRequest> awayMsgRequestQueue;
- QTimer* awayMsgRequestTimer;
+ TQValueList<AwayMsgRequest> awayMsgRequestQueue;
+ TQTimer* awayMsgRequestTimer;
CodecProvider* codecProvider;
const Oscar::ClientVersion* version;
};
-Client::Client( QObject* parent )
-:QObject( parent, "oscarclient" )
+Client::Client( TQObject* parent )
+:TQObject( parent, "oscarclient" )
{
m_loginTask = 0L;
m_loginTaskTwo = 0L;
@@ -162,13 +162,13 @@ Client::Client( QObject* parent )
d->stage = ClientPrivate::StageOne;
d->typingNotifyTask = 0L;
d->ssiModifyTask = 0L;
- d->awayMsgRequestTimer = new QTimer();
+ d->awayMsgRequestTimer = new TQTimer();
d->codecProvider = &defaultCodecProvider;
- connect( this, SIGNAL( redirectionFinished( WORD ) ),
- this, SLOT( checkRedirectionQueue( WORD ) ) );
- connect( d->awayMsgRequestTimer, SIGNAL( timeout() ),
- this, SLOT( nextICQAwayMessageRequest() ) );
+ connect( this, TQT_SIGNAL( redirectionFinished( WORD ) ),
+ this, TQT_SLOT( checkRedirectionQueue( WORD ) ) );
+ connect( d->awayMsgRequestTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( nextICQAwayMessageRequest() ) );
}
Client::~Client()
@@ -188,20 +188,20 @@ Oscar::Settings* Client::clientSettings() const
return d->settings;
}
-void Client::connectToServer( Connection *c, const QString& server, bool auth )
+void Client::connectToServer( Connection *c, const TQString& server, bool auth )
{
d->connections.append( c );
if ( auth == true )
{
m_loginTask = new StageOneLoginTask( c->rootTask() );
- connect( m_loginTask, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) );
+ connect( m_loginTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) );
}
- connect( c, SIGNAL( socketError( int, const QString& ) ), this, SLOT( determineDisconnection( int, const QString& ) ) );
+ connect( c, TQT_SIGNAL( socketError( int, const TQString& ) ), this, TQT_SLOT( determineDisconnection( int, const TQString& ) ) );
c->connectToServer(server, auth);
}
-void Client::start( const QString &host, const uint port, const QString &userId, const QString &pass )
+void Client::start( const TQString &host, const uint port, const TQString &userId, const TQString &pass )
{
Q_UNUSED( host );
Q_UNUSED( port );
@@ -223,7 +223,7 @@ void Client::close()
if ( d->stage == ClientPrivate::StageTwo )
{
d->connectAsStatus = 0x0;
- d->connectWithMessage = QString::null;
+ d->connectWithMessage = TQString::null;
}
d->exchanges.clear();
@@ -233,18 +233,18 @@ void Client::close()
d->ssiManager->clear();
}
-void Client::setStatus( AIMStatus status, const QString &_message )
+void Client::setStatus( AIMStatus status, const TQString &_message )
{
// AIM: you're away exactly when your away message isn't empty.
- // can't use QString::null as a message either; ProfileTask
+ // can't use TQString::null as a message either; ProfileTask
// interprets null as "don't change".
- QString message;
+ TQString message;
if ( status == Online )
- message = QString::fromAscii("");
+ message = TQString::fromAscii("");
else
{
if ( _message.isEmpty() )
- message = QString::fromAscii(" ");
+ message = TQString::fromAscii(" ");
else
message = _message;
}
@@ -257,7 +257,7 @@ void Client::setStatus( AIMStatus status, const QString &_message )
pt->go( true );
}
-void Client::setStatus( DWORD status, const QString &message )
+void Client::setStatus( DWORD status, const TQString &message )
{
// remember the message to reply with, when requested
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Setting status message to "<< message << endl;
@@ -302,7 +302,7 @@ UserDetails Client::ourInfo() const
return d->ourDetails;
}
-QString Client::host()
+TQString Client::host()
{
return d->host;
}
@@ -343,7 +343,7 @@ void Client::lt_loginFinished()
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "stage two done. setting up services" << endl;
initializeStaticTasks();
ServiceSetupTask* ssTask = new ServiceSetupTask( d->connections.defaultConnection()->rootTask() );
- connect( ssTask, SIGNAL( finished() ), this, SLOT( serviceSetupFinished() ) );
+ connect( ssTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( serviceSetupFinished() ) );
ssTask->go( true ); //fire and forget
m_loginTaskTwo->deleteLater();
m_loginTaskTwo = 0;
@@ -351,7 +351,7 @@ void Client::lt_loginFinished()
else if ( d->stage == ClientPrivate::StageOne )
{
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "stage one login done" << endl;
- disconnect( m_loginTask, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) );
+ disconnect( m_loginTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) );
if ( m_loginTask->statusCode() == 0 ) //we can start stage two
{
@@ -362,7 +362,7 @@ void Client::lt_loginFinished()
d->port = m_loginTask->bosPort().toUInt();
d->cookie = m_loginTask->loginCookie();
close();
- QTimer::singleShot( 100, this, SLOT(startStageTwo() ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT(startStageTwo() ) );
}
else
{
@@ -379,17 +379,17 @@ void Client::lt_loginFinished()
void Client::startStageTwo()
{
//create a new connection and set it up
- Connection* c = createConnection( d->host, QString::number( d->port ) );
+ Connection* c = createConnection( d->host, TQString::number( d->port ) );
new CloseConnectionTask( c->rootTask() );
//create the new login task
m_loginTaskTwo = new StageTwoLoginTask( c->rootTask() );
m_loginTaskTwo->setCookie( d->cookie );
- QObject::connect( m_loginTaskTwo, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) );
+ TQObject::connect( m_loginTaskTwo, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) );
//connect
- QObject::connect( c, SIGNAL( connected() ), this, SLOT( streamConnected() ) );
+ TQObject::connect( c, TQT_SIGNAL( connected() ), this, TQT_SLOT( streamConnected() ) );
connectToServer( c, d->host, false ) ;
}
@@ -411,8 +411,8 @@ void Client::serviceSetupFinished()
return;
OfflineMessagesTask *offlineMsgTask = new OfflineMessagesTask( c->rootTask() );
- connect( offlineMsgTask, SIGNAL( receivedOfflineMessage(const Oscar::Message& ) ),
- this, SIGNAL( messageReceived(const Oscar::Message& ) ) );
+ connect( offlineMsgTask, TQT_SIGNAL( receivedOfflineMessage(const Oscar::Message& ) ),
+ this, TQT_SIGNAL( messageReceived(const Oscar::Message& ) ) );
offlineMsgTask->go( true );
}
@@ -420,7 +420,7 @@ void Client::serviceSetupFinished()
emit loggedIn();
}
-void Client::receivedIcqInfo( const QString& contact, unsigned int type )
+void Client::receivedIcqInfo( const TQString& contact, unsigned int type )
{
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "received icq info for " << contact
<< " of type " << type << endl;
@@ -437,7 +437,7 @@ void Client::receivedInfo( Q_UINT16 sequence )
emit receivedUserInfo( details.userId(), details );
}
-void Client::offlineUser( const QString& user, const UserDetails& )
+void Client::offlineUser( const TQString& user, const UserDetails& )
{
emit userIsOffline( user );
}
@@ -462,27 +462,27 @@ void Client::setVersion( const Oscar::ClientVersion* version )
// INTERNALS //
-QString Client::userId() const
+TQString Client::userId() const
{
return d->user;
}
-QString Client::password() const
+TQString Client::password() const
{
return d->pass;
}
-QString Client::statusMessage() const
+TQString Client::statusMessage() const
{
return d->statusMessage;
}
-void Client::setStatusMessage( const QString &message )
+void Client::setStatusMessage( const TQString &message )
{
d->statusMessage = message;
}
-QCString Client::ipAddress() const
+TQCString Client::ipAddress() const
{
//!TODO determine ip address
return "127.0.0.1";
@@ -493,7 +493,7 @@ void Client::notifyTaskError( const Oscar::SNAC& s, int errCode, bool fatal )
emit taskError( s, errCode, fatal );
}
-void Client::notifySocketError( int errCode, const QString& msg )
+void Client::notifySocketError( int errCode, const TQString& msg )
{
emit socketError( errCode, msg );
}
@@ -538,13 +538,13 @@ void Client::receivedMessage( const Oscar::Message& msg )
Oscar::Message response ( msg );
if ( msg.hasProperty( Oscar::Message::StatusMessageRequest ) )
{
- QTextCodec* codec = d->codecProvider->codecForContact( msg.sender() );
+ TQTextCodec* codec = d->codecProvider->codecForContact( msg.sender() );
response.setText( Oscar::Message::UserDefined, statusMessage(), codec );
}
else
{
response.setEncoding( Oscar::Message::UserDefined );
- response.setTextArray( QByteArray() );
+ response.setTextArray( TQByteArray() );
}
response.setReceiver( msg.sender() );
response.addProperty( Oscar::Message::AutoResponse );
@@ -557,7 +557,7 @@ void Client::receivedMessage( const Oscar::Message& msg )
if ( msg.hasProperty( Oscar::Message::AutoResponse ) )
{
// we got a response to a status message request.
- QString awayMessage( msg.text( d->codecProvider->codecForContact( msg.sender() ) ) );
+ TQString awayMessage( msg.text( d->codecProvider->codecForContact( msg.sender() ) ) );
kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Received an away message: " << awayMessage << endl;
emit receivedAwayMessage( msg.sender(), awayMessage );
}
@@ -574,7 +574,7 @@ void Client::receivedMessage( const Oscar::Message& msg )
}
}
-void Client::requestAuth( const QString& contactid, const QString& reason )
+void Client::requestAuth( const TQString& contactid, const TQString& reason )
{
Connection* c = d->connections.connectionForFamily( 0x0013 );
if ( !c )
@@ -582,7 +582,7 @@ void Client::requestAuth( const QString& contactid, const QString& reason )
d->ssiAuthTask->sendAuthRequest( contactid, reason );
}
-void Client::sendAuth( const QString& contactid, const QString& reason, bool auth )
+void Client::sendAuth( const TQString& contactid, const TQString& reason, bool auth )
{
Connection* c = d->connections.connectionForFamily( 0x0013 );
if ( !c )
@@ -605,7 +605,7 @@ void Client::setIsIcq( bool isIcq )
d->isIcq = isIcq;
}
-void Client::debug( const QString& str )
+void Client::debug( const TQString& str )
{
Q_UNUSED(str);
// qDebug( "CLIENT: %s", str.ascii() );
@@ -627,37 +627,37 @@ void Client::initializeStaticTasks()
d->typingNotifyTask = new TypingNotifyTask( c->rootTask() );
d->ssiModifyTask = new SSIModifyTask( c->rootTask(), true );
- connect( d->onlineNotifier, SIGNAL( userIsOnline( const QString&, const UserDetails& ) ),
- this, SIGNAL( receivedUserInfo( const QString&, const UserDetails& ) ) );
- connect( d->onlineNotifier, SIGNAL( userIsOffline( const QString&, const UserDetails& ) ),
- this, SLOT( offlineUser( const QString&, const UserDetails & ) ) );
+ connect( d->onlineNotifier, TQT_SIGNAL( userIsOnline( const TQString&, const UserDetails& ) ),
+ this, TQT_SIGNAL( receivedUserInfo( const TQString&, const UserDetails& ) ) );
+ connect( d->onlineNotifier, TQT_SIGNAL( userIsOffline( const TQString&, const UserDetails& ) ),
+ this, TQT_SLOT( offlineUser( const TQString&, const UserDetails & ) ) );
- connect( d->ownStatusTask, SIGNAL( gotInfo() ), this, SLOT( haveOwnUserInfo() ) );
- connect( d->ownStatusTask, SIGNAL( buddyIconUploadRequested() ), this,
- SIGNAL( iconNeedsUploading() ) );
+ connect( d->ownStatusTask, TQT_SIGNAL( gotInfo() ), this, TQT_SLOT( haveOwnUserInfo() ) );
+ connect( d->ownStatusTask, TQT_SIGNAL( buddyIconUploadRequested() ), this,
+ TQT_SIGNAL( iconNeedsUploading() ) );
- connect( d->messageReceiverTask, SIGNAL( receivedMessage( const Oscar::Message& ) ),
- this, SLOT( receivedMessage( const Oscar::Message& ) ) );
+ connect( d->messageReceiverTask, TQT_SIGNAL( receivedMessage( const Oscar::Message& ) ),
+ this, TQT_SLOT( receivedMessage( const Oscar::Message& ) ) );
- connect( d->ssiAuthTask, SIGNAL( authRequested( const QString&, const QString& ) ),
- this, SIGNAL( authRequestReceived( const QString&, const QString& ) ) );
- connect( d->ssiAuthTask, SIGNAL( authReplied( const QString&, const QString&, bool ) ),
- this, SIGNAL( authReplyReceived( const QString&, const QString&, bool ) ) );
+ connect( d->ssiAuthTask, TQT_SIGNAL( authRequested( const TQString&, const TQString& ) ),
+ this, TQT_SIGNAL( authRequestReceived( const TQString&, const TQString& ) ) );
+ connect( d->ssiAuthTask, TQT_SIGNAL( authReplied( const TQString&, const TQString&, bool ) ),
+ this, TQT_SIGNAL( authReplyReceived( const TQString&, const TQString&, bool ) ) );
- connect( d->icqInfoTask, SIGNAL( receivedInfoFor( const QString&, unsigned int ) ),
- this, SLOT( receivedIcqInfo( const QString&, unsigned int ) ) );
+ connect( d->icqInfoTask, TQT_SIGNAL( receivedInfoFor( const TQString&, unsigned int ) ),
+ this, TQT_SLOT( receivedIcqInfo( const TQString&, unsigned int ) ) );
- connect( d->userInfoTask, SIGNAL( receivedProfile( const QString&, const QString& ) ),
- this, SIGNAL( receivedProfile( const QString&, const QString& ) ) );
- connect( d->userInfoTask, SIGNAL( receivedAwayMessage( const QString&, const QString& ) ),
- this, SIGNAL( receivedAwayMessage( const QString&, const QString& ) ) );
- connect( d->typingNotifyTask, SIGNAL( typingStarted( const QString& ) ),
- this, SIGNAL( userStartedTyping( const QString& ) ) );
- connect( d->typingNotifyTask, SIGNAL( typingFinished( const QString& ) ),
- this, SIGNAL( userStoppedTyping( const QString& ) ) );
+ connect( d->userInfoTask, TQT_SIGNAL( receivedProfile( const TQString&, const TQString& ) ),
+ this, TQT_SIGNAL( receivedProfile( const TQString&, const TQString& ) ) );
+ connect( d->userInfoTask, TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ),
+ this, TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ) );
+ connect( d->typingNotifyTask, TQT_SIGNAL( typingStarted( const TQString& ) ),
+ this, TQT_SIGNAL( userStartedTyping( const TQString& ) ) );
+ connect( d->typingNotifyTask, TQT_SIGNAL( typingFinished( const TQString& ) ),
+ this, TQT_SIGNAL( userStoppedTyping( const TQString& ) ) );
}
-void Client::removeGroup( const QString& groupName )
+void Client::removeGroup( const TQString& groupName )
{
Connection* c = d->connections.connectionForFamily( 0x0013 );
if ( !c )
@@ -671,7 +671,7 @@ void Client::removeGroup( const QString& groupName )
delete ssimt;
}
-void Client::addGroup( const QString& groupName )
+void Client::addGroup( const TQString& groupName )
{
Connection* c = d->connections.connectionForFamily( 0x0013 );
if ( !c )
@@ -685,7 +685,7 @@ void Client::addGroup( const QString& groupName )
delete ssimt;
}
-void Client::addContact( const QString& contactName, const QString& groupName )
+void Client::addContact( const TQString& contactName, const TQString& groupName )
{
Connection* c = d->connections.connectionForFamily( 0x0013 );
if ( !c )
@@ -699,7 +699,7 @@ void Client::addContact( const QString& contactName, const QString& groupName )
delete ssimt;
}
-void Client::removeContact( const QString& contactName )
+void Client::removeContact( const TQString& contactName )
{
Connection* c = d->connections.connectionForFamily( 0x0013 );
if ( !c )
@@ -713,7 +713,7 @@ void Client::removeContact( const QString& contactName )
delete ssimt;
}
-void Client::renameGroup( const QString & oldGroupName, const QString & newGroupName )
+void Client::renameGroup( const TQString & oldGroupName, const TQString & newGroupName )
{
Connection* c = d->connections.connectionForFamily( 0x0013 );
if ( !c )
@@ -764,7 +764,7 @@ void Client::modifySSIItem( const Oscar::SSI& oldItem, const Oscar::SSI& newItem
}
}
-void Client::changeContactGroup( const QString& contact, const QString& newGroupName )
+void Client::changeContactGroup( const TQString& contact, const TQString& newGroupName )
{
Connection* c = d->connections.connectionForFamily( 0x0013 );
if ( !c )
@@ -779,7 +779,7 @@ void Client::changeContactGroup( const QString& contact, const QString& newGroup
delete ssimt;
}
-void Client::requestFullInfo( const QString& contactId )
+void Client::requestFullInfo( const TQString& contactId )
{
Connection* c = d->connections.connectionForFamily( 0x0015 );
if ( !c )
@@ -789,7 +789,7 @@ void Client::requestFullInfo( const QString& contactId )
d->icqInfoTask->go();
}
-void Client::requestShortInfo( const QString& contactId )
+void Client::requestShortInfo( const TQString& contactId )
{
Connection* c = d->connections.connectionForFamily( 0x0015 );
if ( !c )
@@ -799,7 +799,7 @@ void Client::requestShortInfo( const QString& contactId )
d->icqInfoTask->go();
}
-void Client::sendWarning( const QString& contact, bool anonymous )
+void Client::sendWarning( const TQString& contact, bool anonymous )
{
Connection* c = d->connections.connectionForFamily( 0x0004 );
if ( !c )
@@ -807,62 +807,62 @@ void Client::sendWarning( const QString& contact, bool anonymous )
WarningTask* warnTask = new WarningTask( c->rootTask() );
warnTask->setContact( contact );
warnTask->setAnonymous( anonymous );
- QObject::connect( warnTask, SIGNAL( userWarned( const QString&, Q_UINT16, Q_UINT16 ) ),
- this, SIGNAL( userWarned( const QString&, Q_UINT16, Q_UINT16 ) ) );
+ TQObject::connect( warnTask, TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ),
+ this, TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ) );
warnTask->go( true );
}
-ICQGeneralUserInfo Client::getGeneralInfo( const QString& contact )
+ICQGeneralUserInfo Client::getGeneralInfo( const TQString& contact )
{
return d->icqInfoTask->generalInfoFor( contact );
}
-ICQWorkUserInfo Client::getWorkInfo( const QString& contact )
+ICQWorkUserInfo Client::getWorkInfo( const TQString& contact )
{
return d->icqInfoTask->workInfoFor( contact );
}
-ICQEmailInfo Client::getEmailInfo( const QString& contact )
+ICQEmailInfo Client::getEmailInfo( const TQString& contact )
{
return d->icqInfoTask->emailInfoFor( contact );
}
-ICQMoreUserInfo Client::getMoreInfo( const QString& contact )
+ICQMoreUserInfo Client::getMoreInfo( const TQString& contact )
{
return d->icqInfoTask->moreInfoFor( contact );
}
-ICQInterestInfo Client::getInterestInfo( const QString& contact )
+ICQInterestInfo Client::getInterestInfo( const TQString& contact )
{
return d->icqInfoTask->interestInfoFor( contact );
}
-ICQShortInfo Client::getShortInfo( const QString& contact )
+ICQShortInfo Client::getShortInfo( const TQString& contact )
{
return d->icqInfoTask->shortInfoFor( contact );
}
-QValueList<int> Client::chatExchangeList() const
+TQValueList<int> Client::chatExchangeList() const
{
return d->exchanges;
}
-void Client::setChatExchangeList( const QValueList<int>& exchanges )
+void Client::setChatExchangeList( const TQValueList<int>& exchanges )
{
d->exchanges = exchanges;
}
-void Client::requestAIMProfile( const QString& contact )
+void Client::requestAIMProfile( const TQString& contact )
{
d->userInfoTask->requestInfoFor( contact, UserInfoTask::Profile );
}
-void Client::requestAIMAwayMessage( const QString& contact )
+void Client::requestAIMAwayMessage( const TQString& contact )
{
d->userInfoTask->requestInfoFor( contact, UserInfoTask::AwayMessage );
}
-void Client::requestICQAwayMessage( const QString& contact, ICQStatus contactStatus )
+void Client::requestICQAwayMessage( const TQString& contact, ICQStatus contactStatus )
{
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "requesting away message for " << contact << endl;
Oscar::Message msg;
@@ -894,7 +894,7 @@ void Client::requestICQAwayMessage( const QString& contact, ICQStatus contactSta
sendMessage( msg );
}
-void Client::addICQAwayMessageRequest( const QString& contact, ICQStatus contactStatus )
+void Client::addICQAwayMessageRequest( const TQString& contact, ICQStatus contactStatus )
{
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "adding away message request for "
<< contact << " to queue" << endl;
@@ -909,12 +909,12 @@ void Client::addICQAwayMessageRequest( const QString& contact, ICQStatus contact
d->awayMsgRequestTimer->start( 1000 );
}
-void Client::removeICQAwayMessageRequest( const QString& contact )
+void Client::removeICQAwayMessageRequest( const TQString& contact )
{
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "removing away message request for "
<< contact << " from queue" << endl;
- QValueList<ClientPrivate::AwayMsgRequest>::iterator it = d->awayMsgRequestQueue.begin();
+ TQValueList<ClientPrivate::AwayMsgRequest>::iterator it = d->awayMsgRequestQueue.begin();
while ( it != d->awayMsgRequestQueue.end() )
{
if ( (*it).contact == contact )
@@ -962,7 +962,7 @@ void Client::nextICQAwayMessageRequest()
requestICQAwayMessage( amr.contact, amr.contactStatus );
}
-void Client::requestStatusInfo( const QString& contact )
+void Client::requestStatusInfo( const TQString& contact )
{
d->userInfoTask->requestInfoFor( contact, UserInfoTask::General );
}
@@ -973,27 +973,27 @@ void Client::whitePagesSearch( const ICQWPSearchInfo& info )
if ( !c )
return;
UserSearchTask* ust = new UserSearchTask( c->rootTask() );
- connect( ust, SIGNAL( foundUser( const ICQSearchResult& ) ),
- this, SIGNAL( gotSearchResults( const ICQSearchResult& ) ) );
- connect( ust, SIGNAL( searchFinished( int ) ), this, SIGNAL( endOfSearch( int ) ) );
+ connect( ust, TQT_SIGNAL( foundUser( const ICQSearchResult& ) ),
+ this, TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ) );
+ connect( ust, TQT_SIGNAL( searchFinished( int ) ), this, TQT_SIGNAL( endOfSearch( int ) ) );
ust->go( true ); //onGo does nothing in this task. This is just here so autodelete works
ust->searchWhitePages( info );
}
-void Client::uinSearch( const QString& uin )
+void Client::uinSearch( const TQString& uin )
{
Connection* c = d->connections.connectionForFamily( 0x0015 );
if ( !c )
return;
UserSearchTask* ust = new UserSearchTask( c->rootTask() );
- connect( ust, SIGNAL( foundUser( const ICQSearchResult& ) ),
- this, SIGNAL( gotSearchResults( const ICQSearchResult& ) ) );
- connect( ust, SIGNAL( searchFinished( int ) ), this, SIGNAL( endOfSearch( int ) ) );
+ connect( ust, TQT_SIGNAL( foundUser( const ICQSearchResult& ) ),
+ this, TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ) );
+ connect( ust, TQT_SIGNAL( searchFinished( int ) ), this, TQT_SIGNAL( endOfSearch( int ) ) );
ust->go( true ); //onGo does nothing in this task. This is just here so autodelete works
ust->searchUserByUIN( uin );
}
-void Client::updateProfile( const QString& profile )
+void Client::updateProfile( const TQString& profile )
{
Connection* c = d->connections.connectionForFamily( 0x0002 );
if ( !c )
@@ -1003,7 +1003,7 @@ void Client::updateProfile( const QString& profile )
pt->go(true);
}
-void Client::sendTyping( const QString & contact, bool typing )
+void Client::sendTyping( const TQString & contact, bool typing )
{
Connection* c = d->connections.connectionForFamily( 0x0004 );
if ( !c )
@@ -1022,7 +1022,7 @@ void Client::connectToIconServer()
return;
}
-void Client::setIgnore( const QString& user, bool ignore )
+void Client::setIgnore( const TQString& user, bool ignore )
{
Oscar::SSI item = ssiManager()->findItem( user, ROSTER_IGNORE );
if ( item && !ignore )
@@ -1033,12 +1033,12 @@ void Client::setIgnore( const QString& user, bool ignore )
else if ( !item && ignore )
{
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding " << user << " to ignore list" << endl;
- Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_IGNORE, QValueList<TLV>() );
+ Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_IGNORE, TQValueList<TLV>() );
this->modifySSIItem( Oscar::SSI(), s );
}
}
-void Client::setVisibleTo( const QString& user, bool visible )
+void Client::setVisibleTo( const TQString& user, bool visible )
{
Oscar::SSI item = ssiManager()->findItem( user, ROSTER_VISIBLE );
if ( item && !visible )
@@ -1049,12 +1049,12 @@ void Client::setVisibleTo( const QString& user, bool visible )
else if ( !item && visible )
{
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding " << user << " to visible list" << endl;
- Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_VISIBLE, QValueList<TLV>() );
+ Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_VISIBLE, TQValueList<TLV>() );
this->modifySSIItem( Oscar::SSI(), s );
}
}
-void Client::setInvisibleTo( const QString& user, bool invisible )
+void Client::setInvisibleTo( const TQString& user, bool invisible )
{
Oscar::SSI item = ssiManager()->findItem( user, ROSTER_INVISIBLE );
if ( item && !invisible )
@@ -1065,20 +1065,20 @@ void Client::setInvisibleTo( const QString& user, bool invisible )
else if ( !item && invisible )
{
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding " << user << " to invisible list" << endl;
- Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_INVISIBLE, QValueList<TLV>() );
+ Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_INVISIBLE, TQValueList<TLV>() );
this->modifySSIItem( Oscar::SSI(), s );
}
}
-void Client::requestBuddyIcon( const QString& user, const QByteArray& hash, BYTE hashType )
+void Client::requestBuddyIcon( const TQString& user, const TQByteArray& hash, BYTE hashType )
{
Connection* c = d->connections.connectionForFamily( 0x0010 );
if ( !c )
return;
BuddyIconTask* bit = new BuddyIconTask( c->rootTask() );
- connect( bit, SIGNAL( haveIcon( const QString&, QByteArray ) ),
- this, SIGNAL( haveIconForContact( const QString&, QByteArray ) ) );
+ connect( bit, TQT_SIGNAL( haveIcon( const TQString&, TQByteArray ) ),
+ this, TQT_SIGNAL( haveIconForContact( const TQString&, TQByteArray ) ) );
bit->requestIconFor( user );
bit->setHashType( hashType );
bit->setHash( hash );
@@ -1086,8 +1086,8 @@ void Client::requestBuddyIcon( const QString& user, const QByteArray& hash, BYTE
}
void Client::requestServerRedirect( WORD family, WORD exchange,
- QByteArray cookie, WORD instance,
- const QString& room )
+ TQByteArray cookie, WORD instance,
+ const TQString& room )
{
//making the assumption that family 2 will always be the BOS connection
//use it instead since we can't query for family 1
@@ -1116,21 +1116,21 @@ void Client::requestServerRedirect( WORD family, WORD exchange,
srt->setChatRoom( room );
}
- connect( srt, SIGNAL( haveServer( const QString&, const QByteArray&, WORD ) ),
- this, SLOT( haveServerForRedirect( const QString&, const QByteArray&, WORD ) ) );
+ connect( srt, TQT_SIGNAL( haveServer( const TQString&, const TQByteArray&, WORD ) ),
+ this, TQT_SLOT( haveServerForRedirect( const TQString&, const TQByteArray&, WORD ) ) );
srt->setService( family );
srt->go( true );
}
-void Client::haveServerForRedirect( const QString& host, const QByteArray& cookie, WORD )
+void Client::haveServerForRedirect( const TQString& host, const TQByteArray& cookie, WORD )
{
//nasty sender() usage to get the task with chat room info
- QObject* o = const_cast<QObject*>( sender() );
+ TQObject* o = const_cast<TQObject*>( sender() );
ServerRedirectTask* srt = dynamic_cast<ServerRedirectTask*>( o );
//create a new connection and set it up
int colonPos = host.find(':');
- QString realHost, realPort;
+ TQString realHost, realPort;
if ( colonPos != -1 )
{
realHost = host.left( colonPos );
@@ -1139,18 +1139,18 @@ void Client::haveServerForRedirect( const QString& host, const QByteArray& cooki
else
{
realHost = host;
- realPort = QString::fromLatin1("5190");
+ realPort = TQString::fromLatin1("5190");
}
Connection* c = createConnection( realHost, realPort );
//create the new login task
m_loginTaskTwo = new StageTwoLoginTask( c->rootTask() );
m_loginTaskTwo->setCookie( cookie );
- QObject::connect( m_loginTaskTwo, SIGNAL( finished() ), this, SLOT( serverRedirectFinished() ) );
+ TQObject::connect( m_loginTaskTwo, TQT_SIGNAL( finished() ), this, TQT_SLOT( serverRedirectFinished() ) );
//connect
connectToServer( c, d->host, false );
- QObject::connect( c, SIGNAL( connected() ), this, SLOT( streamConnected() ) );
+ TQObject::connect( c, TQT_SIGNAL( connected() ), this, TQT_SLOT( streamConnected() ) );
if ( srt )
d->connections.addChatInfoForConnection( c, srt->chatExchange(), srt->chatRoomName() );
@@ -1176,8 +1176,8 @@ void Client::serverRedirectFinished()
if ( d->currentRedirect == 0x000D )
{
- connect( this, SIGNAL( chatNavigationConnected() ),
- this, SLOT( requestChatNavLimits() ) );
+ connect( this, TQT_SIGNAL( chatNavigationConnected() ),
+ this, TQT_SLOT( requestChatNavLimits() ) );
emit chatNavigationConnected();
}
@@ -1192,18 +1192,18 @@ void Client::serverRedirectFinished()
}
Connection* c = m_loginTaskTwo->client();
- QString roomName = d->connections.chatRoomForConnection( c );
+ TQString roomName = d->connections.chatRoomForConnection( c );
WORD exchange = d->connections.exchangeForConnection( c );
if ( c )
{
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting up chat connection" << endl;
ChatServiceTask* cst = new ChatServiceTask( c->rootTask(), exchange, roomName );
- connect( cst, SIGNAL( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ),
- this, SIGNAL( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ) );
- connect( cst, SIGNAL( userLeftChat( Oscar::WORD, const QString&, const QString& ) ),
- this, SIGNAL( userLeftChat( Oscar::WORD, const QString&, const QString& ) ) );
- connect( cst, SIGNAL( newChatMessage( const Oscar::Message& ) ),
- this, SIGNAL( messageReceived( const Oscar::Message& ) ) );
+ connect( cst, TQT_SIGNAL( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ),
+ this, TQT_SIGNAL( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ) );
+ connect( cst, TQT_SIGNAL( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ),
+ this, TQT_SIGNAL( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ) );
+ connect( cst, TQT_SIGNAL( newChatMessage( const Oscar::Message& ) ),
+ this, TQT_SIGNAL( messageReceived( const Oscar::Message& ) ) );
}
emit chatRoomConnected( exchange, roomName );
}
@@ -1234,19 +1234,19 @@ void Client::requestChatNavLimits()
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "requesting chat nav service limits" << endl;
ChatNavServiceTask* cnst = new ChatNavServiceTask( c->rootTask() );
cnst->setRequestType( ChatNavServiceTask::Limits );
- QObject::connect( cnst, SIGNAL( haveChatExchanges( const QValueList<int>& ) ),
- this, SLOT( setChatExchangeList( const QValueList<int>& ) ) );
+ TQObject::connect( cnst, TQT_SIGNAL( haveChatExchanges( const TQValueList<int>& ) ),
+ this, TQT_SLOT( setChatExchangeList( const TQValueList<int>& ) ) );
cnst->go( true ); //autodelete
}
-void Client::determineDisconnection( int code, const QString& string )
+void Client::determineDisconnection( int code, const TQString& string )
{
if ( !sender() )
return;
//yay for the sender() hack!
- QObject* obj = const_cast<QObject*>( sender() );
+ TQObject* obj = const_cast<TQObject*>( sender() );
Connection* c = dynamic_cast<Connection*>( obj );
if ( !c )
return;
@@ -1262,7 +1262,7 @@ void Client::determineDisconnection( int code, const QString& string )
c = 0;
}
-void Client::sendBuddyIcon( const QByteArray& iconData )
+void Client::sendBuddyIcon( const TQByteArray& iconData )
{
Connection* c = d->connections.connectionForFamily( 0x0010 );
if ( !c )
@@ -1274,7 +1274,7 @@ void Client::sendBuddyIcon( const QByteArray& iconData )
bit->go( true );
}
-void Client::joinChatRoom( const QString& roomName, int exchange )
+void Client::joinChatRoom( const TQString& roomName, int exchange )
{
Connection* c = d->connections.connectionForFamily( 0x000D );
if ( !c )
@@ -1283,21 +1283,21 @@ void Client::joinChatRoom( const QString& roomName, int exchange )
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "joining the chat room '" << roomName
<< "' on exchange " << exchange << endl;
ChatNavServiceTask* cnst = new ChatNavServiceTask( c->rootTask() );
- connect( cnst, SIGNAL( connectChat( WORD, QByteArray, WORD, const QString& ) ),
- this, SLOT( setupChatConnection( WORD, QByteArray, WORD, const QString& ) ) );
+ connect( cnst, TQT_SIGNAL( connectChat( WORD, TQByteArray, WORD, const TQString& ) ),
+ this, TQT_SLOT( setupChatConnection( WORD, TQByteArray, WORD, const TQString& ) ) );
cnst->createRoom( exchange, roomName );
}
-void Client::setupChatConnection( WORD exchange, QByteArray cookie, WORD instance, const QString& room )
+void Client::setupChatConnection( WORD exchange, TQByteArray cookie, WORD instance, const TQString& room )
{
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "cookie is:" << cookie << endl;
- QByteArray realCookie( cookie );
+ TQByteArray realCookie( cookie );
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "connection to chat room" << endl;
requestServerRedirect( 0x000E, exchange, realCookie, instance, room );
}
-void Client::disconnectChatRoom( WORD exchange, const QString& room )
+void Client::disconnectChatRoom( WORD exchange, const TQString& room )
{
Connection* c = d->connections.connectionForChatRoom( exchange, room );
if ( !c )
@@ -1308,7 +1308,7 @@ void Client::disconnectChatRoom( WORD exchange, const QString& room )
}
-Connection* Client::createConnection( const QString& host, const QString& port )
+Connection* Client::createConnection( const TQString& host, const TQString& port )
{
KNetworkConnector* knc = new KNetworkConnector( 0 );
knc->setOptHostPort( host, port.toUInt() );