summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/HostnameLookup.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/OSSupport/HostnameLookup.h')
-rw-r--r--src/OSSupport/HostnameLookup.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/OSSupport/HostnameLookup.h b/src/OSSupport/HostnameLookup.h
index d69f24707..559dfad5f 100644
--- a/src/OSSupport/HostnameLookup.h
+++ b/src/OSSupport/HostnameLookup.h
@@ -12,7 +12,6 @@
#pragma once
#include "Network.h"
-#include <event2/util.h>
@@ -22,21 +21,21 @@
class cHostnameLookup
{
public:
- /** Creates the lookup object. Doesn't start the lookup yet. */
- cHostnameLookup(cNetwork::cResolveNameCallbacksPtr a_Callbacks);
-
- /** Starts the lookup. */
- void Lookup(const AString & a_Hostname);
+ /** Creates a lookup object and schedules the lookup. */
+ static void Lookup(const AString & a_Hostname, cNetwork::cResolveNameCallbacksPtr a_Callbacks);
protected:
+ /** Creates the lookup object. Doesn't start the lookup yet. */
+ cHostnameLookup(const AString & a_Hostname, cNetwork::cResolveNameCallbacksPtr a_Callbacks);
+
/** The callbacks to call for resolved names / errors. */
cNetwork::cResolveNameCallbacksPtr m_Callbacks;
/** The hostname that was queried (needed for the callbacks). */
AString m_Hostname;
- static void Callback(int a_ErrCode, struct evutil_addrinfo * a_Addr, void * a_Self);
+ void Callback(int a_ErrCode, struct addrinfo * a_Addr);
};
typedef SharedPtr<cHostnameLookup> cHostnameLookupPtr;
typedef std::vector<cHostnameLookupPtr> cHostnameLookupPtrs;