diff options
Diffstat (limited to 'kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp')
-rw-r--r-- | kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp b/kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp index 7d58de93..5d964ad0 100644 --- a/kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp +++ b/kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp @@ -19,8 +19,8 @@ ************************************************************************* */ -//#include<qtextstream.h> -//#include<qguardedptr.h> +//#include<tqtextstream.h> +//#include<tqguardedptr.h> // #include<qca.h> // #include<stdlib.h> // #include"bytestream.h" @@ -30,11 +30,11 @@ // #include"securestream.h" // #include"protocol.h" -#include <qapplication.h> // for qdebug -#include <qguardedptr.h> -#include <qobject.h> -#include <qptrqueue.h> -#include <qtimer.h> +#include <tqapplication.h> // for qdebug +#include <tqguardedptr.h> +#include <tqobject.h> +#include <tqptrqueue.h> +#include <tqtimer.h> #include "bytestream.h" #include "connector.h" @@ -49,7 +49,7 @@ //#define LIBGW_DEBUG 1 -void cs_dump( const QByteArray &bytes ); +void cs_dump( const TQByteArray &bytes ); enum { Idle, @@ -101,14 +101,14 @@ public: } NovellDN id; - QString server; + TQString server; bool oldOnly; bool allowPlain, mutualAuth; bool haveLocalAddr; - QHostAddress localAddr; + TQHostAddress localAddr; Q_UINT16 localPort; // int minimumSSF, maximumSSF; -// QString sasl_mech; +// TQString sasl_mech; bool doBinding; bool in_rrsig; @@ -122,7 +122,7 @@ public: CoreProtocol client; //CoreProtocol srv; - QString defRealm; + TQString defRealm; int mode; int state; @@ -132,30 +132,30 @@ public: bool tls_warned, using_tls; bool doAuth; -// QStringList sasl_mechlist; +// TQStringList sasl_mechlist; int errCond; - QString errText; + TQString errText; - QPtrQueue<Transfer> in; + TQPtrQueue<Transfer> in; - QTimer noopTimer; // probably not needed + TQTimer noopTimer; // probably not needed int noop_time; }; -ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, QObject *parent) +ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, TQObject *parent) :Stream(parent) { d = new Private; d->mode = Client; 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())); d->tlsHandler = tlsHandler; // all the extra stuff happening in the larger ctor happens at connect time :) } @@ -250,7 +250,7 @@ bool ClientStream::isAuthenticated() const return (d->state == Active); } -// void ClientStream::setPassword(const QString &s) +// void ClientStream::setPassword(const TQString &s) // { // if(d->client.old) { // d->client.setPassword(s); @@ -261,7 +261,7 @@ bool ClientStream::isAuthenticated() const // } // } -// void ClientStream::setRealm(const QString &s) +// void ClientStream::setRealm(const TQString &s) // { // if(d->sasl) // d->sasl->setRealm(s); @@ -295,7 +295,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; @@ -307,12 +307,12 @@ int ClientStream::errorCondition() const return d->errCond; } -QString ClientStream::errorText() const +TQString ClientStream::errorText() const { return d->errText; } -// QDomElement ClientStream::errorAppSpec() const +// TQDomElement ClientStream::errorAppSpec() const // { // return d->errAppSpec;cr_error // } @@ -374,11 +374,11 @@ void ClientStream::write( Request *request ) d->client.outgoingTransfer( request ); } -void cs_dump( const QByteArray &bytes ) +void cs_dump( const TQByteArray &bytes ) { //#define GW_CLIENTSTREAM_DEBUG 1 #ifdef GW_CLIENTSTREAM_DEBUG - CoreProtocol::debug( QString( "contains: %1 bytes " ).arg( bytes.count() ) ); + CoreProtocol::debug( TQString( "contains: %1 bytes " ).arg( bytes.count() ) ); uint count = 0; while ( count < bytes.count() ) { @@ -418,7 +418,7 @@ void cs_dump( const QByteArray &bytes ) #endif } -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 #ifdef LIBGW_DEBUG @@ -440,23 +440,23 @@ void ClientStream::cp_incomingData() emit doReadyRead(); } else - CoreProtocol::debug( QString( " - client signalled incomingData but none was available, state is: %1" ).arg( d->client.state() ) ); + CoreProtocol::debug( TQString( " - client signalled incomingData but none was available, state is: %1" ).arg( d->client.state() ) ); } 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, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed())); + connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished())); - QByteArray spare = d->bs->read(); + TQByteArray spare = d->bs->read(); d->ss = new SecureStream(d->bs); - connect(d->ss, SIGNAL(readyRead()), SLOT(ss_readyRead())); - connect(d->ss, SIGNAL(bytesWritten(int)), SLOT(ss_bytesWritten(int))); - connect(d->ss, SIGNAL(tlsHandshaken()), SLOT(ss_tlsHandshaken())); - connect(d->ss, SIGNAL(tlsClosed()), SLOT(ss_tlsClosed())); - connect(d->ss, SIGNAL(error(int)), SLOT(ss_error(int))); + connect(d->ss, TQT_SIGNAL(readyRead()), TQT_SLOT(ss_readyRead())); + connect(d->ss, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(ss_bytesWritten(int))); + connect(d->ss, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(ss_tlsHandshaken())); + connect(d->ss, TQT_SIGNAL(tlsClosed()), TQT_SLOT(ss_tlsClosed())); + connect(d->ss, TQT_SIGNAL(error(int)), TQT_SLOT(ss_error(int))); //d->client.startDialbackOut("andbit.net", "im.pyxa.org"); //d->client.startServerOut(d->server); @@ -474,7 +474,7 @@ void ClientStream::cr_connected() d->client.doTLS = d->tlsHandler ? true: false; d->client.doBinding = d->doBinding;*/ - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; emit connected(); if(!self) return; @@ -515,12 +515,12 @@ void ClientStream::bs_error(int) void ClientStream::ss_readyRead() { - QByteArray a; + TQByteArray a; a = d->ss->read(); #ifdef LIBGW_DEBUG - QCString cs(a.data(), a.size()+1); - CoreProtocol::debug( QString( "ClientStream: ss_readyRead() recv: %1 bytes" ).arg( a.size() ) ); + TQCString cs(a.data(), a.size()+1); + CoreProtocol::debug( TQString( "ClientStream: ss_readyRead() recv: %1 bytes" ).arg( a.size() ) ); cs_dump( a ); #endif @@ -532,7 +532,7 @@ void ClientStream::ss_readyRead() void ClientStream::ss_bytesWritten(int bytes) { #ifdef LIBGW_DEBUG - CoreProtocol::debug( QString( "ClientStream::ss_bytesWritten: %1 bytes written" ).arg( bytes ) ); + CoreProtocol::debug( TQString( "ClientStream::ss_bytesWritten: %1 bytes written" ).arg( bytes ) ); #else Q_UNUSED( bytes ); #endif @@ -540,7 +540,7 @@ void ClientStream::ss_bytesWritten(int bytes) void ClientStream::ss_tlsHandshaken() { - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; emit securityLayerActivated(LayerTLS); if(!self) return; @@ -556,7 +556,7 @@ void ClientStream::ss_tlsClosed() void ClientStream::ss_error(int x) { - CoreProtocol::debug( QString( "ClientStream::ss_error() x=%1 ").arg( x ) ); + CoreProtocol::debug( TQString( "ClientStream::ss_error() x=%1 ").arg( x ) ); if(x == SecureStream::ErrTLS) { reset(); d->errCond = TLSFail; @@ -574,7 +574,7 @@ void ClientStream::srvProcessNext() void ClientStream::doReadyRead() { - //QGuardedPtr<QObject> self = this; + //TQGuardedPtr<TQObject> self = this; emit readyRead(); //if(!self) // return; @@ -585,7 +585,7 @@ void ClientStream::processNext() { if( !d->in.isEmpty() ) { //d->in_rrsig = true; - QTimer::singleShot(0, this, SLOT(doReadyRead())); + TQTimer::singleShot(0, this, TQT_SLOT(doReadyRead())); } } |