diff options
Diffstat (limited to 'Swiften/Network')
-rw-r--r-- | Swiften/Network/BOSHConnection.cpp | 2 | ||||
-rw-r--r-- | Swiften/Network/PlatformDomainNameAddressQuery.cpp | 6 | ||||
-rw-r--r-- | Swiften/Network/PlatformDomainNameAddressQuery.h | 8 | ||||
-rw-r--r-- | Swiften/Network/PlatformDomainNameResolver.h | 11 | ||||
-rw-r--r-- | Swiften/Network/PlatformDomainNameServiceQuery.cpp | 6 | ||||
-rw-r--r-- | Swiften/Network/PlatformDomainNameServiceQuery.h | 8 |
6 files changed, 27 insertions, 14 deletions
diff --git a/Swiften/Network/BOSHConnection.cpp b/Swiften/Network/BOSHConnection.cpp index 9a836cb..b04609f 100644 --- a/Swiften/Network/BOSHConnection.cpp +++ b/Swiften/Network/BOSHConnection.cpp @@ -88,13 +88,13 @@ void BOSHConnection::handleTLSNetowrkDataWriteRequest(const SafeByteArray& data) void BOSHConnection::handleRawDataRead(boost::shared_ptr<SafeByteArray> data) { SWIFT_LOG(debug) << std::endl; tlsLayer_->handleDataRead(*data.get()); } -void BOSHConnection::handleTLSError(boost::shared_ptr<TLSError> error) { +void BOSHConnection::handleTLSError(boost::shared_ptr<TLSError> /* error */) { } void BOSHConnection::writeData(const SafeByteArray& data) { if (tlsLayer_) { tlsLayer_->writeData(data); diff --git a/Swiften/Network/PlatformDomainNameAddressQuery.cpp b/Swiften/Network/PlatformDomainNameAddressQuery.cpp index 99e5eda..8b72c3b 100644 --- a/Swiften/Network/PlatformDomainNameAddressQuery.cpp +++ b/Swiften/Network/PlatformDomainNameAddressQuery.cpp @@ -5,24 +5,28 @@ */ #include <Swiften/Network/PlatformDomainNameAddressQuery.h> #include <boost/asio/ip/tcp.hpp> -#include <Swiften/Network/PlatformDomainNameResolver.h> #include <Swiften/EventLoop/EventLoop.h> +#include <Swiften/Network/PlatformDomainNameResolver.h> namespace Swift { PlatformDomainNameAddressQuery::PlatformDomainNameAddressQuery(const boost::optional<std::string>& host, EventLoop* eventLoop, PlatformDomainNameResolver* resolver) : PlatformDomainNameQuery(resolver), hostnameValid(false), eventLoop(eventLoop) { if (!!host) { hostname = *host; hostnameValid = true; } } +PlatformDomainNameAddressQuery::~PlatformDomainNameAddressQuery() { + +} + void PlatformDomainNameAddressQuery::run() { getResolver()->addQueryToQueue(shared_from_this()); } void PlatformDomainNameAddressQuery::runBlocking() { if (!hostnameValid) { diff --git a/Swiften/Network/PlatformDomainNameAddressQuery.h b/Swiften/Network/PlatformDomainNameAddressQuery.h index 306612c..c241f2a 100644 --- a/Swiften/Network/PlatformDomainNameAddressQuery.h +++ b/Swiften/Network/PlatformDomainNameAddressQuery.h @@ -1,29 +1,31 @@ /* - * Copyright (c) 2010 Isode Limited. + * Copyright (c) 2010-2015 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once +#include <string> + #include <boost/asio/io_service.hpp> #include <boost/enable_shared_from_this.hpp> +#include <Swiften/EventLoop/EventOwner.h> #include <Swiften/Network/DomainNameAddressQuery.h> #include <Swiften/Network/PlatformDomainNameQuery.h> -#include <Swiften/EventLoop/EventOwner.h> -#include <string> namespace Swift { class PlatformDomainNameResolver; class EventLoop; class PlatformDomainNameAddressQuery : public DomainNameAddressQuery, public PlatformDomainNameQuery, public boost::enable_shared_from_this<PlatformDomainNameAddressQuery>, public EventOwner { public: PlatformDomainNameAddressQuery(const boost::optional<std::string>& host, EventLoop* eventLoop, PlatformDomainNameResolver*); + virtual ~PlatformDomainNameAddressQuery(); void run(); private: void runBlocking(); void emitError(); diff --git a/Swiften/Network/PlatformDomainNameResolver.h b/Swiften/Network/PlatformDomainNameResolver.h index e2d28a9..ae94179 100644 --- a/Swiften/Network/PlatformDomainNameResolver.h +++ b/Swiften/Network/PlatformDomainNameResolver.h @@ -4,31 +4,32 @@ * See the COPYING file for more information. */ #pragma once #include <deque> -#include <boost/thread/thread.hpp> -#include <boost/thread/mutex.hpp> + #include <boost/thread/condition_variable.hpp> +#include <boost/thread/mutex.hpp> +#include <boost/thread/thread.hpp> #include <Swiften/Base/API.h> #include <Swiften/Base/Atomic.h> +#include <Swiften/Network/DomainNameAddressQuery.h> #include <Swiften/Network/DomainNameResolver.h> -#include <Swiften/Network/PlatformDomainNameQuery.h> #include <Swiften/Network/DomainNameServiceQuery.h> -#include <Swiften/Network/DomainNameAddressQuery.h> +#include <Swiften/Network/PlatformDomainNameQuery.h> namespace Swift { class IDNConverter; class EventLoop; class SWIFTEN_API PlatformDomainNameResolver : public DomainNameResolver { public: PlatformDomainNameResolver(IDNConverter* idnConverter, EventLoop* eventLoop); - ~PlatformDomainNameResolver(); + virtual ~PlatformDomainNameResolver(); virtual DomainNameServiceQuery::ref createServiceQuery(const std::string& serviceLookupPrefix, const std::string& domain); virtual DomainNameAddressQuery::ref createAddressQuery(const std::string& name); private: void run(); diff --git a/Swiften/Network/PlatformDomainNameServiceQuery.cpp b/Swiften/Network/PlatformDomainNameServiceQuery.cpp index d68f4bf..673aaff 100644 --- a/Swiften/Network/PlatformDomainNameServiceQuery.cpp +++ b/Swiften/Network/PlatformDomainNameServiceQuery.cpp @@ -1,8 +1,8 @@ /* - * Copyright (c) 2010 Isode Limited. + * Copyright (c) 2010-2015 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include <boost/asio.hpp> @@ -42,12 +42,16 @@ PlatformDomainNameServiceQuery::PlatformDomainNameServiceQuery(const boost::opti if (!!serviceName) { service = *serviceName; serviceValid = true; } } +PlatformDomainNameServiceQuery::~PlatformDomainNameServiceQuery() { + +} + void PlatformDomainNameServiceQuery::run() { getResolver()->addQueryToQueue(shared_from_this()); } void PlatformDomainNameServiceQuery::runBlocking() { if (!serviceValid) { diff --git a/Swiften/Network/PlatformDomainNameServiceQuery.h b/Swiften/Network/PlatformDomainNameServiceQuery.h index 53d9f50..afc4a90 100644 --- a/Swiften/Network/PlatformDomainNameServiceQuery.h +++ b/Swiften/Network/PlatformDomainNameServiceQuery.h @@ -1,27 +1,29 @@ /* - * Copyright (c) 2010-2013 Isode Limited. + * Copyright (c) 2010-2015 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once +#include <string> + #include <boost/enable_shared_from_this.hpp> -#include <Swiften/Network/DomainNameServiceQuery.h> #include <Swiften/EventLoop/EventOwner.h> -#include <string> +#include <Swiften/Network/DomainNameServiceQuery.h> #include <Swiften/Network/PlatformDomainNameQuery.h> namespace Swift { class EventLoop; class PlatformDomainNameServiceQuery : public DomainNameServiceQuery, public PlatformDomainNameQuery, public boost::enable_shared_from_this<PlatformDomainNameServiceQuery>, public EventOwner { public: PlatformDomainNameServiceQuery(const boost::optional<std::string>& serviceName, EventLoop* eventLoop, PlatformDomainNameResolver* resolver); + virtual ~PlatformDomainNameServiceQuery(); virtual void run(); private: void runBlocking(); void emitError(); |