diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/oscar/liboscar/coreprotocol.cpp | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-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/coreprotocol.cpp')
-rw-r--r-- | kopete/protocols/oscar/liboscar/coreprotocol.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/kopete/protocols/oscar/liboscar/coreprotocol.cpp b/kopete/protocols/oscar/liboscar/coreprotocol.cpp index 4f114039..918b3751 100644 --- a/kopete/protocols/oscar/liboscar/coreprotocol.cpp +++ b/kopete/protocols/oscar/liboscar/coreprotocol.cpp @@ -24,9 +24,9 @@ #include "coreprotocol.h" -#include <qdatastream.h> -#include <qdatetime.h> -#include <qtextstream.h> +#include <tqdatastream.h> +#include <tqdatetime.h> +#include <tqtextstream.h> #include <kdebug.h> #include <ctype.h> @@ -36,16 +36,16 @@ #include "flapprotocol.h" #include "snacprotocol.h" -static QString toString( const QByteArray& buffer ) +static TQString toString( const TQByteArray& buffer ) { // line format: //00 03 00 0b 00 00 90 b8 f5 9f 09 31 31 33 37 38 |;tJ�..........| int i = 0; - QString output = "\n"; - QString hex, ascii; + TQString output = "\n"; + TQString hex, ascii; - QByteArray::ConstIterator it; + TQByteArray::ConstIterator it; for ( it = buffer.begin(); it != buffer.end(); ++it ) { i++; @@ -54,7 +54,7 @@ static QString toString( const QByteArray& buffer ) if ( c < 0x10 ) hex.append("0"); - hex.append(QString("%1 ").arg(c, 0, 16)); + hex.append(TQString("%1 ").arg(c, 0, 16)); ascii.append(isprint(c) ? c : '.'); @@ -62,8 +62,8 @@ static QString toString( const QByteArray& buffer ) { output += hex + " |" + ascii + "|\n"; i=0; - hex=QString::null; - ascii=QString::null; + hex=TQString::null; + ascii=TQString::null; } } @@ -77,7 +77,7 @@ static QString toString( const QByteArray& buffer ) using namespace Oscar; -CoreProtocol::CoreProtocol() : QObject() +CoreProtocol::CoreProtocol() : TQObject() { m_snacProtocol = new SnacProtocol( this, "snacprotocol" ); m_flapProtocol = new FlapProtocol( this, "flapprotocol" ); @@ -92,7 +92,7 @@ int CoreProtocol::state() return m_state; } -void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) +void CoreProtocol::addIncomingData( const TQByteArray & incomingBytes ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Received " << incomingBytes.count() << " bytes. " << endl; // store locally @@ -114,7 +114,7 @@ void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) { //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "more data in chunk!" << endl; // copy the unparsed bytes into a new qbytearray and replace m_in with that - QByteArray remainder( size - parsedBytes ); + TQByteArray remainder( size - parsedBytes ); memcpy( remainder.data(), m_in.data() + parsedBytes, remainder.size() ); m_in = remainder; } @@ -149,7 +149,7 @@ Transfer* CoreProtocol::incomingTransfer() } } -void cp_dump( const QByteArray &bytes ) +void cp_dump( const TQByteArray &bytes ) { #ifdef OSCAR_COREPROTOCOL_DEBUG kdDebug(OSCAR_RAW_DEBUG) << "contains: " << bytes.count() << " bytes" << endl; @@ -174,7 +174,7 @@ void CoreProtocol::outgoingTransfer( Transfer* outgoing ) return; } -int CoreProtocol::wireToTransfer( const QByteArray& wire ) +int CoreProtocol::wireToTransfer( const TQByteArray& wire ) { // processing incoming data and reassembling it into transfers // may be an event or a response @@ -194,13 +194,13 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire ) return bytesParsed; } - QDataStream din( wire, IO_ReadOnly ); + TQDataStream din( wire, IO_ReadOnly ); // look at first four bytes and decide what to do with the chunk if ( okToProceed( din ) ) { din >> flapStart; - QByteArray packet; + TQByteArray packet; packet.duplicate( wire ); if ( flapStart == 0x2A ) { @@ -264,12 +264,12 @@ void CoreProtocol::reset() m_in.resize( 0 ); } -void CoreProtocol::slotOutgoingData( const QCString &out ) +void CoreProtocol::slotOutgoingData( const TQCString &out ) { kdDebug(OSCAR_RAW_DEBUG) << out.data() << endl; } -bool CoreProtocol::okToProceed( const QDataStream &din ) +bool CoreProtocol::okToProceed( const TQDataStream &din ) { if ( din.atEnd() ) { |