summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-27 20:04:14 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-27 20:24:25 (GMT)
commit6ff7ff9f1f028ce21b58e19367b4710ba155d6bd (patch)
tree3a1455d0d7966414b28ed06d5e33d5f3cdf9b200 /Swiften/LinkLocal
parent78f702aba1b1a0978c152536053233e6f9aedb91 (diff)
downloadswift-6ff7ff9f1f028ce21b58e19367b4710ba155d6bd.zip
swift-6ff7ff9f1f028ce21b58e19367b4710ba155d6bd.tar.bz2
Fixed Linux compilation.
Diffstat (limited to 'Swiften/LinkLocal')
-rw-r--r--Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h2
-rw-r--r--Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.cpp10
-rw-r--r--Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.h4
-rw-r--r--Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.cpp2
-rw-r--r--Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.h4
-rw-r--r--Swiften/LinkLocal/DNSSD/Avahi/AvahiRegisterQuery.h2
-rw-r--r--Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.h2
-rw-r--r--Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveServiceQuery.h2
8 files changed, 16 insertions, 12 deletions
diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h b/Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h
index 3bee907..163a5f6 100644
--- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h
+++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h
@@ -17,7 +17,7 @@ namespace Swift {
class AvahiBrowseQuery : public DNSSDBrowseQuery, public AvahiQuery {
public:
- AvahiBrowseQuery(boost::shared_ptr<AvahiQuerier> q) : AvahiQuery(q), browser(NULL) {
+ AvahiBrowseQuery(boost::shared_ptr<AvahiQuerier> q, EventLoop* eventLoop) : AvahiQuery(q, eventLoop), browser(NULL) {
}
void startBrowsing() {
diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.cpp b/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.cpp
index 642d19a..f9f2f8f 100644
--- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.cpp
+++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.cpp
@@ -15,26 +15,26 @@
namespace Swift {
-AvahiQuerier::AvahiQuerier() : client(NULL), threadedPoll(NULL) {
+AvahiQuerier::AvahiQuerier(EventLoop* eventLoop) : eventLoop(eventLoop), client(NULL), threadedPoll(NULL) {
}
AvahiQuerier::~AvahiQuerier() {
}
boost::shared_ptr<DNSSDBrowseQuery> AvahiQuerier::createBrowseQuery() {
- return boost::shared_ptr<DNSSDBrowseQuery>(new AvahiBrowseQuery(shared_from_this()));
+ return boost::shared_ptr<DNSSDBrowseQuery>(new AvahiBrowseQuery(shared_from_this(), eventLoop));
}
boost::shared_ptr<DNSSDRegisterQuery> AvahiQuerier::createRegisterQuery(const String& name, int port, const ByteArray& info) {
- return boost::shared_ptr<DNSSDRegisterQuery>(new AvahiRegisterQuery(name, port, info, shared_from_this()));
+ return boost::shared_ptr<DNSSDRegisterQuery>(new AvahiRegisterQuery(name, port, info, shared_from_this(), eventLoop));
}
boost::shared_ptr<DNSSDResolveServiceQuery> AvahiQuerier::createResolveServiceQuery(const DNSSDServiceID& service) {
- return boost::shared_ptr<DNSSDResolveServiceQuery>(new AvahiResolveServiceQuery(service, shared_from_this()));
+ return boost::shared_ptr<DNSSDResolveServiceQuery>(new AvahiResolveServiceQuery(service, shared_from_this(), eventLoop));
}
boost::shared_ptr<DNSSDResolveHostnameQuery> AvahiQuerier::createResolveHostnameQuery(const String& hostname, int interfaceIndex) {
- return boost::shared_ptr<DNSSDResolveHostnameQuery>(new AvahiResolveHostnameQuery(hostname, interfaceIndex, shared_from_this()));
+ return boost::shared_ptr<DNSSDResolveHostnameQuery>(new AvahiResolveHostnameQuery(hostname, interfaceIndex, shared_from_this(), eventLoop));
}
void AvahiQuerier::start() {
diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.h b/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.h
index e526d83..d900ade 100644
--- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.h
+++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.h
@@ -19,12 +19,13 @@
namespace Swift {
class ByteArray;
+ class EventLoop;
class AvahiQuerier :
public DNSSDQuerier,
public boost::enable_shared_from_this<AvahiQuerier> {
public:
- AvahiQuerier();
+ AvahiQuerier(EventLoop* eventLoop);
~AvahiQuerier();
boost::shared_ptr<DNSSDBrowseQuery> createBrowseQuery();
@@ -47,6 +48,7 @@ namespace Swift {
}
private:
+ EventLoop* eventLoop;
AvahiClient* client;
AvahiThreadedPoll* threadedPoll;
};
diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.cpp b/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.cpp
index 662a35d..1b40dfd 100644
--- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.cpp
+++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.cpp
@@ -9,7 +9,7 @@
namespace Swift {
-AvahiQuery::AvahiQuery(boost::shared_ptr<AvahiQuerier> q) : querier(q) {
+AvahiQuery::AvahiQuery(boost::shared_ptr<AvahiQuerier> q, EventLoop* eventLoop) : querier(q), eventLoop(eventLoop) {
}
AvahiQuery::~AvahiQuery() {
diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.h b/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.h
index ea3717e..f5df032 100644
--- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.h
+++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.h
@@ -13,16 +13,18 @@
namespace Swift {
class AvahiQuerier;
+ class EventLoop;
class AvahiQuery :
public EventOwner,
public boost::enable_shared_from_this<AvahiQuery> {
public:
- AvahiQuery(boost::shared_ptr<AvahiQuerier>);
+ AvahiQuery(boost::shared_ptr<AvahiQuerier>, EventLoop* eventLoop);
virtual ~AvahiQuery();
protected:
boost::shared_ptr<AvahiQuerier> querier;
+ EventLoop* eventLoop;
};
}
diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiRegisterQuery.h b/Swiften/LinkLocal/DNSSD/Avahi/AvahiRegisterQuery.h
index 3e5a758..780a0ca 100644
--- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiRegisterQuery.h
+++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiRegisterQuery.h
@@ -18,7 +18,7 @@ namespace Swift {
class AvahiRegisterQuery : public DNSSDRegisterQuery, public AvahiQuery {
public:
- AvahiRegisterQuery(const String& name, int port, const ByteArray& txtRecord, boost::shared_ptr<AvahiQuerier> querier) : AvahiQuery(querier), name(name), port(port), txtRecord(txtRecord), group(0) {
+ AvahiRegisterQuery(const String& name, int port, const ByteArray& txtRecord, boost::shared_ptr<AvahiQuerier> querier, EventLoop* eventLoop) : AvahiQuery(querier, eventLoop), name(name), port(port), txtRecord(txtRecord), group(0) {
}
void registerService() {
diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.h b/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.h
index 6803fd0..ebbc68f 100644
--- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.h
+++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.h
@@ -19,7 +19,7 @@ namespace Swift {
class AvahiResolveHostnameQuery : public DNSSDResolveHostnameQuery, public AvahiQuery {
public:
- AvahiResolveHostnameQuery(const String& hostname, int, boost::shared_ptr<AvahiQuerier> querier) : AvahiQuery(querier), hostname(hostname) {
+ AvahiResolveHostnameQuery(const String& hostname, int, boost::shared_ptr<AvahiQuerier> querier, EventLoop* eventLoop) : AvahiQuery(querier, eventLoop), hostname(hostname) {
std::cout << "Resolving hostname " << hostname << std::endl;
}
diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveServiceQuery.h b/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveServiceQuery.h
index 402f84f..a7985ec 100644
--- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveServiceQuery.h
+++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveServiceQuery.h
@@ -17,7 +17,7 @@ namespace Swift {
class AvahiResolveServiceQuery : public DNSSDResolveServiceQuery, public AvahiQuery {
public:
- AvahiResolveServiceQuery(const DNSSDServiceID& service, boost::shared_ptr<AvahiQuerier> querier) : AvahiQuery(querier), service(service), resolver(NULL) {
+ AvahiResolveServiceQuery(const DNSSDServiceID& service, boost::shared_ptr<AvahiQuerier> querier, EventLoop* eventLoop) : AvahiQuery(querier, eventLoop), service(service), resolver(NULL) {
}
void start() {