Created a HostAddressList type as an alias to the STL list of HostAddresses.
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Thu, 23 Feb 2012 02:50:02 +0000 (00:50 -0200)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Thu, 23 Feb 2012 02:50:02 +0000 (00:50 -0200)
src/dns/dnsresolver.cpp
src/dns/dnsresolver.h
src/dns/hostaddress.h

index 219c35c..40b1477 100644 (file)
@@ -236,7 +236,7 @@ rr_list_t DnsResolver::fill_answers_list(
 
 void DnsResolver::fill_resolved_ip_list(
         const rr_list_t& answers_list,
-        list<HostAddress> *resolved_host_address_list
+        HostAddressList *resolved_host_address_list
 ) const
 {
     BOOST_ASSERT( 1 <= answers_list.size() );
@@ -268,7 +268,7 @@ void DnsResolver::fill_resolved_ip_list(
 
 void DnsResolver::append_resolved_ipv4(
         const shared_ptr<resource_base_t> resource_record,
-        list<HostAddress> *resolved_host_address_list
+        HostAddressList *resolved_host_address_list
 ) const
 {
     BOOST_ASSERT( resource_record->rtype() == boost::net::dns::type_a );
index 1c3dd0a..95a2eaf 100644 (file)
@@ -21,11 +21,10 @@ on this file might be covered by the GNU General Public License.
 #define DNS_RESOLVER_H
 
 #include <string>
-#include <list>
 
 #include <boost/net/dns.hpp>
 
-class HostAddress;
+#include "dns/hostaddress.h"
 
 //-----------------------------------------------------------------------------
 // DnsResolver
@@ -66,7 +65,7 @@ private:
 
 private:
     /// The list of IPs available to the host DNS.
-    std::list<HostAddress> ResolvedHostAddressList;
+    HostAddressList ResolvedHostAddressList;
     /// The DNS of the host.
     const std::string HostDnsAddress;
     /// The address of the server which can resolve the host address.
index c1da3bf..603630e 100644 (file)
@@ -22,6 +22,7 @@ on this file might be covered by the GNU General Public License.
 
 #include <stdint.h>
 
+#include <list>
 #include <string>
 
 #include "dns/timetolive.h"
@@ -54,4 +55,10 @@ private:
 
 };
 
+//-----------------------------------------------------------------------------
+// HostAddressList
+//-----------------------------------------------------------------------------
+
+typedef std::list<HostAddress> HostAddressList;
+
 #endif // HOST_ADDRESS_H