curl_easy_option_by_id.3 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 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. .\" * SPDX-License-Identifier: curl
  22. .\" *
  23. .\" **************************************************************************
  24. .TH curl_easy_option_by_id 3 "27 Aug 2020" "libcurl" "libcurl"
  25. .SH NAME
  26. curl_easy_option_by_id - find an easy setopt option by id
  27. .SH SYNOPSIS
  28. .nf
  29. #include <curl/curl.h>
  30. const struct curl_easyoption *curl_easy_option_by_id(CURLoption id);
  31. .fi
  32. .SH DESCRIPTION
  33. Given a \fICURLoption\fP \fBid\fP, this function returns a pointer to the
  34. \fIcurl_easyoption\fP struct, holding information about the
  35. \fIcurl_easy_setopt(3)\fP option using that id. The option id is the CURLOPT_
  36. prefix ones provided in the standard curl/curl.h header file. This function
  37. will return the non-aliases version for the cases where there is an alias
  38. function as well.
  39. If libcurl has no option with the given id, this function returns NULL.
  40. .SH EXAMPLE
  41. .nf
  42. const struct curl_easyoption *opt = curl_easy_option_by_id(CURLOPT_URL);
  43. if(opt) {
  44. printf("This option wants type %x\\n", opt->type);
  45. }
  46. .fi
  47. .SH AVAILABILITY
  48. This function was added in libcurl 7.73.0
  49. .SH RETURN VALUE
  50. A pointer to the \fIcurl_easyoption\fP struct for the option or NULL.
  51. .SH "SEE ALSO"
  52. .BR curl_easy_option_by_name "(3)," curl_easy_option_next "(3),"
  53. .BR curl_easy_setopt "(3),"