diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-06-17 08:13:17 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-06-17 08:13:17 (GMT) |
commit | d46097d2c30a0eafde1f1c9d98cb3b20896c4682 (patch) | |
tree | f0ceae2acae5812676b708caed23f023301e737a /Swiften/Network | |
parent | c4b4eeee2433c3b16ed9390d1b7487c2c98aaee3 (diff) | |
download | swift-d46097d2c30a0eafde1f1c9d98cb3b20896c4682.zip swift-d46097d2c30a0eafde1f1c9d98cb3b20896c4682.tar.bz2 |
Remove unused functions from caching resolver.
Diffstat (limited to 'Swiften/Network')
-rw-r--r-- | Swiften/Network/CachingNameOnlyDomainNameResolver.cpp | 12 | ||||
-rw-r--r-- | Swiften/Network/CachingNameOnlyDomainNameResolver.h | 9 |
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; }; } |