summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/oscar/liboscar/oscarclientstream.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/oscar/liboscar/oscarclientstream.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/oscar/liboscar/oscarclientstream.cpp')
-rw-r--r--kopete/protocols/oscar/liboscar/oscarclientstream.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/kopete/protocols/oscar/liboscar/oscarclientstream.cpp b/kopete/protocols/oscar/liboscar/oscarclientstream.cpp
index e607a24b..87da6020 100644
--- a/kopete/protocols/oscar/liboscar/oscarclientstream.cpp
+++ b/kopete/protocols/oscar/liboscar/oscarclientstream.cpp
@@ -20,10 +20,10 @@
#include "oscarclientstream.h"
-#include <qguardedptr.h>
-#include <qobject.h>
-#include <qptrqueue.h>
-#include <qtimer.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
+#include <tqptrqueue.h>
+#include <tqtimer.h>
#include <kdebug.h>
@@ -36,7 +36,7 @@
#define LIBOSCAR_DEBUG 0
-void cs_dump( const QByteArray &bytes );
+void cs_dump( const TQByteArray &bytes );
enum {
Idle,
@@ -59,9 +59,9 @@ public:
bs = 0;
connection = 0;
- username = QString::null;
- password = QString::null;
- server = QString::null;
+ username = TQString::null;
+ password = TQString::null;
+ server = TQString::null;
haveLocalAddr = false;
doBinding = true;
@@ -74,12 +74,12 @@ public:
newTransfers = false;
}
- QString username;
- QString password;
- QString server;
+ TQString username;
+ TQString password;
+ TQString server;
bool doAuth; //send the initial login sequences to get the cookie
bool haveLocalAddr;
- QHostAddress localAddr;
+ TQHostAddress localAddr;
Q_UINT16 localPort;
bool doBinding;
@@ -88,7 +88,7 @@ public:
CoreProtocol client;
Connection* connection;
- QString defRealm;
+ TQString defRealm;
int mode;
int state;
@@ -96,15 +96,15 @@ public:
bool newTransfers;
int errCond;
- QString errText;
+ TQString errText;
- QPtrQueue<Transfer> in;
+ TQPtrQueue<Transfer> in;
- QTimer noopTimer; // used to send icq keepalive
+ TQTimer noopTimer; // used to send icq keepalive
int noop_time;
};
-ClientStream::ClientStream(Connector *conn, QObject *parent)
+ClientStream::ClientStream(Connector *conn, TQObject *parent)
:Stream(parent)
{
//qDebug("CLIENTSTREAM::ClientStream");
@@ -112,13 +112,13 @@ ClientStream::ClientStream(Connector *conn, QObject *parent)
d = new Private;
d->mode = ClientMode;
d->conn = conn;
- connect( d->conn, SIGNAL(connected()), SLOT(cr_connected()) );
- connect( d->conn, SIGNAL(error()), SLOT(cr_error()) );
- connect( &d->client, SIGNAL( outgoingData( const QByteArray& ) ), SLOT ( cp_outgoingData( const QByteArray & ) ) );
- connect( &d->client, SIGNAL( incomingData() ), SLOT ( cp_incomingData() ) );
+ connect( d->conn, TQT_SIGNAL(connected()), TQT_SLOT(cr_connected()) );
+ connect( d->conn, TQT_SIGNAL(error()), TQT_SLOT(cr_error()) );
+ connect( &d->client, TQT_SIGNAL( outgoingData( const TQByteArray& ) ), TQT_SLOT ( cp_outgoingData( const TQByteArray & ) ) );
+ connect( &d->client, TQT_SIGNAL( incomingData() ), TQT_SLOT ( cp_incomingData() ) );
d->noop_time = 0;
- connect(&d->noopTimer, SIGNAL(timeout()), SLOT(doNoop()));
+ connect(&d->noopTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doNoop()));
}
ClientStream::~ClientStream()
@@ -151,7 +151,7 @@ void ClientStream::reset(bool all)
d->in.clear();
}
-void ClientStream::connectToServer(const QString& server, bool auth)
+void ClientStream::connectToServer(const TQString& server, bool auth)
{
reset(true);
d->state = Connecting;
@@ -205,7 +205,7 @@ void ClientStream::setNoopTime(int mills)
d->noopTimer.start( d->noop_time );
}
-void ClientStream::setLocalAddr(const QHostAddress &addr, Q_UINT16 port)
+void ClientStream::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port)
{
d->haveLocalAddr = true;
d->localAddr = addr;
@@ -217,7 +217,7 @@ int ClientStream::errorCondition() const
return d->errCond;
}
-QString ClientStream::errorText() const
+TQString ClientStream::errorText() const
{
return d->errText;
}
@@ -263,7 +263,7 @@ void ClientStream::write( Transfer *request )
d->client.outgoingTransfer( request );
}
-void cs_dump( const QByteArray &bytes )
+void cs_dump( const TQByteArray &bytes )
{
#if 0
qDebug( "contains: %i bytes ", bytes.count() );
@@ -305,7 +305,7 @@ void cs_dump( const QByteArray &bytes )
Q_UNUSED( bytes );
}
-void ClientStream::cp_outgoingData( const QByteArray& outgoingBytes )
+void ClientStream::cp_outgoingData( const TQByteArray& outgoingBytes )
{
// take formatted bytes from CoreProtocol and put them on the wire
d->bs->write( outgoingBytes );
@@ -329,19 +329,19 @@ void ClientStream::cp_incomingData()
void ClientStream::cr_connected()
{
d->bs = d->conn->stream();
- connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed()));
- connect(d->bs, SIGNAL(delayedCloseFinished()), SLOT(bs_delayedCloseFinished()));
- connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead()));
- connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int)));
- connect(d->bs, SIGNAL(error(int)), SLOT(bs_error(int)));
+ connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed()));
+ connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished()));
+ connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead()));
+ connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int)));
+ connect(d->bs, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
d->state = Active;
if ( d->noop_time )
d->noopTimer.start( d->noop_time );
- QByteArray spare = d->bs->read();
+ TQByteArray spare = d->bs->read();
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
emit connected();
if(!self)
return;
@@ -372,12 +372,12 @@ void ClientStream::bs_error(int)
void ClientStream::bs_readyRead()
{
- QByteArray a;
+ TQByteArray a;
//qDebug( "size of storage for incoming data is %i bytes.", a.size() );
a = d->bs->read();
#if LIBOSCAR_DEBUG
- QCString cs(a.data(), a.size()+1);
+ TQCString cs(a.data(), a.size()+1);
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "recv: " << a.size() << "bytes" << endl;
cs_dump( a );
#endif
@@ -408,7 +408,7 @@ void ClientStream::processNext()
{
if( !d->in.isEmpty() )
{
- QTimer::singleShot(0, this, SLOT(doReadyRead()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doReadyRead()));
}
}