1curl_easy_option_next(3) libcurl Manual curl_easy_option_next(3)
2
3
4
6 curl_easy_option_next - iterate over easy setopt options
7
9 #include <curl/curl.h>
10
11 typedef enum {
12 CURLOT_LONG, /* long (a range of values) */
13 CURLOT_VALUES, /* (a defined set or bitmask) */
14 CURLOT_OFF_T, /* curl_off_t (a range of values) */
15 CURLOT_OBJECT, /* pointer (void *) */
16 CURLOT_STRING, /* (char * to zero terminated buffer) */
17 CURLOT_SLIST, /* (struct curl_slist *) */
18 CURLOT_CBPTR, /* (void * passed as-is to a callback) */
19 CURLOT_BLOB, /* blob (struct curl_blob *) */
20 CURLOT_FUNCTION /* function pointer */
21 } curl_easytype;
22
23 /* The CURLOPTTYPE_* id ranges can still be used to figure out what type/size
24 to use for curl_easy_setopt() for the given id */
25 struct curl_easyoption {
26 const char *name;
27 CURLoption id;
28 curl_easytype type;
29 unsigned int flags;
30 };
31
32 const struct curl_easyoption *
33 curl_easy_option_next(const struct curl_easyoption *prev);
34
36 This function returns a pointer to the first or the next curl_easyop‐
37 tion struct, providing an ability to iterate over all known options for
38 curl_easy_setopt(3) in this instance of libcurl.
39
40 Pass a NULL argument as prev to get the first option returned, or pass
41 in the current option to get the next one returned. If there is no more
42 option to return, curl_easy_option_next(3) returns NULL.
43
44 The options returned by this functions are the ones known to this
45 libcurl and information about what argument type they want.
46
47 If the CURLOT_FLAG_ALIAS bit is set in the flags field, it means the
48 name is provided for backwards compatibility as an alias.
49
51 This function was added in libcurl 7.73.0
52
54 A pointer to the curl_easyoption struct for the next option or NULL if
55 no more options.
56
58 curl_easy_option_by_name(3),curl_easy_option_by_id(3), curl_easy_se‐
59 topt(3),
60
61
62
63libcurl 7.79.1 November 04, 2020 curl_easy_option_next(3)