summaryrefslogtreecommitdiffstats
path: root/dnssd
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /dnssd
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'dnssd')
-rw-r--r--dnssd/domainbrowser.cpp38
-rw-r--r--dnssd/domainbrowser.h18
-rw-r--r--dnssd/publicservice.cpp40
-rw-r--r--dnssd/publicservice.h26
-rw-r--r--dnssd/query.cpp36
-rw-r--r--dnssd/query.h8
-rw-r--r--dnssd/remoteservice.cpp28
-rw-r--r--dnssd/remoteservice.h14
-rw-r--r--dnssd/responder.cpp14
-rw-r--r--dnssd/responder.h12
-rw-r--r--dnssd/sdevent.h30
-rw-r--r--dnssd/servicebase.cpp36
-rw-r--r--dnssd/servicebase.h34
-rw-r--r--dnssd/servicebrowser.cpp76
-rw-r--r--dnssd/servicebrowser.h28
15 files changed, 219 insertions, 219 deletions
diff --git a/dnssd/domainbrowser.cpp b/dnssd/domainbrowser.cpp
index f1c570e6a..8a24f11b6 100644
--- a/dnssd/domainbrowser.cpp
+++ b/dnssd/domainbrowser.cpp
@@ -18,7 +18,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "domainbrowser.h"
#include "settings.h"
#include "sdevent.h"
@@ -58,8 +58,8 @@ public:
#ifdef HAVE_DNSSD
~DomainBrowserPrivate() { if (m_browser) avahi_domain_browser_free(m_browser); }
#endif
- QStringList m_domains;
- virtual void customEvent(QCustomEvent* event);
+ TQStringList m_domains;
+ virtual void customEvent(TQCustomEvent* event);
bool m_browseLAN;
bool m_started;
#ifdef HAVE_DNSSD
@@ -68,9 +68,9 @@ public:
DomainBrowser* m_owner;
};
-void DomainBrowserPrivate::customEvent(QCustomEvent* event)
+void DomainBrowserPrivate::customEvent(TQCustomEvent* event)
{
- if (event->type()==QEvent::User+SD_ADDREMOVE) {
+ if (event->type()==TQEvent::User+SD_ADDREMOVE) {
AddRemoveEvent *aev = static_cast<AddRemoveEvent*>(event);
if (aev->m_op==AddRemoveEvent::Add) m_owner->gotNewDomain(aev->m_domain);
else m_owner->gotRemoveDomain(aev->m_domain);
@@ -78,7 +78,7 @@ void DomainBrowserPrivate::customEvent(QCustomEvent* event)
}
-DomainBrowser::DomainBrowser(QObject *parent) : QObject(parent)
+DomainBrowser::DomainBrowser(TQObject *parent) : TQObject(parent)
{
d = new DomainBrowserPrivate(this);
d->m_domains = Configuration::domainList();
@@ -86,11 +86,11 @@ DomainBrowser::DomainBrowser(QObject *parent) : QObject(parent)
d->m_domains+="local.";
d->m_browseLAN=true;
}
- connect(KApplication::kApplication(),SIGNAL(kipcMessage(int,int)),this,
- SLOT(domainListChanged(int,int)));
+ connect(KApplication::kApplication(),TQT_SIGNAL(kipcMessage(int,int)),this,
+ TQT_SLOT(domainListChanged(int,int)));
}
-DomainBrowser::DomainBrowser(const QStringList& domains, bool recursive, QObject *parent) : QObject(parent)
+DomainBrowser::DomainBrowser(const TQStringList& domains, bool recursive, TQObject *parent) : TQObject(parent)
{
d = new DomainBrowserPrivate(this);
d->m_browseLAN = recursive;
@@ -109,8 +109,8 @@ void DomainBrowser::startBrowse()
if (d->m_started) return;
d->m_started=true;
if (ServiceBrowser::isAvailable()!=ServiceBrowser::Working) return;
- QStringList::const_iterator itEnd = d->m_domains.end();
- for (QStringList::const_iterator it=d->m_domains.begin(); it!=itEnd; ++it ) emit domainAdded(*it);
+ TQStringList::const_iterator itEnd = d->m_domains.end();
+ for (TQStringList::const_iterator it=d->m_domains.begin(); it!=itEnd; ++it ) emit domainAdded(*it);
#ifdef HAVE_DNSSD
if (d->m_browseLAN)
#ifdef AVAHI_API_0_6
@@ -123,14 +123,14 @@ void DomainBrowser::startBrowse()
#endif
}
-void DomainBrowser::gotNewDomain(const QString& domain)
+void DomainBrowser::gotNewDomain(const TQString& domain)
{
if (d->m_domains.contains(domain)) return;
d->m_domains.append(domain);
emit domainAdded(domain);
}
-void DomainBrowser::gotRemoveDomain(const QString& domain)
+void DomainBrowser::gotRemoveDomain(const TQString& domain)
{
d->m_domains.remove(domain);
emit domainRemoved(domain);
@@ -151,8 +151,8 @@ void DomainBrowser::domainListChanged(int message,int)
// remove all domains and resolvers
if (was_started) {
- QStringList::const_iterator itEnd = d->m_domains.end();
- for (QStringList::const_iterator it=d->m_domains.begin(); it!=itEnd; ++it )
+ TQStringList::const_iterator itEnd = d->m_domains.end();
+ for (TQStringList::const_iterator it=d->m_domains.begin(); it!=itEnd; ++it )
emit domainRemoved(*it);
}
d->m_domains.clear();
@@ -165,7 +165,7 @@ void DomainBrowser::domainListChanged(int message,int)
if (was_started) startBrowse();
}
-const QStringList& DomainBrowser::domains() const
+const TQStringList& DomainBrowser::domains() const
{
return d->m_domains;
}
@@ -187,11 +187,11 @@ void domains_callback(AvahiDomainBrowser*, AvahiIfIndex, AvahiProtocol, AvahiBr
void* context)
#endif
{
- QObject *obj = reinterpret_cast<QObject*>(context);
+ TQObject *obj = reinterpret_cast<TQObject*>(context);
AddRemoveEvent* arev=new AddRemoveEvent((event==AVAHI_BROWSER_NEW) ? AddRemoveEvent::Add :
- AddRemoveEvent::Remove, QString::null, QString::null,
+ AddRemoveEvent::Remove, TQString::null, TQString::null,
DNSToDomain(replyDomain));
- QApplication::postEvent(obj, arev);
+ TQApplication::postEvent(obj, arev);
}
#endif
diff --git a/dnssd/domainbrowser.h b/dnssd/domainbrowser.h
index 825422d8e..217a25617 100644
--- a/dnssd/domainbrowser.h
+++ b/dnssd/domainbrowser.h
@@ -21,8 +21,8 @@
#ifndef DNSSDDOMAINBROWSER_H
#define DNSSDDOMAINBROWSER_H
-#include <qobject.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqdict.h>
#include <dnssd/remoteservice.h>
// KIPC message ID used by kcm module to signal change in browsing domains list
@@ -47,7 +47,7 @@ public:
All changes in configuration are applied immediately.
@param parent Parent object.
*/
- DomainBrowser(QObject *parent=0);
+ DomainBrowser(TQObject *parent=0);
/**
Constructor that creates browser for domain list. This does not use global
@@ -57,14 +57,14 @@ public:
@param parent Parent object.
This process is recursive.
*/
- DomainBrowser(const QStringList& domains, bool recursive=false, QObject *parent=0);
+ DomainBrowser(const TQStringList& domains, bool recursive=false, TQObject *parent=0);
~DomainBrowser();
/**
Current list of domains to browse.
*/
- const QStringList& domains() const;
+ const TQStringList& domains() const;
/**
Starts browsing. To stop destroy this object.
@@ -80,12 +80,12 @@ signals:
/**
Emitted when domain has been removed from browsing list
*/
- void domainRemoved(const QString&);
+ void domainRemoved(const TQString&);
/**
New domain has been discovered. Also emitted for domain specified in constructor
and in global configuration
*/
- void domainAdded(const QString&);
+ void domainAdded(const TQString&);
protected:
virtual void virtual_hook(int,void*);
@@ -93,8 +93,8 @@ private:
friend class DomainBrowserPrivate;
DomainBrowserPrivate *d;
- void gotNewDomain(const QString&);
- void gotRemoveDomain(const QString&);
+ void gotNewDomain(const TQString&);
+ void gotRemoveDomain(const TQString&);
private slots:
void domainListChanged(int,int);
diff --git a/dnssd/publicservice.cpp b/dnssd/publicservice.cpp
index 63ab6750b..326dabeb7 100644
--- a/dnssd/publicservice.cpp
+++ b/dnssd/publicservice.cpp
@@ -26,7 +26,7 @@
#endif
#include <netinet/in.h>
#include <sys/socket.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <network/ksocketaddress.h>
#include <kurl.h>
#include <unistd.h>
@@ -74,15 +74,15 @@ public:
};
-PublicService::PublicService(const QString& name, const QString& type, unsigned int port,
- const QString& domain)
- : QObject(), ServiceBase(name, type, QString::null, domain, port)
+PublicService::PublicService(const TQString& name, const TQString& type, unsigned int port,
+ const TQString& domain)
+ : TQObject(), ServiceBase(name, type, TQString::null, domain, port)
{
d = new PublicServicePrivate;
#ifdef HAVE_DNSSD
if (Responder::self().client()) {
d->m_group = avahi_entry_group_new(Responder::self().client(), publish_callback,this);
- connect(&Responder::self(),SIGNAL(stateChanged(AvahiClientState)),this,SLOT(clientState(AvahiClientState)));
+ connect(&Responder::self(),TQT_SIGNAL(stateChanged(AvahiClientState)),this,TQT_SLOT(clientState(AvahiClientState)));
}
#endif
if (domain.isNull())
@@ -108,7 +108,7 @@ void PublicService::tryApply()
}
}
-void PublicService::setServiceName(const QString& serviceName)
+void PublicService::setServiceName(const TQString& serviceName)
{
m_serviceName = serviceName;
#ifdef HAVE_DNSSD
@@ -119,7 +119,7 @@ void PublicService::setServiceName(const QString& serviceName)
#endif
}
-void PublicService::setDomain(const QString& domain)
+void PublicService::setDomain(const TQString& domain)
{
m_domain = domain;
#ifdef HAVE_DNSSD
@@ -131,7 +131,7 @@ void PublicService::setDomain(const QString& domain)
}
-void PublicService::setType(const QString& type)
+void PublicService::setType(const TQString& type)
{
m_type = type;
#ifdef HAVE_DNSSD
@@ -153,7 +153,7 @@ void PublicService::setPort(unsigned short port)
#endif
}
-void PublicService::setTextData(const QMap<QString,QString>& textData)
+void PublicService::setTextData(const TQMap<TQString,TQString>& textData)
{
m_textData = textData;
#ifdef HAVE_DNSSD
@@ -187,8 +187,8 @@ bool PublicService::fillEntryGroup()
{
#ifdef HAVE_DNSSD
AvahiStringList *s=0;
- QMap<QString,QString>::ConstIterator itEnd = m_textData.end();
- for (QMap<QString,QString>::ConstIterator it = m_textData.begin(); it!=itEnd ; ++it)
+ TQMap<TQString,TQString>::ConstIterator itEnd = m_textData.end();
+ for (TQMap<TQString,TQString>::ConstIterator it = m_textData.begin(); it!=itEnd ; ++it)
s = avahi_string_list_add_pair(s, it.key().utf8(),it.data().utf8());
#ifdef AVAHI_API_0_6
bool res = (!avahi_entry_group_add_service_strlst(d->m_group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, (AvahiPublishFlags)0,
@@ -255,14 +255,14 @@ void PublicService::publishAsync()
#ifdef HAVE_DNSSD
void publish_callback (AvahiEntryGroup*, AvahiEntryGroupState s, void *context)
{
- QObject *obj = reinterpret_cast<QObject*>(context);
+ TQObject *obj = reinterpret_cast<TQObject*>(context);
if (s!=AVAHI_ENTRY_GROUP_ESTABLISHED && s!=AVAHI_ENTRY_GROUP_COLLISION) return;
PublishEvent* pev=new PublishEvent(s==AVAHI_ENTRY_GROUP_ESTABLISHED);
- QApplication::postEvent(obj, pev);
+ TQApplication::postEvent(obj, pev);
}
#endif
-const KURL PublicService::toInvitation(const QString& host)
+const KURL PublicService::toInvitation(const TQString& host)
{
KURL url;
url.setProtocol("invitation");
@@ -275,19 +275,19 @@ const KURL PublicService::toInvitation(const QString& host)
//FIXME: if there is no public interface, select any non-loopback
url.setPort(m_port);
url.setPath("/"+m_type+"/"+KURL::encode_string(m_serviceName));
- QString query;
- QMap<QString,QString>::ConstIterator itEnd = m_textData.end();
- for (QMap<QString,QString>::ConstIterator it = m_textData.begin(); it!=itEnd ; ++it)
+ TQString query;
+ TQMap<TQString,TQString>::ConstIterator itEnd = m_textData.end();
+ for (TQMap<TQString,TQString>::ConstIterator it = m_textData.begin(); it!=itEnd ; ++it)
url.addQueryItem(it.key(),it.data());;
return url;
}
-void PublicService::customEvent(QCustomEvent* event)
+void PublicService::customEvent(TQCustomEvent* event)
{
#ifdef HAVE_DNSSD
- if (event->type()==QEvent::User+SD_PUBLISH) {
+ if (event->type()==TQEvent::User+SD_PUBLISH) {
if (!static_cast<PublishEvent*>(event)->m_ok) {
- setServiceName(QString::fromUtf8(avahi_alternative_service_name(m_serviceName.utf8())));
+ setServiceName(TQString::fromUtf8(avahi_alternative_service_name(m_serviceName.utf8())));
return;
}
d->m_published=true;
diff --git a/dnssd/publicservice.h b/dnssd/publicservice.h
index 31897a03e..946225778 100644
--- a/dnssd/publicservice.h
+++ b/dnssd/publicservice.h
@@ -21,7 +21,7 @@
#ifndef DNSSDPUBLICSERVICE_H
#define DNSSDPUBLICSERVICE_H
-#include <qobject.h>
+#include <tqobject.h>
#include <dnssd/servicebase.h>
#ifdef HAVE_DNSSD
#include <avahi-client/client.h>
@@ -49,7 +49,7 @@ Asynchronous publishing is better for responsiveness. Example:
\code
DNSSD::PublicService *service = new DNSSD::PublicService("My files","_http._tcp",80);
-connect(service,SIGNAL(published(bool)),this,SLOT(wasPublished(bool)));
+connect(service,TQT_SIGNAL(published(bool)),this,TQT_SLOT(wasPublished(bool)));
service->publishAsync();
\endcode
@@ -58,20 +58,20 @@ service->publishAsync();
@author Jakub Stachowski
*/
-class KDNSSD_EXPORT PublicService : public QObject, public ServiceBase
+class KDNSSD_EXPORT PublicService : public TQObject, public ServiceBase
{
Q_OBJECT
public:
/**
- @param name Service name. If set to QString::null, computer name will be used and will be
+ @param name Service name. If set to TQString::null, computer name will be used and will be
available via serviceName() after successful registration
@param type Service type. Has to be in form _sometype._udp or _sometype._tcp
@param port Port number. Set to 0 to "reserve" service name.
- @param domain Domain name. If left as QString:null, user configuration will be used. "local."
+ @param domain Domain name. If left as TQString:null, user configuration will be used. "local."
means local LAN
*/
- PublicService(const QString& name=QString::null,const QString& type=QString::null,
- unsigned int port=0,const QString& domain=QString::null);
+ PublicService(const TQString& name=TQString::null,const TQString& type=TQString::null,
+ unsigned int port=0,const TQString& domain=TQString::null);
~PublicService();
@@ -102,18 +102,18 @@ public:
/**
Sets new text properties. If services is already published, it will be re-announced with new data.
*/
- void setTextData(const QMap<QString,QString>& textData);
+ void setTextData(const TQMap<TQString,TQString>& textData);
/**
Sets name of the service. If service is currently published, it will be re-announced with new data.
*/
- void setServiceName(const QString& serviceName);
+ void setServiceName(const TQString& serviceName);
/**
Sets type of service. It has to in form of _type._udp or _type._tcp. If service is
currently published, it will be re-announced with new data.
*/
- void setType(const QString& type);
+ void setType(const TQString& type);
/**
Sets port. If service is currently published, it will be re-announced with new data.
@@ -124,7 +124,7 @@ public:
Sets domain where service is published. "local." means local LAN. If service is currently
published, it will be re-announced with new data.
*/
- void setDomain(const QString& domain);
+ void setDomain(const TQString& domain);
/**
Translates service into URL that can be sent to another user.
@@ -132,7 +132,7 @@ public:
default route) will be used.
@since 3.5
*/
- const KURL toInvitation(const QString& host=QString::null);
+ const KURL toInvitation(const TQString& host=TQString::null);
signals:
/**
@@ -148,7 +148,7 @@ private slots:
void clientState(AvahiClientState);
protected:
- virtual void customEvent(QCustomEvent* event);
+ virtual void customEvent(TQCustomEvent* event);
virtual void virtual_hook(int, void*);
};
diff --git a/dnssd/query.cpp b/dnssd/query.cpp
index 163891c71..3306dc256 100644
--- a/dnssd/query.cpp
+++ b/dnssd/query.cpp
@@ -22,9 +22,9 @@
#include "responder.h"
#include "remoteservice.h"
#include "sdevent.h"
-#include <qdatetime.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqdatetime.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#ifdef HAVE_DNSSD
#include <avahi-client/client.h>
@@ -59,22 +59,22 @@ enum BrowserType { Types, Services };
class QueryPrivate
{
public:
- QueryPrivate(const QString& type, const QString& domain) : m_finished(false), m_browser(0),
+ QueryPrivate(const TQString& type, const TQString& domain) : m_finished(false), m_browser(0),
m_running(false), m_domain(domain), m_type(type) {}
bool m_finished;
BrowserType m_browserType;
void* m_browser;
bool m_running;
- QString m_domain;
- QTimer timeout;
- QString m_type;
+ TQString m_domain;
+ TQTimer timeout;
+ TQString m_type;
};
-Query::Query(const QString& type, const QString& domain)
+Query::Query(const TQString& type, const TQString& domain)
{
d = new QueryPrivate(type,domain);
- connect(&d->timeout,SIGNAL(timeout()),this,SLOT(timeout()));
+ connect(&d->timeout,TQT_SIGNAL(timeout()),this,TQT_SLOT(timeout()));
}
@@ -101,7 +101,7 @@ bool Query::isFinished() const
return d->m_finished;
}
-const QString& Query::domain() const
+const TQString& Query::domain() const
{
return d->m_domain;
}
@@ -142,9 +142,9 @@ void Query::virtual_hook(int, void*)
{
}
-void Query::customEvent(QCustomEvent* event)
+void Query::customEvent(TQCustomEvent* event)
{
- if (event->type()==QEvent::User+SD_ADDREMOVE) {
+ if (event->type()==TQEvent::User+SD_ADDREMOVE) {
d->timeout.start(TIMEOUT_LAN,true);
d->m_finished=false;
AddRemoveEvent *aev = static_cast<AddRemoveEvent*>(event);
@@ -171,11 +171,11 @@ void services_callback (AvahiServiceBrowser*, AvahiIfIndex, AvahiProtocol, Avahi
const char* serviceName, const char* regtype, const char* replyDomain, void* context)
#endif
{
- QObject *obj = reinterpret_cast<QObject*>(context);
+ TQObject *obj = reinterpret_cast<TQObject*>(context);
AddRemoveEvent* arev = new AddRemoveEvent((event==AVAHI_BROWSER_NEW) ? AddRemoveEvent::Add :
- AddRemoveEvent::Remove, QString::fromUtf8(serviceName), regtype,
+ AddRemoveEvent::Remove, TQString::fromUtf8(serviceName), regtype,
DNSToDomain(replyDomain));
- QApplication::postEvent(obj, arev);
+ TQApplication::postEvent(obj, arev);
}
#ifdef AVAHI_API_0_6
@@ -186,11 +186,11 @@ void types_callback(AvahiServiceTypeBrowser*, AvahiIfIndex, AvahiProtocol, Avahi
const char* replyDomain, void* context)
#endif
{
- QObject *obj = reinterpret_cast<QObject*>(context);
+ TQObject *obj = reinterpret_cast<TQObject*>(context);
AddRemoveEvent* arev = new AddRemoveEvent((event==AVAHI_BROWSER_NEW) ? AddRemoveEvent::Add :
- AddRemoveEvent::Remove, QString::null, regtype,
+ AddRemoveEvent::Remove, TQString::null, regtype,
DNSToDomain(replyDomain));
- QApplication::postEvent(obj, arev);
+ TQApplication::postEvent(obj, arev);
}
#endif
diff --git a/dnssd/query.h b/dnssd/query.h
index 793b18731..90e9fe19d 100644
--- a/dnssd/query.h
+++ b/dnssd/query.h
@@ -21,7 +21,7 @@
#ifndef DNSSDQUERY_H
#define DNSSDQUERY_H
-#include <qobject.h>
+#include <tqobject.h>
#include <dnssd/remoteservice.h>
@@ -47,7 +47,7 @@ public:
@param domain Domain name - if set to "local." multicast query will be performed,
otherwise unicast
*/
- Query(const QString& type, const QString& domain);
+ Query(const TQString& type, const TQString& domain);
virtual ~Query();
@@ -71,7 +71,7 @@ public:
/**
Returns queried domain
*/
- const QString& domain() const;
+ const TQString& domain() const;
signals:
/**
@@ -91,7 +91,7 @@ signals:
protected:
virtual void virtual_hook(int, void*);
- virtual void customEvent(QCustomEvent* event);
+ virtual void customEvent(TQCustomEvent* event);
private:
QueryPrivate *d;
private slots:
diff --git a/dnssd/remoteservice.cpp b/dnssd/remoteservice.cpp
index 865c3be7f..62ec01eb0 100644
--- a/dnssd/remoteservice.cpp
+++ b/dnssd/remoteservice.cpp
@@ -20,8 +20,8 @@
#include <config.h>
-#include <qeventloop.h>
-#include <qapplication.h>
+#include <tqeventloop.h>
+#include <tqapplication.h>
#include <kurl.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
@@ -72,12 +72,12 @@ public:
#endif
};
-RemoteService::RemoteService(const QString& label)
+RemoteService::RemoteService(const TQString& label)
{
decode(label);
d = new RemoteServicePrivate();
}
-RemoteService::RemoteService(const QString& name,const QString& type,const QString& domain)
+RemoteService::RemoteService(const TQString& name,const TQString& type,const TQString& domain)
: ServiceBase(name, type, domain)
{
d = new RemoteServicePrivate();
@@ -139,16 +139,16 @@ bool RemoteService::isResolved() const
return d->m_resolved;
}
-void RemoteService::customEvent(QCustomEvent* event)
+void RemoteService::customEvent(TQCustomEvent* event)
{
- if (event->type() == QEvent::User+SD_ERROR) {
+ if (event->type() == TQEvent::User+SD_ERROR) {
#ifdef HAVE_DNSSD
d->stop();
#endif
d->m_resolved=false;
emit resolved(false);
}
- if (event->type() == QEvent::User+SD_RESOLVE) {
+ if (event->type() == TQEvent::User+SD_RESOLVE) {
ResolveEvent* rev = static_cast<ResolveEvent*>(event);
m_hostName = rev->m_hostname;
m_port = rev->m_port;
@@ -163,7 +163,7 @@ void RemoteService::virtual_hook(int, void*)
// BASE::virtual_hook(int, void*);
}
-QDataStream & operator<< (QDataStream & s, const RemoteService & a)
+TQDataStream & operator<< (TQDataStream & s, const RemoteService & a)
{
s << (static_cast<ServiceBase>(a));
Q_INT8 resolved = a.d->m_resolved ? 1:0;
@@ -171,7 +171,7 @@ QDataStream & operator<< (QDataStream & s, const RemoteService & a)
return s;
}
-QDataStream & operator>> (QDataStream & s, RemoteService & a)
+TQDataStream & operator>> (TQDataStream & s, RemoteService & a)
{
// stop any possible resolve going on
#ifdef HAVE_DNSSD
@@ -195,22 +195,22 @@ void resolve_callback(AvahiServiceResolver*, AvahiIfIndex, AvahiProtocol, AvahiR
uint16_t port, AvahiStringList* txt, void* context)
#endif
{
- QObject *obj = reinterpret_cast<QObject*>(context);
+ TQObject *obj = reinterpret_cast<TQObject*>(context);
if (e != AVAHI_RESOLVER_FOUND) {
ErrorEvent err;
- QApplication::sendEvent(obj, &err);
+ TQApplication::sendEvent(obj, &err);
return;
}
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
while (txt) {
char *key, *value;
size_t size;
if (avahi_string_list_get_pair(txt,&key,&value,&size)) break;
- map[QString::fromUtf8(key)]=(value) ? QString::fromUtf8(value) : QString::null;
+ map[TQString::fromUtf8(key)]=(value) ? TQString::fromUtf8(value) : TQString::null;
txt = txt->next;
}
ResolveEvent rev(DNSToDomain(hostname),port,map);
- QApplication::sendEvent(obj, &rev);
+ TQApplication::sendEvent(obj, &rev);
}
#endif
diff --git a/dnssd/remoteservice.h b/dnssd/remoteservice.h
index 220331b5f..b7c9f05ef 100644
--- a/dnssd/remoteservice.h
+++ b/dnssd/remoteservice.h
@@ -21,7 +21,7 @@
#ifndef DNSSDREMOTESERVICE_H
#define DNSSDREMOTESERVICE_H
-#include <qobject.h>
+#include <tqobject.h>
#include <dnssd/servicebase.h>
class QDataStream;
@@ -39,7 +39,7 @@ service is resolved are name, type.and domain.
@short class representing service announced on remote machine.
@author Jakub Stachowski
*/
-class KDNSSD_EXPORT RemoteService : public QObject, public ServiceBase
+class KDNSSD_EXPORT RemoteService : public TQObject, public ServiceBase
{
Q_OBJECT
public:
@@ -50,12 +50,12 @@ public:
@param label Data returned by PTR query - it is decoded into name, type and
domain
*/
- RemoteService(const QString& label);
+ RemoteService(const TQString& label);
/**
Creates unresolved remote service with given name, type and domain.
*/
- RemoteService(const QString& name,const QString& type,const QString& domain);
+ RemoteService(const TQString& name,const TQString& type,const TQString& domain);
/**
Creates resolved remote service from invitation URL constructed by PublicService::toInvitation.
@@ -94,15 +94,15 @@ signals:
protected:
virtual void virtual_hook(int id, void *data);
- virtual void customEvent(QCustomEvent* event);
+ virtual void customEvent(TQCustomEvent* event);
private:
void resolveError();
void resolved(const char *host, unsigned short port, unsigned short txtlen,
const char* txtRecord);
RemoteServicePrivate *d;
- friend KDNSSD_EXPORT QDataStream & operator<< (QDataStream & s, const RemoteService & a);
- friend KDNSSD_EXPORT QDataStream & operator>> (QDataStream & s, RemoteService & a);
+ friend KDNSSD_EXPORT TQDataStream & operator<< (TQDataStream & s, const RemoteService & a);
+ friend KDNSSD_EXPORT TQDataStream & operator>> (TQDataStream & s, RemoteService & a);
};
diff --git a/dnssd/responder.cpp b/dnssd/responder.cpp
index d92d30261..d85358429 100644
--- a/dnssd/responder.cpp
+++ b/dnssd/responder.cpp
@@ -19,8 +19,8 @@
*/
#include "responder.h"
-#include <qapplication.h>
-#include <qeventloop.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
#include <kstaticdeleter.h>
#include <kidna.h>
#include <kdebug.h>
@@ -72,7 +72,7 @@ Responder& Responder::self()
void Responder::process()
{
- qApp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
+ qApp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput);
}
#ifdef HAVE_DNSSD
@@ -86,20 +86,20 @@ AvahiClientState Responder::state() const
}
#endif
-bool domainIsLocal(const QString& domain)
+bool domainIsLocal(const TQString& domain)
{
return domain.section('.',-1,-1).lower()=="local";
}
-QCString domainToDNS(const QString &domain)
+TQCString domainToDNS(const TQString &domain)
{
if (domainIsLocal(domain)) return domain.utf8();
else return KIDNA::toAsciiCString(domain);
}
-QString DNSToDomain(const char* domain)
+TQString DNSToDomain(const char* domain)
{
- if (domainIsLocal(domain)) return QString::fromUtf8(domain);
+ if (domainIsLocal(domain)) return TQString::fromUtf8(domain);
else return KIDNA::toUnicode(domain);
}
diff --git a/dnssd/responder.h b/dnssd/responder.h
index 50c870aae..ae909b59b 100644
--- a/dnssd/responder.h
+++ b/dnssd/responder.h
@@ -21,9 +21,9 @@
#ifndef DNSSDRESPONDER_H
#define DNSSDRESPONDER_H
-#include <qobject.h>
-#include <qsocketnotifier.h>
-#include <qsignal.h>
+#include <tqobject.h>
+#include <tqsocketnotifier.h>
+#include <tqsignal.h>
#include <config.h>
#ifdef HAVE_DNSSD
#include <avahi-client/client.h>
@@ -71,10 +71,10 @@ private:
/* Utils functions */
-bool domainIsLocal(const QString& domain);
+bool domainIsLocal(const TQString& domain);
// Encodes domain name using utf8() or IDN
-QCString domainToDNS(const QString &domain);
-QString DNSToDomain(const char* domain);
+TQCString domainToDNS(const TQString &domain);
+TQString DNSToDomain(const char* domain);
}
diff --git a/dnssd/sdevent.h b/dnssd/sdevent.h
index 8530e730f..90f4a64d5 100644
--- a/dnssd/sdevent.h
+++ b/dnssd/sdevent.h
@@ -21,9 +21,9 @@
#ifndef DNSSDSDEVENT_H
#define DNSSDSDEVENT_H
-#include <qevent.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqevent.h>
+#include <tqstring.h>
+#include <tqmap.h>
namespace DNSSD
{
@@ -33,28 +33,28 @@ enum Operation { SD_ERROR = 101,SD_ADDREMOVE, SD_PUBLISH, SD_RESOLVE};
class ErrorEvent : public QCustomEvent
{
public:
- ErrorEvent() : QCustomEvent(QEvent::User+SD_ERROR)
+ ErrorEvent() : TQCustomEvent(TQEvent::User+SD_ERROR)
{}
};
class AddRemoveEvent : public QCustomEvent
{
public:
enum Operation { Add, Remove };
- AddRemoveEvent(Operation op,const QString& name,const QString& type,
- const QString& domain) : QCustomEvent(QEvent::User+SD_ADDREMOVE),
+ AddRemoveEvent(Operation op,const TQString& name,const TQString& type,
+ const TQString& domain) : TQCustomEvent(TQEvent::User+SD_ADDREMOVE),
m_op(op), m_name(name), m_type(type), m_domain(domain)
{}
const Operation m_op;
- const QString m_name;
- const QString m_type;
- const QString m_domain;
+ const TQString m_name;
+ const TQString m_type;
+ const TQString m_domain;
};
class PublishEvent : public QCustomEvent
{
public:
- PublishEvent(bool ok) : QCustomEvent(QEvent::User+SD_PUBLISH), m_ok(ok)
+ PublishEvent(bool ok) : TQCustomEvent(TQEvent::User+SD_PUBLISH), m_ok(ok)
{}
bool m_ok;
@@ -63,15 +63,15 @@ public:
class ResolveEvent : public QCustomEvent
{
public:
- ResolveEvent(const QString& hostname, unsigned short port,
- const QMap<QString,QString>& txtdata)
- : QCustomEvent(QEvent::User+SD_RESOLVE), m_hostname(hostname),
+ ResolveEvent(const TQString& hostname, unsigned short port,
+ const TQMap<TQString,TQString>& txtdata)
+ : TQCustomEvent(TQEvent::User+SD_RESOLVE), m_hostname(hostname),
m_port(port), m_txtdata(txtdata)
{}
- const QString m_hostname;
+ const TQString m_hostname;
const unsigned short m_port;
- const QMap<QString,QString> m_txtdata;
+ const TQMap<TQString,TQString> m_txtdata;
};
diff --git a/dnssd/servicebase.cpp b/dnssd/servicebase.cpp
index 7fd1ef802..52d18cca3 100644
--- a/dnssd/servicebase.cpp
+++ b/dnssd/servicebase.cpp
@@ -19,39 +19,39 @@
*/
#include "servicebase.h"
-#include <qregexp.h>
+#include <tqregexp.h>
namespace DNSSD
{
-ServiceBase::ServiceBase(const QString& name, const QString& type, const QString& domain,
- const QString& host, unsigned short port) :
+ServiceBase::ServiceBase(const TQString& name, const TQString& type, const TQString& domain,
+ const TQString& host, unsigned short port) :
m_serviceName(name), m_type(type), m_domain(domain), m_hostName(host), m_port(port)
{}
ServiceBase::~ServiceBase()
{}
-QString ServiceBase::encode()
+TQString ServiceBase::encode()
{
- return m_serviceName.replace(".","\\.").replace("\\","\\\\") + QString(".") + m_type +
- QString(".") + m_domain;
+ return m_serviceName.replace(".","\\.").replace("\\","\\\\") + TQString(".") + m_type +
+ TQString(".") + m_domain;
}
// example: 3rd\.\032Floor\032Copy\032Room._ipp._tcp.dns-sd.org. - normal service
// 3rd\.\032Floor\032Copy\032Room.dns-sd.org - domain
// _ipp._tcp.dns-sd.org - metaquery
-void ServiceBase::decode(const QString& name)
+void ServiceBase::decode(const TQString& name)
{
- QString rest;
+ TQString rest;
if (name[0]=='_') { // metaquery
m_serviceName="";
rest=name;
} else { // normal service or domain
- QString decoded_name=name;
+ TQString decoded_name=name;
decoded_name=decoded_name.replace("\\\\","\\");
- int i = decoded_name.find(QRegExp("[^\\\\]\\."));
+ int i = decoded_name.find(TQRegExp("[^\\\\]\\."));
if (i==-1) return; // first find service name
rest = decoded_name.mid(i+2);
m_serviceName=decoded_name.left(i+1).replace("\\.",".");
@@ -59,29 +59,29 @@ void ServiceBase::decode(const QString& name)
m_type = rest.section('.',0,1);
// does it really have a type?
if (m_type[0]=='_' && m_type[m_type.find('.')+1]=='_')
- m_domain = rest.section('.',2,-1,QString::SectionIncludeTrailingSep);
+ m_domain = rest.section('.',2,-1,TQString::SectionIncludeTrailingSep);
else {
m_type="";
m_domain=rest;
}
}
-const QString& ServiceBase::serviceName() const
+const TQString& ServiceBase::serviceName() const
{
return m_serviceName;
}
-const QString& ServiceBase::type() const
+const TQString& ServiceBase::type() const
{
return m_type;
}
-const QString& ServiceBase::domain() const
+const TQString& ServiceBase::domain() const
{
return m_domain;
}
-const QString& ServiceBase::hostName() const
+const TQString& ServiceBase::hostName() const
{
return m_hostName;
}
@@ -90,7 +90,7 @@ unsigned short ServiceBase::port() const
{
return m_port;
}
-const QMap<QString,QString>& ServiceBase::textData() const
+const TQMap<TQString,TQString>& ServiceBase::textData() const
{
return m_textData;
}
@@ -98,13 +98,13 @@ const QMap<QString,QString>& ServiceBase::textData() const
void ServiceBase::virtual_hook(int, void*)
{}
-QDataStream & operator<< (QDataStream & s, const ServiceBase & a)
+TQDataStream & operator<< (TQDataStream & s, const ServiceBase & a)
{
s << a.m_serviceName << a.m_type << a.m_domain << a.m_hostName << Q_INT16(a.m_port) << a.m_textData;
return s;
}
-QDataStream & operator>> (QDataStream & s, ServiceBase & a)
+TQDataStream & operator>> (TQDataStream & s, ServiceBase & a)
{
Q_INT16 port;
s >> a.m_serviceName >> a.m_type >> a.m_domain >> a.m_hostName >> port >> a.m_textData;
diff --git a/dnssd/servicebase.h b/dnssd/servicebase.h
index 28ec7f565..793532371 100644
--- a/dnssd/servicebase.h
+++ b/dnssd/servicebase.h
@@ -21,7 +21,7 @@
#ifndef DNSSDSERVICEBASE_H
#define DNSSDSERVICEBASE_H
-#include <qmap.h>
+#include <tqmap.h>
#include <ksharedptr.h>
class QString;
@@ -49,8 +49,8 @@ public:
@param host Host name
@param port Port number
*/
- ServiceBase(const QString& name=QString::null,const QString& type=QString::null,
- const QString& domain=QString::null, const QString& host=QString::null,
+ ServiceBase(const TQString& name=TQString::null,const TQString& type=TQString::null,
+ const TQString& domain=TQString::null, const TQString& host=TQString::null,
unsigned short port=0);
virtual ~ServiceBase();
@@ -58,23 +58,23 @@ public:
/**
Returns name of service. This is empty for metaservices
*/
- const QString& serviceName() const;
+ const TQString& serviceName() const;
/**
Returns type of service. It always in format _sometype._udp or _sometype._tcp and
it is empty for domains.
*/
- const QString& type() const;
+ const TQString& type() const;
/**
Returns domain that given service belongs to. It is "local." for link-local services.
*/
- const QString& domain() const;
+ const TQString& domain() const;
/**
Returns hostname. It is only valid for local and resolved remote services.
*/
- const QString& hostName() const;
+ const TQString& hostName() const;
/**
Returns port number. It is only valid for local and resolved remote services.
@@ -84,31 +84,31 @@ public:
/**
Returns read only map of text properties. It is only valid for local and resolved remote services.
*/
- const QMap<QString,QString>& textData() const;
+ const TQMap<TQString,TQString>& textData() const;
protected:
- QString m_serviceName;
- QString m_type;
- QString m_domain;
- QString m_hostName;
+ TQString m_serviceName;
+ TQString m_type;
+ TQString m_domain;
+ TQString m_hostName;
unsigned short m_port;
/**
Map of TXT properties
*/
- QMap<QString,QString> m_textData;
+ TQMap<TQString,TQString> m_textData;
/**
Encode service name, type and domain into string that can be used as DNS-SD PTR label
*/
- QString encode();
+ TQString encode();
/**
Decode PTR label returned by DNS resolver into service name, type and domain. It also
handles special cases - metaservices and domains.
*/
- void decode(const QString& name);
+ void decode(const TQString& name);
- friend KDNSSD_EXPORT QDataStream & operator<< (QDataStream & s, const ServiceBase & a);
- friend KDNSSD_EXPORT QDataStream & operator>> (QDataStream & s, ServiceBase & a);
+ friend KDNSSD_EXPORT TQDataStream & operator<< (TQDataStream & s, const ServiceBase & a);
+ friend KDNSSD_EXPORT TQDataStream & operator>> (TQDataStream & s, ServiceBase & a);
virtual void virtual_hook(int, void*);
private:
diff --git a/dnssd/servicebrowser.cpp b/dnssd/servicebrowser.cpp
index 20e1b11e0..3c64ffe66 100644
--- a/dnssd/servicebrowser.cpp
+++ b/dnssd/servicebrowser.cpp
@@ -20,8 +20,8 @@
#include <signal.h>
#include <errno.h>
-#include <qstringlist.h>
-#include <qfile.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
#include "domainbrowser.h"
#include "responder.h"
#include "query.h"
@@ -34,50 +34,50 @@
namespace DNSSD
{
-const QString ServiceBrowser::AllServices = "_services._dns-sd._udp";
+const TQString ServiceBrowser::AllServices = "_services._dns-sd._udp";
class ServiceBrowserPrivate
{
public:
ServiceBrowserPrivate() : m_running(false)
{}
- QValueList<RemoteService::Ptr> m_services;
- QValueList<RemoteService::Ptr> m_duringResolve;
- QStringList m_types;
+ TQValueList<RemoteService::Ptr> m_services;
+ TQValueList<RemoteService::Ptr> m_duringResolve;
+ TQStringList m_types;
DomainBrowser* m_domains;
int m_flags;
bool m_running;
bool m_finished;
- QDict<Query> resolvers;
+ TQDict<Query> resolvers;
};
-ServiceBrowser::ServiceBrowser(const QString& type,DomainBrowser* domains,bool autoResolve)
+ServiceBrowser::ServiceBrowser(const TQString& type,DomainBrowser* domains,bool autoResolve)
{
if (domains) init(type,domains,autoResolve ? AutoResolve : 0);
else init(type,new DomainBrowser(this),autoResolve ? AutoResolve|AutoDelete : AutoDelete);
}
-ServiceBrowser::ServiceBrowser(const QStringList& types,DomainBrowser* domains,int flags)
+ServiceBrowser::ServiceBrowser(const TQStringList& types,DomainBrowser* domains,int flags)
{
if (domains) init(types,domains,flags);
else init(types,new DomainBrowser(this),flags|AutoDelete);
}
-void ServiceBrowser::init(const QStringList& type,DomainBrowser* domains,int flags)
+void ServiceBrowser::init(const TQStringList& type,DomainBrowser* domains,int flags)
{
d = new ServiceBrowserPrivate();
d->resolvers.setAutoDelete(true);
d->m_types=type;
d->m_flags=flags;
d->m_domains = domains;
- connect(d->m_domains,SIGNAL(domainAdded(const QString& )),this,SLOT(addDomain(const QString& )));
- connect(d->m_domains,SIGNAL(domainRemoved(const QString& )),this,
- SLOT(removeDomain(const QString& )));
+ connect(d->m_domains,TQT_SIGNAL(domainAdded(const TQString& )),this,TQT_SLOT(addDomain(const TQString& )));
+ connect(d->m_domains,TQT_SIGNAL(domainRemoved(const TQString& )),this,
+ TQT_SLOT(removeDomain(const TQString& )));
}
-ServiceBrowser::ServiceBrowser(const QString& type,const QString& domain,bool autoResolve)
+ServiceBrowser::ServiceBrowser(const TQString& type,const TQString& domain,bool autoResolve)
{
init(type,new DomainBrowser(domain,false,this),autoResolve ? AutoResolve|AutoDelete : AutoDelete);
}
-ServiceBrowser::ServiceBrowser(const QString& type,const QString& domain,int flags)
+ServiceBrowser::ServiceBrowser(const TQString& type,const TQString& domain,int flags)
{
init(type,new DomainBrowser(domain,false,this),flags | AutoDelete);
}
@@ -108,11 +108,11 @@ const DomainBrowser* ServiceBrowser::browsedDomains() const
void ServiceBrowser::serviceResolved(bool success)
{
- QObject* sender_obj = const_cast<QObject*>(sender());
+ TQObject* sender_obj = const_cast<TQObject*>(sender());
RemoteService* svr = static_cast<RemoteService*>(sender_obj);
- disconnect(svr,SIGNAL(resolved(bool)),this,SLOT(serviceResolved(bool)));
- QValueList<RemoteService::Ptr>::Iterator it = d->m_duringResolve.begin();
- QValueList<RemoteService::Ptr>::Iterator itEnd = d->m_duringResolve.end();
+ disconnect(svr,TQT_SIGNAL(resolved(bool)),this,TQT_SLOT(serviceResolved(bool)));
+ TQValueList<RemoteService::Ptr>::Iterator it = d->m_duringResolve.begin();
+ TQValueList<RemoteService::Ptr>::Iterator itEnd = d->m_duringResolve.end();
while ( it!= itEnd && svr!= (*it)) ++it;
if (it != itEnd) {
if (success) {
@@ -130,8 +130,8 @@ void ServiceBrowser::startBrowse()
d->m_running=true;
if (isAvailable()!=Working) return;
if (d->m_domains->isRunning()) {
- QStringList::const_iterator itEnd = d->m_domains->domains().end();
- for ( QStringList::const_iterator it = d->m_domains->domains().begin(); it != itEnd; ++it )
+ TQStringList::const_iterator itEnd = d->m_domains->domains().end();
+ for ( TQStringList::const_iterator it = d->m_domains->domains().begin(); it != itEnd; ++it )
addDomain(*it);
} else d->m_domains->startBrowse();
}
@@ -140,7 +140,7 @@ void ServiceBrowser::gotNewService(RemoteService::Ptr svr)
{
if (findDuplicate(svr)==(d->m_services.end())) {
if (d->m_flags & AutoResolve) {
- connect(svr,SIGNAL(resolved(bool )),this,SLOT(serviceResolved(bool )));
+ connect(svr,TQT_SIGNAL(resolved(bool )),this,TQT_SLOT(serviceResolved(bool )));
d->m_duringResolve+=svr;
svr->resolveAsync();
} else {
@@ -152,7 +152,7 @@ void ServiceBrowser::gotNewService(RemoteService::Ptr svr)
void ServiceBrowser::gotRemoveService(RemoteService::Ptr svr)
{
- QValueList<RemoteService::Ptr>::Iterator it = findDuplicate(svr);
+ TQValueList<RemoteService::Ptr>::Iterator it = findDuplicate(svr);
if (it!=(d->m_services.end())) {
emit serviceRemoved(*it);
d->m_services.remove(it);
@@ -160,10 +160,10 @@ void ServiceBrowser::gotRemoveService(RemoteService::Ptr svr)
}
-void ServiceBrowser::removeDomain(const QString& domain)
+void ServiceBrowser::removeDomain(const TQString& domain)
{
while (d->resolvers[domain]) d->resolvers.remove(domain);
- QValueList<RemoteService::Ptr>::Iterator it = d->m_services.begin();
+ TQValueList<RemoteService::Ptr>::Iterator it = d->m_services.begin();
while (it!=d->m_services.end())
// use section to skip possible trailing dot
if ((*it)->domain().section('.',0) == domain.section('.',0)) {
@@ -172,18 +172,18 @@ void ServiceBrowser::removeDomain(const QString& domain)
} else ++it;
}
-void ServiceBrowser::addDomain(const QString& domain)
+void ServiceBrowser::addDomain(const TQString& domain)
{
if (!d->m_running) return;
if (!(d->resolvers[domain])) {
- QStringList::ConstIterator itEnd = d->m_types.end();
- for (QStringList::ConstIterator it=d->m_types.begin(); it!=itEnd; ++it) {
+ TQStringList::ConstIterator itEnd = d->m_types.end();
+ for (TQStringList::ConstIterator it=d->m_types.begin(); it!=itEnd; ++it) {
Query* b = new Query((*it),domain);
- connect(b,SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)),this,
- SLOT(gotNewService(DNSSD::RemoteService::Ptr)));
- connect(b,SIGNAL(serviceRemoved(DNSSD::RemoteService::Ptr )),this,
- SLOT(gotRemoveService(DNSSD::RemoteService::Ptr)));
- connect(b,SIGNAL(finished()),this,SLOT(queryFinished()));
+ connect(b,TQT_SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)),this,
+ TQT_SLOT(gotNewService(DNSSD::RemoteService::Ptr)));
+ connect(b,TQT_SIGNAL(serviceRemoved(DNSSD::RemoteService::Ptr )),this,
+ TQT_SLOT(gotRemoveService(DNSSD::RemoteService::Ptr)));
+ connect(b,TQT_SIGNAL(finished()),this,TQT_SLOT(queryFinished()));
b->startQuery();
d->resolvers.insert(domain,b);
}
@@ -199,12 +199,12 @@ bool ServiceBrowser::allFinished()
{
if (d->m_duringResolve.count()) return false;
bool all = true;
- QDictIterator<Query> it(d->resolvers);
+ TQDictIterator<Query> it(d->resolvers);
for ( ; it.current(); ++it) all&=(*it)->isFinished();
return all;
}
-const QValueList<RemoteService::Ptr>& ServiceBrowser::services() const
+const TQValueList<RemoteService::Ptr>& ServiceBrowser::services() const
{
return d->m_services;
}
@@ -212,10 +212,10 @@ const QValueList<RemoteService::Ptr>& ServiceBrowser::services() const
void ServiceBrowser::virtual_hook(int, void*)
{}
-QValueList<RemoteService::Ptr>::Iterator ServiceBrowser::findDuplicate(RemoteService::Ptr src)
+TQValueList<RemoteService::Ptr>::Iterator ServiceBrowser::findDuplicate(RemoteService::Ptr src)
{
- QValueList<RemoteService::Ptr>::Iterator itEnd = d->m_services.end();
- for (QValueList<RemoteService::Ptr>::Iterator it = d->m_services.begin(); it!=itEnd; ++it)
+ TQValueList<RemoteService::Ptr>::Iterator itEnd = d->m_services.end();
+ for (TQValueList<RemoteService::Ptr>::Iterator it = d->m_services.begin(); it!=itEnd; ++it)
if ((src->type()==(*it)->type()) && (src->serviceName()==(*it)->serviceName()) &&
(src->domain() == (*it)->domain())) return it;
return itEnd;
diff --git a/dnssd/servicebrowser.h b/dnssd/servicebrowser.h
index 5a12f4e6b..808127d0b 100644
--- a/dnssd/servicebrowser.h
+++ b/dnssd/servicebrowser.h
@@ -21,8 +21,8 @@
#ifndef DNSSDSERVICEBROWSER_H
#define DNSSDSERVICEBROWSER_H
-#include <qobject.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqdict.h>
#include <dnssd/remoteservice.h>
@@ -38,8 +38,8 @@ Suppose that you need list of web servers running. Example:
\code
DNSSD::ServiceBrowser* browser = new DNSSD::ServiceBrowser("_http._tcp");
-connect(browser,SIGNAL(serviceAdded(RemoteService::Ptr)),this,SLOT(addService(RemoteService::Ptr)));
-connect(browser,SIGNAL(serviceRemoved(RemoteService::Ptr)),this,SLOT(delService(RemoteService::Ptr)));
+connect(browser,TQT_SIGNAL(serviceAdded(RemoteService::Ptr)),this,TQT_SLOT(addService(RemoteService::Ptr)));
+connect(browser,TQT_SIGNAL(serviceRemoved(RemoteService::Ptr)),this,TQT_SLOT(delService(RemoteService::Ptr)));
browser->startBrowse();
\endcode
@@ -88,7 +88,7 @@ public:
@since 3.5
@todo KDE4: set default values for domains and flags
*/
- ServiceBrowser(const QStringList& types,DomainBrowser* domains,int flags);
+ ServiceBrowser(const TQStringList& types,DomainBrowser* domains,int flags);
/**
The same as above, but allows only one service type
@@ -97,7 +97,7 @@ public:
@param autoResolve auto resolve, if set
@deprecated use previous constructor instead
*/
- ServiceBrowser(const QString& type,DomainBrowser* domains=0,bool autoResolve=false);
+ ServiceBrowser(const TQString& type,DomainBrowser* domains=0,bool autoResolve=false);
/**
Overloaded constructor used to create browser for one domain
@@ -108,19 +108,19 @@ public:
@param flags One or more values from #Flags. AutoDelete flag has no effect
@since 3.5
*/
- ServiceBrowser(const QString& type,const QString& domain, int flags);
+ ServiceBrowser(const TQString& type,const TQString& domain, int flags);
/**
@deprecated user previous constructor instead
*/
- ServiceBrowser(const QString& type,const QString& domain, bool autoResolve=false);
+ ServiceBrowser(const TQString& type,const TQString& domain, bool autoResolve=false);
~ServiceBrowser();
/**
Returns list of services
*/
- const QValueList<RemoteService::Ptr>& services() const;
+ const TQValueList<RemoteService::Ptr>& services() const;
/**
Starts browsing for services.
@@ -139,7 +139,7 @@ public:
Special service type to search for all available service types. Pass it as "type"
parameter to ServiceBrowser constructor.
*/
- static const QString AllServices;
+ static const TQString AllServices;
/**
Checks availability of DNS-SD services (this also covers publishing).
@@ -199,12 +199,12 @@ public slots:
/**
Remove one domain from list of domains to browse
*/
- void removeDomain(const QString& domain);
+ void removeDomain(const TQString& domain);
/**
Add new domain to browse
*/
- void addDomain(const QString& domain);
+ void addDomain(const TQString& domain);
protected:
virtual void virtual_hook(int, void*);
@@ -212,8 +212,8 @@ private:
ServiceBrowserPrivate *d;
bool allFinished();
- void init(const QStringList&, DomainBrowser*, int);
- QValueList<RemoteService::Ptr>::Iterator findDuplicate(RemoteService::Ptr src);
+ void init(const TQStringList&, DomainBrowser*, int);
+ TQValueList<RemoteService::Ptr>::Iterator findDuplicate(RemoteService::Ptr src);
private slots:
void serviceResolved(bool success);
void gotNewService(DNSSD::RemoteService::Ptr);