diff options
author | Vsevolod Novikov <novikov@doroga.tv> | 2011-01-29 20:12:10 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-04-25 19:47:16 +0200 |
commit | ca015f1a45c68aa1d641678cfc13ce0df0c58fe0 (patch) | |
tree | 7e74d24a9eec1aeb541c84359257326b5f938ff4 /lib/hostsyn.c | |
parent | 722f286f801e456c790cec0ea10306220d4969e2 (diff) | |
download | curl-ca015f1a45c68aa1d641678cfc13ce0df0c58fe0.tar.gz |
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.c | 55 |
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. |