summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp
diff options
context:
space:
mode:
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() )
{