summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-12-02 20:42:30 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-12-03 08:09:01 (GMT)
commit5608da36a3a319070494d5a70ff984e7c172186e (patch)
tree2c44df5a9f0ea0ab180763222e54aece5dc65c93 /Swiften/Network/PlatformDomainNameServiceQuery.h
parent6e50bd41dc3f11815a40dfef500dc0d61ea5d737 (diff)
downloadswift-contrib-5608da36a3a319070494d5a70ff984e7c172186e.zip
swift-contrib-5608da36a3a319070494d5a70ff984e7c172186e.tar.bz2
DNS querying is now asynchronous.
This means we can now move them to a separate thread.
Diffstat (limited to 'Swiften/Network/PlatformDomainNameServiceQuery.h')
-rw-r--r--Swiften/Network/PlatformDomainNameServiceQuery.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/Swiften/Network/PlatformDomainNameServiceQuery.h b/Swiften/Network/PlatformDomainNameServiceQuery.h
new file mode 100644
index 0000000..58257af
--- /dev/null
+++ b/Swiften/Network/PlatformDomainNameServiceQuery.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include <boost/enable_shared_from_this.hpp>
+
+#include "Swiften/Network/DomainNameServiceQuery.h"
+#include "Swiften/EventLoop/EventOwner.h"
+#include "Swiften/Base/String.h"
+
+namespace Swift {
+ class PlatformDomainNameServiceQuery : public DomainNameServiceQuery, public boost::enable_shared_from_this<PlatformDomainNameServiceQuery>, public EventOwner {
+ public:
+ PlatformDomainNameServiceQuery(const String& service);
+
+ virtual void run();
+
+ private:
+ void emitError();
+
+ private:
+ String service;
+ };
+}