1curl_easy_option_next(3)        libcurl Manual        curl_easy_option_next(3)
2
3
4

NAME

6       curl_easy_option_next - iterate over easy setopt options
7

SYNOPSIS

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

DESCRIPTION

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

EXAMPLE

51       /* iterate over all available options */
52       const struct curl_easyoption *opt;
53       opt = curl_easy_option_by_next(NULL);
54       while(opt) {
55         printf("Name: %s\n", opt->name);
56         opt = curl_easy_option_by_next(opt);
57       }
58

AVAILABILITY

60       This function was added in libcurl 7.73.0
61

RETURN VALUE

63       A  pointer to the curl_easyoption struct for the next option or NULL if
64       no more options.
65

SEE ALSO

67       curl_easy_option_by_name(3),curl_easy_option_by_id(3),    curl_easy_se‐
68       topt(3),
69
70
71
72libcurl 7.85.0                   May 17, 2022         curl_easy_option_next(3)
Impressum