tool_easysrc.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef HEADER_CURL_TOOL_EASYSRC_H
  2. #define HEADER_CURL_TOOL_EASYSRC_H
  3. /***************************************************************************
  4. * _ _ ____ _
  5. * Project ___| | | | _ \| |
  6. * / __| | | | |_) | |
  7. * | (__| |_| | _ <| |___
  8. * \___|\___/|_| \_\_____|
  9. *
  10. * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, 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. #include "tool_setup.h"
  27. #ifndef CURL_DISABLE_LIBCURL_OPTION
  28. /* global variable declarations, for easy-interface source code generation */
  29. extern struct slist_wc *easysrc_decl; /* Variable declarations */
  30. extern struct slist_wc *easysrc_data; /* Build slists, forms etc. */
  31. extern struct slist_wc *easysrc_code; /* Setopt calls etc. */
  32. extern struct slist_wc *easysrc_toohard; /* Unconvertible setopt */
  33. extern struct slist_wc *easysrc_clean; /* Clean up (reverse order) */
  34. extern int easysrc_mime_count; /* Number of curl_mime variables */
  35. extern int easysrc_slist_count; /* Number of curl_slist variables */
  36. extern CURLcode easysrc_init(void);
  37. extern CURLcode easysrc_add(struct slist_wc **plist, const char *bupf);
  38. extern CURLcode easysrc_addf(struct slist_wc **plist,
  39. const char *fmt, ...) CURL_PRINTF(2, 3);
  40. extern CURLcode easysrc_perform(void);
  41. extern CURLcode easysrc_cleanup(void);
  42. void dumpeasysrc(struct GlobalConfig *config);
  43. #else /* CURL_DISABLE_LIBCURL_OPTION is defined */
  44. #define easysrc_init() CURLE_OK
  45. #define easysrc_cleanup()
  46. #define dumpeasysrc(x)
  47. #define easysrc_perform() CURLE_OK
  48. #endif /* CURL_DISABLE_LIBCURL_OPTION */
  49. #endif /* HEADER_CURL_TOOL_EASYSRC_H */