1 // ***************************************************************************
2 // HostInfo_p.h (c) 2011 Derek Barnett
3 // Marth Lab, Department of Biology, Boston College
4 // ---------------------------------------------------------------------------
5 // Last modified: 10 November 2011 (DB)
6 // ---------------------------------------------------------------------------
7 // Provides DNS lookup functionality for hostname/IP addresses
8 // ***************************************************************************
17 // This file is not part of the BamTools API. It exists purely as an
18 // implementation detail. This header file may change from version to version
19 // without notice, or even be removed.
23 #include "api/internal/io/HostAddress_p.h"
33 enum ErrorType { NoError = 0
41 HostInfo(const HostInfo& other);
46 std::string HostName(void) const;
47 void SetHostName(const std::string& name);
49 std::vector<HostAddress> Addresses(void) const;
50 void SetAddresses(const std::vector<HostAddress>& addresses);
52 HostInfo::ErrorType GetError(void) const;
53 std::string GetErrorString(void) const;
57 void SetError(const HostInfo::ErrorType error);
58 void SetErrorString(const std::string& errorString);
62 static HostInfo Lookup(const std::string& hostname,
63 const std::string& port);
67 std::string m_hostName;
68 std::vector<HostAddress> m_addresses;
69 HostInfo::ErrorType m_error;
70 std::string m_errorString;
73 } // namespace Internal
74 } // namespace BamTools
76 #endif // HOSTINFO_P_H