summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp')
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp
index 851873f2..d462a17e 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp
@@ -20,9 +20,9 @@
#include"srvresolver.h"
-#include<qcstring.h>
-#include<qtimer.h>
-#include<qdns.h>
+#include<tqcstring.h>
+#include<tqtimer.h>
+#include<tqdns.h>
#include"safedelete.h"
#ifndef NO_NDNS
@@ -31,14 +31,14 @@
// CS_NAMESPACE_BEGIN
-static void sortSRVList(QValueList<QDns::Server> &list)
+static void sortSRVList(TQValueList<TQDns::Server> &list)
{
- QValueList<QDns::Server> tmp = list;
+ TQValueList<TQDns::Server> tmp = list;
list.clear();
while(!tmp.isEmpty()) {
- QValueList<QDns::Server>::Iterator p = tmp.end();
- for(QValueList<QDns::Server>::Iterator it = tmp.begin(); it != tmp.end(); ++it) {
+ TQValueList<TQDns::Server>::Iterator p = tmp.end();
+ for(TQValueList<TQDns::Server>::Iterator it = tmp.begin(); it != tmp.end(); ++it) {
if(p == tmp.end())
p = it;
else {
@@ -60,34 +60,34 @@ class SrvResolver::Private
public:
Private() {}
- QDns *qdns;
+ TQDns *qdns;
#ifndef NO_NDNS
NDns ndns;
#endif
bool failed;
- QHostAddress resultAddress;
+ TQHostAddress resultAddress;
Q_UINT16 resultPort;
bool srvonly;
- QString srv;
- QValueList<QDns::Server> servers;
+ TQString srv;
+ TQValueList<TQDns::Server> servers;
bool aaaa;
- QTimer t;
+ TQTimer t;
SafeDelete sd;
};
-SrvResolver::SrvResolver(QObject *parent)
-:QObject(parent)
+SrvResolver::SrvResolver(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->qdns = 0;
#ifndef NO_NDNS
- connect(&d->ndns, SIGNAL(resultsReady()), SLOT(ndns_done()));
+ connect(&d->ndns, TQT_SIGNAL(resultsReady()), TQT_SLOT(ndns_done()));
#endif
- connect(&d->t, SIGNAL(timeout()), SLOT(t_timeout()));
+ connect(&d->t, TQT_SIGNAL(timeout()), TQT_SLOT(t_timeout()));
stop();
}
@@ -97,31 +97,31 @@ SrvResolver::~SrvResolver()
delete d;
}
-void SrvResolver::resolve(const QString &server, const QString &type, const QString &proto)
+void SrvResolver::resolve(const TQString &server, const TQString &type, const TQString &proto)
{
stop();
d->failed = false;
d->srvonly = false;
- d->srv = QString("_") + type + "._" + proto + '.' + server;
+ d->srv = TQString("_") + type + "._" + proto + '.' + server;
d->t.start(15000, true);
d->qdns = new QDns;
- connect(d->qdns, SIGNAL(resultsReady()), SLOT(qdns_done()));
- d->qdns->setRecordType(QDns::Srv);
+ connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(qdns_done()));
+ d->qdns->setRecordType(TQDns::Srv);
d->qdns->setLabel(d->srv);
}
-void SrvResolver::resolveSrvOnly(const QString &server, const QString &type, const QString &proto)
+void SrvResolver::resolveSrvOnly(const TQString &server, const TQString &type, const TQString &proto)
{
stop();
d->failed = false;
d->srvonly = true;
- d->srv = QString("_") + type + "._" + proto + '.' + server;
+ d->srv = TQString("_") + type + "._" + proto + '.' + server;
d->t.start(15000, true);
d->qdns = new QDns;
- connect(d->qdns, SIGNAL(resultsReady()), SLOT(qdns_done()));
- d->qdns->setRecordType(QDns::Srv);
+ connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(qdns_done()));
+ d->qdns->setRecordType(TQDns::Srv);
d->qdns->setLabel(d->srv);
}
@@ -146,7 +146,7 @@ void SrvResolver::stop()
if(d->ndns.isBusy())
d->ndns.stop();
#endif
- d->resultAddress = QHostAddress();
+ d->resultAddress = TQHostAddress();
d->resultPort = 0;
d->servers.clear();
d->srv = "";
@@ -165,7 +165,7 @@ bool SrvResolver::isBusy() const
return false;
}
-QValueList<QDns::Server> SrvResolver::servers() const
+TQValueList<TQDns::Server> SrvResolver::servers() const
{
return d->servers;
}
@@ -175,7 +175,7 @@ bool SrvResolver::failed() const
return d->failed;
}
-QHostAddress SrvResolver::resultAddress() const
+TQHostAddress SrvResolver::resultAddress() const
{
return d->resultAddress;
}
@@ -191,11 +191,11 @@ void SrvResolver::tryNext()
d->ndns.resolve(d->servers.first().name);
#else
d->qdns = new QDns;
- connect(d->qdns, SIGNAL(resultsReady()), SLOT(ndns_done()));
+ connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(ndns_done()));
if(d->aaaa)
- d->qdns->setRecordType(QDns::Aaaa); // IPv6
+ d->qdns->setRecordType(TQDns::Aaaa); // IPv6
else
- d->qdns->setRecordType(QDns::A); // IPv4
+ d->qdns->setRecordType(TQDns::A); // IPv4
d->qdns->setLabel(d->servers.first().name);
#endif
}
@@ -213,8 +213,8 @@ void SrvResolver::qdns_done()
SafeDeleteLock s(&d->sd);
// grab the server list and destroy the qdns object
- QValueList<QDns::Server> list;
- if(d->qdns->recordType() == QDns::Srv)
+ TQValueList<TQDns::Server> list;
+ if(d->qdns->recordType() == TQDns::Srv)
list = d->qdns->servers();
d->qdns->disconnect(this);
d->sd.deleteLater(d->qdns);
@@ -247,7 +247,7 @@ void SrvResolver::ndns_done()
d->servers.remove(d->servers.begin());
if(r) {
- d->resultAddress = QHostAddress(d->ndns.result());
+ d->resultAddress = TQHostAddress(d->ndns.result());
d->resultPort = port;
resultsReady();
}
@@ -273,8 +273,8 @@ void SrvResolver::ndns_done()
SafeDeleteLock s(&d->sd);
// grab the address list and destroy the qdns object
- QValueList<QHostAddress> list;
- if(d->qdns->recordType() == QDns::A || d->qdns->recordType() == QDns::Aaaa)
+ TQValueList<TQHostAddress> list;
+ if(d->qdns->recordType() == TQDns::A || d->qdns->recordType() == TQDns::Aaaa)
list = d->qdns->addresses();
d->qdns->disconnect(this);
d->sd.deleteLater(d->qdns);