easy.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef __CURL_EASY_H
  2. #define __CURL_EASY_H
  3. /***************************************************************************
  4. * _ _ ____ _
  5. * Project ___| | | | _ \| |
  6. * / __| | | | |_) | |
  7. * | (__| |_| | _ <| |___
  8. * \___|\___/|_| \_\_____|
  9. *
  10. * Copyright (C) 1998 - 2002, Daniel Stenberg, <[email protected]>, et al.
  11. *
  12. * This software is licensed as described in the file COPYING, which
  13. * you should have received as part of this distribution. The terms
  14. * are also available at http://curl.haxx.se/docs/copyright.html.
  15. *
  16. * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  17. * copies of the Software, and permit persons to whom the Software is
  18. * furnished to do so, under the terms of the COPYING file.
  19. *
  20. * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  21. * KIND, either express or implied.
  22. *
  23. * $Id$
  24. ***************************************************************************/
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. CURL *curl_easy_init(void);
  29. CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...);
  30. CURLcode curl_easy_perform(CURL *curl);
  31. void curl_easy_cleanup(CURL *curl);
  32. /*
  33. * NAME curl_easy_getinfo()
  34. *
  35. * DESCRIPTION
  36. *
  37. * Request internal information from the curl session with this function. The
  38. * third argument MUST be a pointer to a long, a pointer to a char * or a
  39. * pointer to a double (as the documentation describes elsewhere). The data
  40. * pointed to will be filled in accordingly and can be relied upon only if the
  41. * function returns CURLE_OK. This function is intended to get used *AFTER* a
  42. * performed transfer, all results from this function are undefined until the
  43. * transfer is completed.
  44. */
  45. CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
  46. /*
  47. * NAME curl_easy_duphandle()
  48. *
  49. * DESCRIPTION
  50. *
  51. * Creates a new curl session handle with the same options set for the handle
  52. * passed in. Duplicating a handle could only be a matter of cloning data and
  53. * options, internal state info and things like persistant connections cannot
  54. * be transfered. It is useful in multithreaded applications when you can run
  55. * curl_easy_duphandle() for each new thread to avoid a series of identical
  56. * curl_easy_setopt() invokes in every thread.
  57. */
  58. CURL* curl_easy_duphandle(CURL *curl);
  59. #ifdef __cplusplus
  60. }
  61. #endif
  62. #endif