diff options
Diffstat (limited to 'Swiften/Network/DomainNameServiceQuery.h')
-rw-r--r-- | Swiften/Network/DomainNameServiceQuery.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Swiften/Network/DomainNameServiceQuery.h b/Swiften/Network/DomainNameServiceQuery.h index 0bd1569..0e80233 100644 --- a/Swiften/Network/DomainNameServiceQuery.h +++ b/Swiften/Network/DomainNameServiceQuery.h @@ -15,6 +15,8 @@ #include <Swiften/Network/DomainNameResolveError.h> namespace Swift { + class RandomGenerator; + class DomainNameServiceQuery { public: typedef boost::shared_ptr<DomainNameServiceQuery> ref; @@ -27,15 +29,10 @@ namespace Swift { int weight; }; - struct ResultPriorityComparator { - bool operator()(const DomainNameServiceQuery::Result& a, const DomainNameServiceQuery::Result& b) const { - return a.priority < b.priority; - } - }; - virtual ~DomainNameServiceQuery(); virtual void run() = 0; + static void sortResults(std::vector<DomainNameServiceQuery::Result>& queries, RandomGenerator& generator); boost::signal<void (const std::vector<Result>&)> onResult; }; |