summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Swiften/Network/CachingNameOnlyDomainNameResolver.cpp12
-rw-r--r--Swiften/Network/CachingNameOnlyDomainNameResolver.h9
2 files changed, 9 insertions, 12 deletions
diff --git a/Swiften/Network/CachingNameOnlyDomainNameResolver.cpp b/Swiften/Network/CachingNameOnlyDomainNameResolver.cpp
index a83bebd..8a2936a 100644
--- a/Swiften/Network/CachingNameOnlyDomainNameResolver.cpp
+++ b/Swiften/Network/CachingNameOnlyDomainNameResolver.cpp
@@ -9,8 +9,8 @@
#include <boost/smart_ptr/make_shared.hpp>
namespace Swift {
-CachingNameOnlyDomainNameResolver::CachingNameOnlyDomainNameResolver(DomainNameResolver* realResolver, EventLoop* eventLoop) : realResolver(realResolver) {
- staticResolver = boost::make_shared<StaticDomainNameResolver>(eventLoop);
+
+CachingNameOnlyDomainNameResolver::CachingNameOnlyDomainNameResolver(DomainNameResolver* realResolver, EventLoop*) : realResolver(realResolver) {
}
CachingNameOnlyDomainNameResolver::~CachingNameOnlyDomainNameResolver() {
@@ -18,15 +18,13 @@ CachingNameOnlyDomainNameResolver::~CachingNameOnlyDomainNameResolver() {
}
DomainNameServiceQuery::ref CachingNameOnlyDomainNameResolver::createServiceQuery(const std::string& name) {
- return staticResolver->createServiceQuery(name);
+ //FIXME: Cache
+ return realResolver->createServiceQuery(name);
}
DomainNameAddressQuery::ref CachingNameOnlyDomainNameResolver::createAddressQuery(const std::string& name) {
- return realResolver->createAddressQuery(name);
-}
-
-void CachingNameOnlyDomainNameResolver::handleAddressQueryResult(const std::string hostname, const std::vector<HostAddress>& address, boost::optional<DomainNameResolveError> error) {
//FIXME: Cache
+ return realResolver->createAddressQuery(name);
}
}
diff --git a/Swiften/Network/CachingNameOnlyDomainNameResolver.h b/Swiften/Network/CachingNameOnlyDomainNameResolver.h
index d9e78e6..2919271 100644
--- a/Swiften/Network/CachingNameOnlyDomainNameResolver.h
+++ b/Swiften/Network/CachingNameOnlyDomainNameResolver.h
@@ -11,9 +11,12 @@
#include <Swiften/Network/DomainNameResolver.h>
#include <Swiften/Network/StaticDomainNameResolver.h>
-
+/*
+ * FIXME: Does not do any caching yet.
+ */
namespace Swift {
class EventLoop;
+
class CachingNameOnlyDomainNameResolver : public DomainNameResolver {
public:
CachingNameOnlyDomainNameResolver(DomainNameResolver* realResolver, EventLoop* eventLoop);
@@ -23,10 +26,6 @@ namespace Swift {
virtual DomainNameAddressQuery::ref createAddressQuery(const std::string& name);
private:
- void handleAddressQueryResult(const std::string hostname, const std::vector<HostAddress>& address, boost::optional<DomainNameResolveError> error);
-
- private:
DomainNameResolver* realResolver;
- boost::shared_ptr<StaticDomainNameResolver> staticResolver;
};
}