diff options
Diffstat (limited to 'kopete/protocols/jabber/libiris/cutestuff/network')
14 files changed, 112 insertions, 102 deletions
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp index a60c8040..3d54cc16 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp @@ -58,8 +58,8 @@ public: SafeDelete sd; }; -BSocket::BSocket(TQObject *parent) -:ByteStream(parent) +BSocket::BSocket(TQObject *tqparent) +:ByteStream(tqparent) { d = new Private; #ifndef NO_NDNS @@ -88,7 +88,7 @@ void BSocket::reset(bool clear) appendRead(block); } - d->sd.deleteLater(d->qsock); + d->sd.deleteLater(TQT_TQOBJECT(d->qsock)); d->qsock = 0; } else { @@ -109,9 +109,7 @@ void BSocket::ensureSocket() { if(!d->qsock) { d->qsock = new TQSocket; -#if QT_VERSION >= 0x030200 d->qsock->setReadBufferSize(READBUFSIZE); -#endif connect(d->qsock, TQT_SIGNAL(hostFound()), TQT_SLOT(qs_hostFound())); connect(d->qsock, TQT_SIGNAL(connected()), TQT_SLOT(qs_connected())); connect(d->qsock, TQT_SIGNAL(connectionClosed()), TQT_SLOT(qs_connectionClosed())); @@ -122,7 +120,7 @@ void BSocket::ensureSocket() } } -void BSocket::connectToHost(const TQString &host, Q_UINT16 port) +void BSocket::connectToHost(const TQString &host, TQ_UINT16 port) { reset(true); d->host = host; @@ -248,7 +246,7 @@ TQHostAddress BSocket::address() const return TQHostAddress(); } -Q_UINT16 BSocket::port() const +TQ_UINT16 BSocket::port() const { if(d->qsock) return d->qsock->port(); @@ -264,7 +262,7 @@ TQHostAddress BSocket::peerAddress() const return TQHostAddress(); } -Q_UINT16 BSocket::peerPort() const +TQ_UINT16 BSocket::peerPort() const { if(d->qsock) return d->qsock->port(); diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h index 7887b9c0..246f61a0 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h +++ b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h @@ -30,13 +30,14 @@ class BSocket : public ByteStream { Q_OBJECT + TQ_OBJECT public: enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound }; enum State { Idle, HostLookup, Connecting, Connected, Closing }; - BSocket(TQObject *parent=0); + BSocket(TQObject *tqparent=0); ~BSocket(); - void connectToHost(const TQString &host, Q_UINT16 port); + void connectToHost(const TQString &host, TQ_UINT16 port); void connectToServer(const TQString &srv, const TQString &type); int socket() const; void setSocket(int); @@ -52,11 +53,11 @@ public: // local TQHostAddress address() const; - Q_UINT16 port() const; + TQ_UINT16 port() const; // remote TQHostAddress peerAddress() const; - Q_UINT16 peerPort() const; + TQ_UINT16 peerPort() const; signals: void hostFound(); diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp index 6abeb556..2064e4ab 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp @@ -58,13 +58,13 @@ static TQString extractLine(TQByteArray *buf, bool *found) static bool extractMainHeader(const TQString &line, TQString *proto, int *code, TQString *msg) { - int n = line.find(' '); + int n = line.tqfind(' '); if(n == -1) return false; if(proto) *proto = line.mid(0, n); ++n; - int n2 = line.find(' ', n); + int n2 = line.tqfind(' ', n); if(n2 == -1) return false; if(code) @@ -96,8 +96,8 @@ public: bool active; }; -HttpConnect::HttpConnect(TQObject *parent) -:ByteStream(parent) +HttpConnect::HttpConnect(TQObject *tqparent) +:ByteStream(tqparent) { d = new Private; connect(&d->sock, TQT_SIGNAL(connected()), TQT_SLOT(sock_connected())); diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h index 2acef809..2f2ed13f 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h +++ b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h @@ -28,9 +28,10 @@ class HttpConnect : public ByteStream { Q_OBJECT + TQ_OBJECT public: enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth }; - HttpConnect(TQObject *parent=0); + HttpConnect(TQObject *tqparent=0); ~HttpConnect(); void setAuth(const TQString &user, const TQString &pass=""); diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp index f20c054f..2e6d0779 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp @@ -82,8 +82,8 @@ public: int polltime; }; -HttpPoll::HttpPoll(TQObject *parent) -:ByteStream(parent) +HttpPoll::HttpPoll(TQObject *tqparent) +:ByteStream(tqparent) { d = new Private; @@ -229,14 +229,14 @@ void HttpPoll::http_result() // get id and packet TQString id; TQString cookie = d->http.getHeader("Set-Cookie"); - int n = cookie.find("ID="); + int n = cookie.tqfind("ID="); if(n == -1) { reset(); error(ErrRead); return; } n += 3; - int n2 = cookie.find(';', n); + int n2 = cookie.tqfind(';', n); if(n2 != -1) id = cookie.mid(n, n2-n); else @@ -358,7 +358,7 @@ void HttpPoll::resetKey() fprintf(stderr, "HttpPoll: reset key!\n"); #endif TQByteArray a = randomArray(64); - TQString str = TQString::fromLatin1(a.data(), a.size()); + TQString str = TQString::tqfromLatin1(a.data(), a.size()); d->key_n = POLL_KEYS; for(int n = 0; n < POLL_KEYS; ++n) @@ -406,13 +406,13 @@ static TQString extractLine(TQByteArray *buf, bool *found) static bool extractMainHeader(const TQString &line, TQString *proto, int *code, TQString *msg) { - int n = line.find(' '); + int n = line.tqfind(' '); if(n == -1) return false; if(proto) *proto = line.mid(0, n); ++n; - int n2 = line.find(' ', n); + int n2 = line.tqfind(' ', n); if(n2 == -1) return false; if(code) @@ -438,8 +438,8 @@ public: TQString host; }; -HttpProxyPost::HttpProxyPost(TQObject *parent) -:TQObject(parent) +HttpProxyPost::HttpProxyPost(TQObject *tqparent) +:TQObject(tqparent) { d = new Private; connect(&d->sock, TQT_SIGNAL(connected()), TQT_SLOT(sock_connected())); @@ -508,7 +508,7 @@ TQString HttpProxyPost::getHeader(const TQString &var) const { for(TQStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it) { const TQString &s = *it; - int n = s.find(": "); + int n = s.tqfind(": "); if(n == -1) continue; TQString v = s.mid(0, n); diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h index c38b7a8a..02034fee 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h +++ b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h @@ -28,9 +28,10 @@ class HttpPoll : public ByteStream { Q_OBJECT + TQ_OBJECT public: enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth }; - HttpPoll(TQObject *parent=0); + HttpPoll(TQObject *tqparent=0); ~HttpPoll(); void setAuth(const TQString &user, const TQString &pass=""); @@ -67,12 +68,13 @@ private: const TQString & getKey(bool *); }; -class HttpProxyPost : public QObject +class HttpProxyPost : public TQObject { Q_OBJECT + TQ_OBJECT public: enum Error { ErrConnectionRefused, ErrHostNotFound, ErrSocket, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth }; - HttpProxyPost(TQObject *parent=0); + HttpProxyPost(TQObject *tqparent=0); ~HttpProxyPost(); void setAuth(const TQString &user, const TQString &pass=""); diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp index a060b23a..39fbfdda 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp @@ -21,7 +21,7 @@ //! \class NDns ndns.h //! \brief Simple DNS resolution using native system calls //! -//! This class is to be used when Qt's TQDns is not good enough. Because QDns +//! This class is to be used when TQt's TQDns is not good enough. Because TQDns //! does not use threads, it cannot make a system call asyncronously. Thus, //! TQDns tries to imitate the behavior of each platform's native behavior, and //! generally falls short. @@ -69,7 +69,7 @@ // CS_NAMESPACE_BEGIN //! \if _hide_doc_ -class NDnsWorkerEvent : public QCustomEvent +class NDnsWorkerEvent : public TQCustomEvent { public: enum Type { WorkerEvent = TQEvent::User + 100 }; @@ -78,7 +78,7 @@ public: NDnsWorker *worker; }; -class NDnsWorker : public QThread +class NDnsWorker : public TQThread { public: NDnsWorker(TQObject *, const TQCString &); @@ -116,7 +116,7 @@ public: class NDnsManager::Private { public: - Item *find(const NDns *n) + Item *tqfind(const NDns *n) { TQPtrListIterator<Item> it(list); for(Item *i; (i = it.current()); ++it) { @@ -126,7 +126,7 @@ public: return 0; } - Item *find(const NDnsWorker *w) + Item *tqfind(const NDnsWorker *w) { TQPtrListIterator<Item> it(list); for(Item *i; (i = it.current()); ++it) { @@ -157,7 +157,7 @@ NDnsManager::NDnsManager() d = new Private; d->list.setAutoDelete(true); - connect(qApp, TQT_SIGNAL(aboutToQuit()), TQT_SLOT(app_aboutToQuit())); + connect(tqApp, TQT_SIGNAL(aboutToQuit()), TQT_SLOT(app_aboutToQuit())); } NDnsManager::~NDnsManager() @@ -184,7 +184,7 @@ void NDnsManager::resolve(NDns *self, const TQString &name) void NDnsManager::stop(NDns *self) { - Item *i = d->find(self); + Item *i = d->tqfind(self); if(!i) return; // disassociate @@ -200,7 +200,7 @@ void NDnsManager::stop(NDns *self) bool NDnsManager::isBusy(const NDns *self) const { - Item *i = d->find(self); + Item *i = d->tqfind(self); return (i ? true: false); } @@ -210,7 +210,7 @@ bool NDnsManager::event(TQEvent *e) NDnsWorkerEvent *we = static_cast<NDnsWorkerEvent*>(e); we->worker->wait(); // ensure that the thread is terminated - Item *i = d->find(we->worker); + Item *i = d->tqfind(we->worker); if(!i) { // should NOT happen return true; @@ -242,7 +242,7 @@ void NDnsManager::tryDestroy() void NDnsManager::app_aboutToQuit() { while(man) { - TQEventLoop *e = qApp->eventLoop(); + TQEventLoop *e = tqApp->eventLoop(); e->processEvents(TQEventLoop::WaitForMore); } } @@ -256,9 +256,9 @@ void NDnsManager::app_aboutToQuit() //! This signal is emitted when the DNS resolution succeeds or fails. //! -//! Constructs an NDns object with parent \a parent. -NDns::NDns(TQObject *parent) -:TQObject(parent) +//! Constructs an NDns object with tqparent \a tqparent. +NDns::NDns(TQObject *tqparent) +:TQObject(tqparent) { } diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h index 48243e30..b48ff75e 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h +++ b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h @@ -32,11 +32,12 @@ class NDnsWorker; class NDnsManager; -class NDns : public QObject +class NDns : public TQObject { Q_OBJECT + TQ_OBJECT public: - NDns(TQObject *parent=0); + NDns(TQObject *tqparent=0); ~NDns(); void resolve(const TQString &); @@ -56,9 +57,10 @@ private: void finished(const TQHostAddress &); }; -class NDnsManager : public QObject +class NDnsManager : public TQObject { Q_OBJECT + TQ_OBJECT public: ~NDnsManager(); class Item; diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp index 5b88b4e5..2968968c 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp @@ -1,5 +1,5 @@ /* - * servsock.cpp - simple wrapper to QServerSocket + * servsock.cpp - simple wrapper to TQServerSocket * Copyright (C) 2003 Justin Karneges * * This library is free software; you can redistribute it and/or @@ -33,8 +33,8 @@ public: ServSockSignal *serv; }; -ServSock::ServSock(TQObject *parent) -:TQObject(parent) +ServSock::ServSock(TQObject *tqparent) +:TQObject(tqparent) { d = new Private; d->serv = 0; @@ -51,7 +51,7 @@ bool ServSock::isActive() const return (d->serv ? true: false); } -bool ServSock::listen(Q_UINT16 port) +bool ServSock::listen(TQ_UINT16 port) { stop(); diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h index 4628d8ea..0fddf2e0 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h +++ b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h @@ -1,5 +1,5 @@ /* - * servsock.h - simple wrapper to QServerSocket + * servsock.h - simple wrapper to TQServerSocket * Copyright (C) 2003 Justin Karneges * * This library is free software; you can redistribute it and/or @@ -25,15 +25,16 @@ // CS_NAMESPACE_BEGIN -class ServSock : public QObject +class ServSock : public TQObject { Q_OBJECT + TQ_OBJECT public: - ServSock(TQObject *parent=0); + ServSock(TQObject *tqparent=0); ~ServSock(); bool isActive() const; - bool listen(Q_UINT16 port); + bool listen(TQ_UINT16 port); void stop(); int port() const; TQHostAddress address() const; @@ -49,9 +50,10 @@ private: Private *d; }; -class ServSockSignal : public QServerSocket +class ServSockSignal : public TQServerSocket { Q_OBJECT + TQ_OBJECT public: ServSockSignal(int port); diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp index 59504170..7948dcd7 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp @@ -49,7 +49,7 @@ //---------------------------------------------------------------------------- // SocksUDP //---------------------------------------------------------------------------- -static TQByteArray sp_create_udp(const TQString &host, Q_UINT16 port, const TQByteArray &buf) +static TQByteArray sp_create_udp(const TQString &host, TQ_UINT16 port, const TQByteArray &buf) { // detect for IP addresses //TQHostAddress addr; @@ -89,7 +89,7 @@ static TQByteArray sp_create_udp(const TQString &host, Q_UINT16 port, const TQBy struct SPS_UDP { TQString host; - Q_UINT16 port; + TQ_UINT16 port; TQByteArray data; }; @@ -107,7 +107,7 @@ static int sp_read_udp(TQByteArray *from, SPS_UDP *s) full_len += 4; if((int)from->size() < full_len) return 0; - Q_UINT32 ip4; + TQ_UINT32 ip4; memcpy(&ip4, from->data() + 4, 4); addr.setAddress(ntohl(ip4)); host = addr.toString(); @@ -122,13 +122,13 @@ static int sp_read_udp(TQByteArray *from, SPS_UDP *s) return 0; TQCString cs(host_len+1); memcpy(cs.data(), from->data() + 5, host_len); - host = TQString::fromLatin1(cs); + host = TQString::tqfromLatin1(cs); } else if(atype == 0x04) { full_len += 16; if((int)from->size() < full_len) return 0; - Q_UINT8 a6[16]; + TQ_UINT8 a6[16]; memcpy(a6, from->data() + 4, 16); addr.setAddress(a6); host = addr.toString(); @@ -138,7 +138,7 @@ static int sp_read_udp(TQByteArray *from, SPS_UDP *s) if((int)from->size() < full_len) return 0; - Q_UINT16 p; + TQ_UINT16 p; memcpy(&p, from->data() + full_len - 2, 2); s->host = host; @@ -208,9 +208,9 @@ void SocksUDP::sn_activated(int) //---------------------------------------------------------------------------- // SocksClient //---------------------------------------------------------------------------- -#define REQ_CONNECT 0x01 -#define REQ_BIND 0x02 -#define REQ_UDPASSOCIATE 0x03 +#define RETQ_CONNECT 0x01 +#define RETQ_BIND 0x02 +#define RETQ_UDPASSOCIATE 0x03 #define RET_SUCCESS 0x00 #define RET_UNREACHABLE 0x04 @@ -366,17 +366,17 @@ static TQByteArray sp_set_request(const TQHostAddress &addr, unsigned short port a[at++] = 0x00; // reserved if(addr.isIp4Addr()) { a[at++] = 0x01; // address type = ipv4 - Q_UINT32 ip4 = htonl(addr.ip4Addr()); + TQ_UINT32 ip4 = htonl(addr.ip4Addr()); a.resize(at+4); memcpy(a.data() + at, &ip4, 4); at += 4; } else { a[at++] = 0x04; - Q_UINT8 a6[16]; + TQ_UINT8 a6[16]; TQStringList s6 = TQStringList::split(':', addr.toString(), true); int at = 0; - Q_UINT16 c; + TQ_UINT16 c; bool ok; for(TQStringList::ConstIterator it = s6.begin(); it != s6.end(); ++it) { c = (*it).toInt(&ok, 16); @@ -396,7 +396,7 @@ static TQByteArray sp_set_request(const TQHostAddress &addr, unsigned short port return a; } -static TQByteArray sp_set_request(const TQString &host, Q_UINT16 port, unsigned char cmd1) +static TQByteArray sp_set_request(const TQString &host, TQ_UINT16 port, unsigned char cmd1) { // detect for IP addresses TQHostAddress addr; @@ -436,7 +436,7 @@ struct SPS_CONNREQ int address_type; TQString host; TQHostAddress addr; - Q_UINT16 port; + TQ_UINT16 port; }; static int sp_get_request(TQByteArray *from, SPS_CONNREQ *s) @@ -453,7 +453,7 @@ static int sp_get_request(TQByteArray *from, SPS_CONNREQ *s) full_len += 4; if((int)from->size() < full_len) return 0; - Q_UINT32 ip4; + TQ_UINT32 ip4; memcpy(&ip4, from->data() + 4, 4); addr.setAddress(ntohl(ip4)); } @@ -467,13 +467,13 @@ static int sp_get_request(TQByteArray *from, SPS_CONNREQ *s) return 0; TQCString cs(host_len+1); memcpy(cs.data(), from->data() + 5, host_len); - host = TQString::fromLatin1(cs); + host = TQString::tqfromLatin1(cs); } else if(atype == 0x04) { full_len += 16; if((int)from->size() < full_len) return 0; - Q_UINT8 a6[16]; + TQ_UINT8 a6[16]; memcpy(a6, from->data() + 4, 16); addr.setAddress(a6); } @@ -484,7 +484,7 @@ static int sp_get_request(TQByteArray *from, SPS_CONNREQ *s) TQByteArray a = ByteStream::takeArray(from, full_len); - Q_UINT16 p; + TQ_UINT16 p; memcpy(&p, a.data() + full_len - 2, 2); s->version = a[0]; @@ -527,16 +527,16 @@ public: int udpPort; }; -SocksClient::SocksClient(TQObject *parent) -:ByteStream(parent) +SocksClient::SocksClient(TQObject *tqparent) +:ByteStream(tqparent) { init(); d->incoming = false; } -SocksClient::SocksClient(int s, TQObject *parent) -:ByteStream(parent) +SocksClient::SocksClient(int s, TQObject *tqparent) +:ByteStream(tqparent) { init(); @@ -838,7 +838,7 @@ void SocksClient::do_request() fprintf(stderr, "SocksClient: Requesting ...\n"); #endif d->step = StepRequest; - int cmd = d->udp ? REQ_UDPASSOCIATE : REQ_CONNECT; + int cmd = d->udp ? RETQ_UDPASSOCIATE : RETQ_CONNECT; TQByteArray buf; if(!d->real_host.isEmpty()) buf = sp_set_request(d->real_host, d->real_port, cmd); @@ -956,7 +956,7 @@ void SocksClient::continueIncoming() } else if(r == 1) { d->waiting = true; - if(s.cmd == REQ_CONNECT) { + if(s.cmd == RETQ_CONNECT) { if(!s.host.isEmpty()) d->rhost = s.host; else @@ -964,7 +964,7 @@ void SocksClient::continueIncoming() d->rport = s.port; incomingConnectRequest(d->rhost, d->rport); } - else if(s.cmd == REQ_UDPASSOCIATE) { + else if(s.cmd == RETQ_UDPASSOCIATE) { incomingUDPAssociateRequest(); } else { @@ -1068,7 +1068,7 @@ TQHostAddress SocksClient::peerAddress() const return d->sock.peerAddress(); } -Q_UINT16 SocksClient::peerPort() const +TQ_UINT16 SocksClient::peerPort() const { return d->sock.peerPort(); } @@ -1078,7 +1078,7 @@ TQString SocksClient::udpAddress() const return d->udpAddr; } -Q_UINT16 SocksClient::udpPort() const +TQ_UINT16 SocksClient::udpPort() const { return d->udpPort; } @@ -1102,8 +1102,8 @@ public: TQSocketNotifier *sn; }; -SocksServer::SocksServer(TQObject *parent) -:TQObject(parent) +SocksServer::SocksServer(TQObject *tqparent) +:TQObject(tqparent) { d = new Private; d->sd = 0; @@ -1124,7 +1124,7 @@ bool SocksServer::isActive() const return d->serv.isActive(); } -bool SocksServer::listen(Q_UINT16 port, bool udp) +bool SocksServer::listen(TQ_UINT16 port, bool udp) { stop(); if(!d->serv.listen(port)) diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/socks.h b/kopete/protocols/jabber/libiris/cutestuff/network/socks.h index 00ed09b4..d61fef1a 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/socks.h +++ b/kopete/protocols/jabber/libiris/cutestuff/network/socks.h @@ -29,9 +29,10 @@ class TQHostAddress; class SocksClient; class SocksServer; -class SocksUDP : public QObject +class SocksUDP : public TQObject { Q_OBJECT + TQ_OBJECT public: ~SocksUDP(); @@ -55,12 +56,13 @@ private: class SocksClient : public ByteStream { Q_OBJECT + TQ_OBJECT public: enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth }; enum Method { AuthNone=0x0001, AuthUsername=0x0002 }; enum Request { ReqConnect, ReqUDPAssociate }; - SocksClient(TQObject *parent=0); - SocksClient(int, TQObject *parent=0); + SocksClient(TQObject *tqparent=0); + SocksClient(int, TQObject *tqparent=0); ~SocksClient(); bool isIncoming() const; @@ -86,11 +88,11 @@ public: // remote address TQHostAddress peerAddress() const; - Q_UINT16 peerPort() const; + TQ_UINT16 peerPort() const; // udp TQString udpAddress() const; - Q_UINT16 udpPort() const; + TQ_UINT16 udpPort() const; SocksUDP *createUDP(const TQString &host, int port, const TQHostAddress &routeAddr, int routePort); signals: @@ -125,15 +127,16 @@ private: void writeData(const TQByteArray &a); }; -class SocksServer : public QObject +class SocksServer : public TQObject { Q_OBJECT + TQ_OBJECT public: - SocksServer(TQObject *parent=0); + SocksServer(TQObject *tqparent=0); ~SocksServer(); bool isActive() const; - bool listen(Q_UINT16 port, bool udp=false); + bool listen(TQ_UINT16 port, bool udp=false); void stop(); int port() const; TQHostAddress address() const; diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp index fd1c4992..0bd0ca45 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp +++ b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp @@ -67,7 +67,7 @@ public: bool failed; TQHostAddress resultAddress; - Q_UINT16 resultPort; + TQ_UINT16 resultPort; bool srvonly; TQString srv; @@ -78,8 +78,8 @@ public: SafeDelete sd; }; -SrvResolver::SrvResolver(TQObject *parent) -:TQObject(parent) +SrvResolver::SrvResolver(TQObject *tqparent) +:TQObject(tqparent) { d = new Private; d->qdns = 0; @@ -180,7 +180,7 @@ TQHostAddress SrvResolver::resultAddress() const return d->resultAddress; } -Q_UINT16 SrvResolver::resultPort() const +TQ_UINT16 SrvResolver::resultPort() const { return d->resultPort; } @@ -205,7 +205,7 @@ void SrvResolver::qdns_done() if(!d->qdns) return; - // apparently we sometimes get this signal even though the results aren't ready + // aptqparently we sometimes get this signal even though the results aren't ready if(d->qdns->isWorking()) return; d->t.stop(); @@ -266,7 +266,7 @@ void SrvResolver::ndns_done() if(!d->qdns) return; - // apparently we sometimes get this signal even though the results aren't ready + // aptqparently we sometimes get this signal even though the results aren't ready if(d->qdns->isWorking()) return; diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h index 400639c1..5533790e 100644 --- a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h +++ b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h @@ -26,11 +26,12 @@ // CS_NAMESPACE_BEGIN -class SrvResolver : public QObject +class SrvResolver : public TQObject { Q_OBJECT + TQ_OBJECT public: - SrvResolver(TQObject *parent=0); + SrvResolver(TQObject *tqparent=0); ~SrvResolver(); void resolve(const TQString &server, const TQString &type, const TQString &proto); @@ -43,7 +44,7 @@ public: bool failed() const; TQHostAddress resultAddress() const; - Q_UINT16 resultPort() const; + TQ_UINT16 resultPort() const; signals: void resultsReady(); |