]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/import/curl-util.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 This file is part of systemd.
7 Copyright 2014 Lennart Poettering
10 #include <curl/curl.h>
11 #include <sys/types.h>
17 typedef struct CurlGlue CurlGlue
;
22 sd_event_source
*timer
;
24 Hashmap
*translate_fds
;
26 void (*on_finished
)(CurlGlue
*g
, CURL
*curl
, CURLcode code
);
30 int curl_glue_new(CurlGlue
**glue
, sd_event
*event
);
31 CurlGlue
* curl_glue_unref(CurlGlue
*glue
);
33 DEFINE_TRIVIAL_CLEANUP_FUNC(CurlGlue
*, curl_glue_unref
);
35 int curl_glue_make(CURL
**ret
, const char *url
, void *userdata
);
36 int curl_glue_add(CurlGlue
*g
, CURL
*c
);
37 void curl_glue_remove_and_free(CurlGlue
*g
, CURL
*c
);
39 struct curl_slist
*curl_slist_new(const char *first
, ...) _sentinel_
;
40 int curl_header_strdup(const void *contents
, size_t sz
, const char *field
, char **value
);
41 int curl_parse_http_time(const char *t
, usec_t
*ret
);
43 DEFINE_TRIVIAL_CLEANUP_FUNC(CURL
*, curl_easy_cleanup
);
44 DEFINE_TRIVIAL_CLEANUP_FUNC(struct curl_slist
*, curl_slist_free_all
);