2
0

curl_easy_option_next.3 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" **************************************************************************
  22. .TH curl_easy_option_next 3 "27 Aug 2020" "libcurl 7.73.0" "libcurl Manual"
  23. .SH NAME
  24. curl_easy_option_next - iterate over easy setopt options
  25. .SH SYNOPSIS
  26. .nf
  27. #include <curl/curl.h>
  28. typedef enum {
  29. CURLOT_LONG, /* long (a range of values) */
  30. CURLOT_VALUES, /* (a defined set or bitmask) */
  31. CURLOT_OFF_T, /* curl_off_t (a range of values) */
  32. CURLOT_OBJECT, /* pointer (void *) */
  33. CURLOT_STRING, /* (char * to zero terminated buffer) */
  34. CURLOT_SLIST, /* (struct curl_slist *) */
  35. CURLOT_CBPTR, /* (void * passed as-is to a callback) */
  36. CURLOT_BLOB, /* blob (struct curl_blob *) */
  37. CURLOT_FUNCTION /* function pointer */
  38. } curl_easytype;
  39. /* The CURLOPTTYPE_* id ranges can still be used to figure out what type/size
  40. to use for curl_easy_setopt() for the given id */
  41. struct curl_easyoption {
  42. const char *name;
  43. CURLoption id;
  44. curl_easytype type;
  45. unsigned int flags;
  46. };
  47. const struct curl_easyoption *
  48. curl_easy_option_next(const struct curl_easyoption *prev);
  49. .fi
  50. .SH DESCRIPTION
  51. This function returns a pointer to the first or the next curl_easyoption
  52. struct, providing an ability to iterate over all known options for
  53. \fIcurl_easy_setopt(3)\fP in this instance of libcurl.
  54. Pass a \fBNULL\fP argument as \fBprev\fP to get the first option returned, or
  55. pass in the current option to get the next one returned. If there is no more
  56. option to return, \fIcurl_easy_option_next(3)\fP returns NULL.
  57. The options returned by this functions are the ones known to this libcurl and
  58. information about what argument type they want.
  59. If the \fBCURLOT_FLAG_ALIAS\fP bit is set in the flags field, it means the
  60. name is provided for backwards compatibility as an alias.
  61. .SH AVAILABILITY
  62. This function was added in libcurl 7.73.0
  63. .SH RETURN VALUE
  64. A pointer to the curl_easyoption struct for the next option or NULL if no more
  65. options.
  66. .SH "SEE ALSO"
  67. .BR curl_easy_option_by_name "(3)," curl_easy_option_by_id "(3),"
  68. .BR curl_easy_setopt "(3),"