aboutsummaryrefslogtreecommitdiff
path: root/lib/hostsyn.c
diff options
context:
space:
mode:
authorVsevolod Novikov <novikov@doroga.tv>2011-01-29 20:12:10 +0100
committerDaniel Stenberg <daniel@haxx.se>2011-04-25 19:47:16 +0200
commitca015f1a45c68aa1d641678cfc13ce0df0c58fe0 (patch)
tree7e74d24a9eec1aeb541c84359257326b5f938ff4 /lib/hostsyn.c
parent722f286f801e456c790cec0ea10306220d4969e2 (diff)
asynch resolvers: unified
Introducing an internal API for handling of different async resolver backends.
Diffstat (limited to 'lib/hostsyn.c')
-rw-r--r--lib/hostsyn.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/lib/hostsyn.c b/lib/hostsyn.c
index b68e4702e..799aa6991 100644
--- a/lib/hostsyn.c
+++ b/lib/hostsyn.c
@@ -73,6 +73,61 @@
#ifdef CURLRES_SYNCH
/*
+ * Curl_resolver_global_init() - the generic low-level name resolve API.
+ * Called from curl_global_init() to initialize global resolver environment.
+ * Does nothing here.
+ */
+int Curl_resolver_global_init()
+{
+ return CURLE_OK;
+}
+
+/*
+ * Curl_resolver_global_cleanup() - the generic low-level name resolve API.
+ * Called from curl_global_cleanup() to destroy global resolver environment.
+ * Does nothing here.
+ */
+void Curl_resolver_global_cleanup()
+{
+}
+
+/*
+ * Curl_resolver_init() - the generic low-level name resolve API.
+ * Called from curl_easy_init() -> Curl_open() to initialize resolver URL-state specific environment
+ * ('resolver' member of the UrlState structure).
+ * Does nothing here.
+ */
+int Curl_resolver_init(void **resolver)
+{
+ (void)resolver;
+ return CURLE_OK;
+}
+
+/*
+ * Curl_resolver_cleanup() - the generic low-level name resolve API.
+ * Called from curl_easy_cleanup() -> Curl_close() to cleanup resolver URL-state specific environment
+ * ('resolver' member of the UrlState structure).
+ * Does nothing here.
+ */
+void Curl_resolver_cleanup(void *resolver)
+{
+ (void)resolver;
+}
+
+/*
+ * Curl_resolver_duphandle() - the generic low-level name resolve API.
+ * Called from curl_easy_duphandle() to duplicate resolver URL state-specific environment
+ * ('resolver' member of the UrlState structure).
+ * Does nothing here.
+ */
+int Curl_resolver_duphandle(void **to, void *from)
+{
+ (void)to;
+ (void)from;
+ return CURLE_OK;
+}
+
+/*
* Curl_wait_for_resolv() for synch-builds. Curl_resolv() can never return
* wait==TRUE, so this function will never be called. If it still gets called,
* we return failure at once.