summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Network/UnboundDomainNameResolver.h')
-rw-r--r--[-rwxr-xr-x]Swiften/Network/UnboundDomainNameResolver.h64
1 files changed, 35 insertions, 29 deletions
diff --git a/Swiften/Network/UnboundDomainNameResolver.h b/Swiften/Network/UnboundDomainNameResolver.h
index 6b78cf3..a97e385 100755..100644
--- a/Swiften/Network/UnboundDomainNameResolver.h
+++ b/Swiften/Network/UnboundDomainNameResolver.h
@@ -4,50 +4,56 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#pragma once
-#include <Swiften/Network/DomainNameResolver.h>
-#include <Swiften/Network/Timer.h>
-#include <Swiften/EventLoop/EventOwner.h>
+#include <memory>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
#include <boost/asio.hpp>
+#include <Swiften/EventLoop/EventOwner.h>
+#include <Swiften/Network/DomainNameResolver.h>
+#include <Swiften/Network/Timer.h>
+
struct ub_ctx;
struct ub_result;
namespace Swift {
- class EventLoop;
- class IDNConverter;
- class TimerFactory;
+ class EventLoop;
+ class IDNConverter;
+ class TimerFactory;
- class UnboundDomainNameResolver;
- class UnboundQuery;
+ class UnboundDomainNameResolver;
+ class UnboundQuery;
- class UnboundDomainNameResolver : public DomainNameResolver, public EventOwner, public boost::enable_shared_from_this<UnboundDomainNameResolver> {
- public:
- UnboundDomainNameResolver(IDNConverter* idnConverter, boost::shared_ptr<boost::asio::io_service> ioService, EventLoop* eventLoop);
- virtual ~UnboundDomainNameResolver();
+ class UnboundDomainNameResolver : public DomainNameResolver, public EventOwner, public std::enable_shared_from_this<UnboundDomainNameResolver> {
+ public:
+ UnboundDomainNameResolver(IDNConverter* idnConverter, std::shared_ptr<boost::asio::io_service> ioService, EventLoop* eventLoop);
+ virtual ~UnboundDomainNameResolver();
- virtual boost::shared_ptr<DomainNameServiceQuery> createServiceQuery(const std::string& serviceLookupPrefix, const std::string& domain);
- virtual boost::shared_ptr<DomainNameAddressQuery> createAddressQuery(const std::string& name);
+ virtual std::shared_ptr<DomainNameServiceQuery> createServiceQuery(const std::string& serviceLookupPrefix, const std::string& domain);
+ virtual std::shared_ptr<DomainNameAddressQuery> createAddressQuery(const std::string& name);
- static void unbound_callback_wrapper(void* data, int err, ub_result* result);
+ static void unbound_callback_wrapper(void* data, int err, ub_result* result);
- private:
- void unbound_callback(boost::shared_ptr<UnboundQuery> query, int err, ub_result* result);
+ private:
+ void unbound_callback(std::shared_ptr<UnboundQuery> query, int err, ub_result* result);
- void handleUBSocketReadable(boost::system::error_code);
- void processData();
+ void handleUBSocketReadable(boost::system::error_code);
+ void processData();
- private:
- IDNConverter* idnConverter;
- boost::shared_ptr<EventOwner> eventOwner;
- boost::shared_ptr<boost::asio::io_service> ioService;
- boost::asio::posix::stream_descriptor ubDescriptior;
- EventLoop* eventLoop;
- ub_ctx* ubContext;
- };
+ private:
+ IDNConverter* idnConverter;
+ std::shared_ptr<EventOwner> eventOwner;
+ std::shared_ptr<boost::asio::io_service> ioService;
+ boost::asio::posix::stream_descriptor ubDescriptior;
+ EventLoop* eventLoop;
+ ub_ctx* ubContext;
+ };
}