From ca015f1a45c68aa1d641678cfc13ce0df0c58fe0 Mon Sep 17 00:00:00 2001 From: Vsevolod Novikov Date: Sat, 29 Jan 2011 20:12:10 +0100 Subject: asynch resolvers: unified Introducing an internal API for handling of different async resolver backends. --- lib/hostsyn.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'lib/hostsyn.c') diff --git a/lib/hostsyn.c b/lib/hostsyn.c index b68e4702e..799aa6991 100644 --- a/lib/hostsyn.c +++ b/lib/hostsyn.c @@ -72,6 +72,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, -- cgit v1.2.3