summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/oscar/liboscar/client.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/oscar/liboscar/client.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/oscar/liboscar/client.cpp')
-rw-r--r--kopete/protocols/oscar/liboscar/client.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/kopete/protocols/oscar/liboscar/client.cpp b/kopete/protocols/oscar/liboscar/client.cpp
index 222d9d69..53e38ed1 100644
--- a/kopete/protocols/oscar/liboscar/client.cpp
+++ b/kopete/protocols/oscar/liboscar/client.cpp
@@ -98,7 +98,7 @@ public:
TQValueList<WORD> redirectionServices;
WORD currentRedirect;
TQByteArray cookie;
- DWORD connectAsStatus; // icq only
+ DWORD connectAstqStatus; // icq only
TQString connectWithMessage; // icq only
Oscar::Settings* settings;
@@ -128,7 +128,7 @@ public:
struct AwayMsgRequest
{
TQString contact;
- ICQStatus contactStatus;
+ ICQtqStatus contacttqStatus;
};
TQValueList<AwayMsgRequest> awayMsgRequestQueue;
TQTimer* awayMsgRequestTimer;
@@ -137,8 +137,8 @@ public:
const Oscar::ClientVersion* version;
};
-Client::Client( TQObject* parent )
-:TQObject( parent, "oscarclient" )
+Client::Client( TQObject* tqparent )
+:TQObject( tqparent, "oscarclient" )
{
m_loginTask = 0L;
m_loginTaskTwo = 0L;
@@ -149,7 +149,7 @@ Client::Client( TQObject* parent )
d->isIcq = false; //default to AIM
d->redirectRequested = false;
d->currentRedirect = 0;
- d->connectAsStatus = 0x0; // default to online
+ d->connectAstqStatus = 0x0; // default to online
d->ssiManager = new SSIManager( this );
d->settings = new Oscar::Settings();
d->errorTask = 0L;
@@ -222,8 +222,8 @@ void Client::close()
//don't clear the stored status between stage one and two
if ( d->stage == ClientPrivate::StageTwo )
{
- d->connectAsStatus = 0x0;
- d->connectWithMessage = TQString::null;
+ d->connectAstqStatus = 0x0;
+ d->connectWithMessage = TQString();
}
d->exchanges.clear();
@@ -233,10 +233,10 @@ void Client::close()
d->ssiManager->clear();
}
-void Client::setStatus( AIMStatus status, const TQString &_message )
+void Client::settqStatus( AIMtqStatus status, const TQString &_message )
{
// AIM: you're away exactly when your away message isn't empty.
- // can't use TQString::null as a message either; ProfileTask
+ // can't use TQString() as a message either; ProfileTask
// interprets null as "don't change".
TQString message;
if ( status == Online )
@@ -257,7 +257,7 @@ void Client::setStatus( AIMStatus status, const TQString &_message )
pt->go( true );
}
-void Client::setStatus( DWORD status, const TQString &message )
+void Client::settqStatus( 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;
@@ -292,7 +292,7 @@ void Client::setStatus( DWORD status, const TQString &message )
}
else
{
- d->connectAsStatus = status;
+ d->connectAstqStatus = status;
d->connectWithMessage = message;
}
}
@@ -399,7 +399,7 @@ void Client::serviceSetupFinished()
d->active = true;
if ( isIcq() )
- setStatus( d->connectAsStatus, d->connectWithMessage );
+ settqStatus( d->connectAstqStatus, d->connectWithMessage );
d->ownStatusTask->go();
@@ -431,7 +431,7 @@ void Client::receivedIcqInfo( const TQString& contact, unsigned int type )
emit receivedIcqLongInfo( contact );
}
-void Client::receivedInfo( Q_UINT16 sequence )
+void Client::receivedInfo( TQ_UINT16 sequence )
{
UserDetails details = d->userInfoTask->getInfoFor( sequence );
emit receivedUserInfo( details.userId(), details );
@@ -807,8 +807,8 @@ void Client::sendWarning( const TQString& contact, bool anonymous )
WarningTask* warnTask = new WarningTask( c->rootTask() );
warnTask->setContact( contact );
warnTask->setAnonymous( anonymous );
- TQObject::connect( warnTask, TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ),
- this, TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ) );
+ TQObject::connect( warnTask, TQT_SIGNAL( userWarned( const TQString&, TQ_UINT16, TQ_UINT16 ) ),
+ this, TQT_SIGNAL( userWarned( const TQString&, TQ_UINT16, TQ_UINT16 ) ) );
warnTask->go( true );
}
@@ -862,14 +862,14 @@ void Client::requestAIMAwayMessage( const TQString& contact )
d->userInfoTask->requestInfoFor( contact, UserInfoTask::AwayMessage );
}
-void Client::requestICQAwayMessage( const TQString& contact, ICQStatus contactStatus )
+void Client::requestICQAwayMessage( const TQString& contact, ICQtqStatus contacttqStatus )
{
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "requesting away message for " << contact << endl;
Oscar::Message msg;
msg.setType( 2 );
msg.setReceiver( contact );
msg.addProperty( Oscar::Message::StatusMessageRequest );
- switch ( contactStatus )
+ switch ( contacttqStatus )
{
case ICQAway:
msg.setMessageType( 0xE8 ); // away
@@ -894,7 +894,7 @@ void Client::requestICQAwayMessage( const TQString& contact, ICQStatus contactSt
sendMessage( msg );
}
-void Client::addICQAwayMessageRequest( const TQString& contact, ICQStatus contactStatus )
+void Client::addICQAwayMessageRequest( const TQString& contact, ICQtqStatus contacttqStatus )
{
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "adding away message request for "
<< contact << " to queue" << endl;
@@ -902,7 +902,7 @@ void Client::addICQAwayMessageRequest( const TQString& contact, ICQStatus contac
//remove old request if still exists
removeICQAwayMessageRequest( contact );
- ClientPrivate::AwayMsgRequest amr = { contact, contactStatus };
+ ClientPrivate::AwayMsgRequest amr = { contact, contacttqStatus };
d->awayMsgRequestQueue.prepend( amr );
if ( !d->awayMsgRequestTimer->isActive() )
@@ -959,7 +959,7 @@ void Client::nextICQAwayMessageRequest()
amr = d->awayMsgRequestQueue.back();
d->awayMsgRequestQueue.pop_back();
- requestICQAwayMessage( amr.contact, amr.contactStatus );
+ requestICQAwayMessage( amr.contact, amr.contacttqStatus );
}
void Client::requestStatusInfo( const TQString& contact )
@@ -1099,7 +1099,7 @@ void Client::requestServerRedirect( WORD family, WORD exchange,
if ( !c )
return;
- if ( d->redirectionServices.findIndex( family ) == -1 )
+ if ( d->redirectionServices.tqfindIndex( family ) == -1 )
d->redirectionServices.append( family ); //don't add families twice
if ( d->currentRedirect != 0 )
@@ -1125,11 +1125,11 @@ void Client::requestServerRedirect( WORD family, WORD exchange,
void Client::haveServerForRedirect( const TQString& host, const TQByteArray& cookie, WORD )
{
//nasty sender() usage to get the task with chat room info
- TQObject* o = const_cast<TQObject*>( sender() );
+ TQObject* o = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>( sender() ));
ServerRedirectTask* srt = dynamic_cast<ServerRedirectTask*>( o );
//create a new connection and set it up
- int colonPos = host.find(':');
+ int colonPos = host.tqfind(':');
TQString realHost, realPort;
if ( colonPos != -1 )
{
@@ -1139,7 +1139,7 @@ void Client::haveServerForRedirect( const TQString& host, const TQByteArray& coo
else
{
realHost = host;
- realPort = TQString::fromLatin1("5190");
+ realPort = TQString::tqfromLatin1("5190");
}
Connection* c = createConnection( realHost, realPort );
@@ -1246,7 +1246,7 @@ void Client::determineDisconnection( int code, const TQString& string )
return;
//yay for the sender() hack!
- TQObject* obj = const_cast<TQObject*>( sender() );
+ TQObject* obj = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>( sender() ));
Connection* c = dynamic_cast<Connection*>( obj );
if ( !c )
return;
@@ -1350,4 +1350,4 @@ bool Client::hasIconConnection( ) const
}
#include "client.moc"
-//kate: tab-width 4; indent-mode csands; space-indent off; replace-tabs off;
+//kate: tab-width 4; indent-mode csands; space-indent off; tqreplace-tabs off;