summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/yahoo/libkyahoo/coreprotocol.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/yahoo/libkyahoo/coreprotocol.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/yahoo/libkyahoo/coreprotocol.cpp')
-rw-r--r--kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp b/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp
index 2c73ef2b..573c5ccf 100644
--- a/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp
+++ b/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp
@@ -22,9 +22,9 @@
#include <string.h>
#include <iostream>
-#include <qdatastream.h>
-#include <qdatetime.h>
-#include <qtextstream.h>
+#include <tqdatastream.h>
+#include <tqdatetime.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <kurl.h>
@@ -33,7 +33,7 @@
#include "ymsgprotocol.h"
#include "ymsgtransfer.h"
-CoreProtocol::CoreProtocol() : QObject()
+CoreProtocol::CoreProtocol() : TQObject()
{
m_YMSGProtocol = new YMSGProtocol( this, "ymsgprotocol" );
}
@@ -47,7 +47,7 @@ int CoreProtocol::state()
return m_state;
}
-void CoreProtocol::addIncomingData( const QByteArray & incomingBytes )
+void CoreProtocol::addIncomingData( const TQByteArray & incomingBytes )
{
// store locally
int oldsize = m_in.size();
@@ -75,7 +75,7 @@ void CoreProtocol::addIncomingData( const QByteArray & incomingBytes )
//m_in.remove( 0, parsedBytes );
// 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;
}
@@ -112,7 +112,7 @@ Transfer* CoreProtocol::incomingTransfer()
}
}
-void cp_dump( const QByteArray &bytes )
+void cp_dump( const TQByteArray &bytes )
{
#ifdef YAHOO_COREPROTOCOL_DEBUG
kdDebug(YAHOO_RAW_DEBUG) << " contains " << bytes.count() << " bytes" << endl;
@@ -133,11 +133,11 @@ void CoreProtocol::outgoingTransfer( Transfer* outgoing )
{
kdDebug(YAHOO_RAW_DEBUG) << " got YMSGTransfer" << endl;
YMSGTransfer *yt = (YMSGTransfer *) outgoing;
- QByteArray bytesOut = yt->serialize();
+ TQByteArray bytesOut = yt->serialize();
- //QTextStream dout( bytesOut, QIODevice::WriteOnly );
- //dout.setEncoding( QTextStream::Latin1 );
- //dout.setByteOrder( QDataStream::LittleEndian );
+ //TQTextStream dout( bytesOut, TQIODevice::WriteOnly );
+ //dout.setEncoding( TQTextStream::Latin1 );
+ //dout.setByteOrder( TQDataStream::LittleEndian );
//dout << bytesOut;
//kdDebug(YAHOO_RAW_DEBUG) << " " << bytesOut;
emit outgoingData( bytesOut );
@@ -149,7 +149,7 @@ void CoreProtocol::outgoingTransfer( Transfer* outgoing )
-int CoreProtocol::wireToTransfer( const QByteArray& wire )
+int CoreProtocol::wireToTransfer( const TQByteArray& wire )
{
kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl;
// processing incoming data and reassembling it into transfers
@@ -163,8 +163,8 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire )
return bytesParsed;
}
- QByteArray tempWire = wire;
- QDataStream din( tempWire, IO_ReadOnly );
+ TQByteArray tempWire = wire;
+ TQDataStream din( tempWire, IO_ReadOnly );
// look at first four bytes and decide what to do with the chunk
if ( okToProceed( din ) )
@@ -194,8 +194,8 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire )
else
{
kdDebug(YAHOO_RAW_DEBUG) << " - not a valid YMSG packet. Trying to recover." << endl;
- QTextStream s( wire, IO_ReadOnly );
- QString remaining = s.read();
+ TQTextStream s( wire, IO_ReadOnly );
+ TQString remaining = s.read();
int pos = remaining.find( "YMSG", bytesParsed );
if( pos >= 0 )
{
@@ -217,12 +217,12 @@ void CoreProtocol::reset()
m_in.resize( 0 );
}
-void CoreProtocol::slotOutgoingData( const QByteArray &out )
+void CoreProtocol::slotOutgoingData( const TQByteArray &out )
{
qDebug( "%s", out.data() );
}
-bool CoreProtocol::okToProceed( QDataStream &din)
+bool CoreProtocol::okToProceed( TQDataStream &din)
{
if ( din.atEnd() )
{