summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/oscar/liboscar/chatservicetask.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/oscar/liboscar/chatservicetask.cpp')
-rw-r--r--kopete/protocols/oscar/liboscar/chatservicetask.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/kopete/protocols/oscar/liboscar/chatservicetask.cpp b/kopete/protocols/oscar/liboscar/chatservicetask.cpp
index 9d07afe8..c8998495 100644
--- a/kopete/protocols/oscar/liboscar/chatservicetask.cpp
+++ b/kopete/protocols/oscar/liboscar/chatservicetask.cpp
@@ -20,17 +20,17 @@
#include "chatservicetask.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kapplication.h>
#include <kdebug.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include "connection.h"
#include "transfer.h"
#include "buffer.h"
#include "oscartypes.h"
-ChatServiceTask::ChatServiceTask( Task* parent, Oscar::WORD exchange, const QString& room )
+ChatServiceTask::ChatServiceTask( Task* parent, Oscar::WORD exchange, const TQString& room )
: Task( parent ), m_encoding( "us-ascii" )
{
m_exchange = exchange;
@@ -47,7 +47,7 @@ void ChatServiceTask::setMessage( const Oscar::Message& msg )
m_message = msg;
}
-void ChatServiceTask::setEncoding( const QCString& enc )
+void ChatServiceTask::setEncoding( const TQCString& enc )
{
m_encoding = enc;
}
@@ -56,7 +56,7 @@ void ChatServiceTask::onGo()
{
if ( !m_message )
{
- setSuccess( true, QString::null );
+ setSuccess( true, TQString::null );
return;
}
@@ -78,7 +78,7 @@ void ChatServiceTask::onGo()
type3.type = 0x0003;
type3.length = 0x0002;
- type3.data = QCString( "en" ); //hardcode for right now. don't know that we can do others
+ type3.data = TQCString( "en" ); //hardcode for right now. don't know that we can do others
type1.type = 0x0001;
type1.length = m_message.textArray().size();
@@ -158,7 +158,7 @@ bool ChatServiceTask::take( Transfer* t )
break;
};
- setSuccess( 0, QString::null );
+ setSuccess( 0, TQString::null );
setTransfer( 0 );
return true;
}
@@ -170,7 +170,7 @@ void ChatServiceTask::parseRoomInfo()
Buffer* b = transfer()->buffer();
m_exchange = b->getWord();
- QByteArray cookie( b->getBlock( b->getByte() ) );
+ TQByteArray cookie( b->getBlock( b->getByte() ) );
instance = b->getWord();
detailLevel = b->getByte();
@@ -179,15 +179,15 @@ void ChatServiceTask::parseRoomInfo()
//correctly anyways
b->skipBytes( 2 );
- QValueList<Oscar::TLV> tlvList = b->getTLVList();
- QValueList<Oscar::TLV>::iterator it = tlvList.begin();
- QValueList<Oscar::TLV>::iterator itEnd = tlvList.end();
+ TQValueList<Oscar::TLV> tlvList = b->getTLVList();
+ TQValueList<Oscar::TLV>::iterator it = tlvList.begin();
+ TQValueList<Oscar::TLV>::iterator itEnd = tlvList.end();
for ( ; it != itEnd; ++it )
{
switch ( ( *it ).type )
{
case 0x006A:
- m_internalRoom = QString( ( *it ).data );
+ m_internalRoom = TQString( ( *it ).data );
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "room name: " << m_room << endl;
break;
case 0x006F:
@@ -221,7 +221,7 @@ void ChatServiceTask::parseJoinNotification()
Buffer* b = transfer()->buffer();
while ( b->length() > 0 )
{
- QString sender( b->getBUIN() );
+ TQString sender( b->getBUIN() );
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "user name:" << sender << endl;
WORD warningLevel = b->getWord();
WORD numTLVs = b->getWord();
@@ -252,7 +252,7 @@ void ChatServiceTask::parseLeftNotification()
Buffer* b = transfer()->buffer();
while ( b->length() > 0 )
{
- QString sender( b->getBUIN() );
+ TQString sender( b->getBUIN() );
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "user name:" << sender << endl;
WORD warningLevel = b->getWord();
WORD numTLVs = b->getWord();
@@ -281,12 +281,12 @@ void ChatServiceTask::parseChatMessage()
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "have new chat room message" << endl;
Buffer* b = transfer()->buffer();
bool whisper = true, reflection = false;
- QByteArray language, encoding, message;
- QString sender;
- QByteArray icbmCookie( b->getBlock( 8 ) );
+ TQByteArray language, encoding, message;
+ TQString sender;
+ TQByteArray icbmCookie( b->getBlock( 8 ) );
b->skipBytes( 2 ); //message channel always 0x03
- QValueList<Oscar::TLV> chatTLVs = b->getTLVList();
- QValueList<Oscar::TLV>::iterator it, itEnd = chatTLVs.end();
+ TQValueList<Oscar::TLV> chatTLVs = b->getTLVList();
+ TQValueList<Oscar::TLV>::iterator it, itEnd = chatTLVs.end();
for ( it = chatTLVs.begin(); it != itEnd; ++it )
{
switch ( ( *it ).type )
@@ -326,7 +326,7 @@ void ChatServiceTask::parseChatMessage()
case 0x0003: //user info
{
Buffer b( ( *it ).data );
- sender = QString( b.getBUIN() );
+ sender = TQString( b.getBUIN() );
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "got user info. sender is " << sender << endl;
}
break;
@@ -334,14 +334,14 @@ void ChatServiceTask::parseChatMessage()
}
}
- QTextCodec* codec = QTextCodec::codecForName( encoding );
+ TQTextCodec* codec = TQTextCodec::codecForName( encoding );
if ( ! codec )
- codec = QTextCodec::codecForMib( 4 );
- QString msgText( codec->toUnicode( message ) );
+ codec = TQTextCodec::codecForMib( 4 );
+ TQString msgText( codec->toUnicode( message ) );
Oscar::Message omessage;
omessage.setReceiver( client()->userId() );
omessage.setSender( sender );
- omessage.setTimestamp( QDateTime::currentDateTime() );
+ omessage.setTimestamp( TQDateTime::currentDateTime() );
omessage.setText( Oscar::Message::UTF8, msgText );
omessage.setType( 0x03 );
omessage.setExchange( m_exchange );