options.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #ifndef CURLINC_OPTIONS_H
  2. #define CURLINC_OPTIONS_H
  3. /***************************************************************************
  4. * _ _ ____ _
  5. * Project ___| | | | _ \| |
  6. * / __| | | | |_) | |
  7. * | (__| |_| | _ <| |___
  8. * \___|\___/|_| \_\_____|
  9. *
  10. * Copyright (C) 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 https://curl.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. * SPDX-License-Identifier: curl
  24. *
  25. ***************************************************************************/
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. typedef enum {
  30. CURLOT_LONG, /* long (a range of values) */
  31. CURLOT_VALUES, /* (a defined set or bitmask) */
  32. CURLOT_OFF_T, /* curl_off_t (a range of values) */
  33. CURLOT_OBJECT, /* pointer (void *) */
  34. CURLOT_STRING, /* (char * to null-terminated buffer) */
  35. CURLOT_SLIST, /* (struct curl_slist *) */
  36. CURLOT_CBPTR, /* (void * passed as-is to a callback) */
  37. CURLOT_BLOB, /* blob (struct curl_blob *) */
  38. CURLOT_FUNCTION /* function pointer */
  39. } curl_easytype;
  40. /* Flag bits */
  41. /* "alias" means it is provided for old programs to remain functional,
  42. we prefer another name */
  43. #define CURLOT_FLAG_ALIAS (1<<0)
  44. /* The CURLOPTTYPE_* id ranges can still be used to figure out what type/size
  45. to use for curl_easy_setopt() for the given id */
  46. struct curl_easyoption {
  47. const char *name;
  48. CURLoption id;
  49. curl_easytype type;
  50. unsigned int flags;
  51. };
  52. CURL_EXTERN const struct curl_easyoption *
  53. curl_easy_option_by_name(const char *name);
  54. CURL_EXTERN const struct curl_easyoption *
  55. curl_easy_option_by_id(CURLoption id);
  56. CURL_EXTERN const struct curl_easyoption *
  57. curl_easy_option_next(const struct curl_easyoption *prev);
  58. #ifdef __cplusplus
  59. } /* end of extern "C" */
  60. #endif
  61. #endif /* CURLINC_OPTIONS_H */