Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
td_client_free(self);
return NULL;
}
+
+int td_client_launch_request(td_client* self, td_request* request) {
+ int r;
+
+ // Add the handle to cURL
+ r = curl_multi_add_handle(self->curl, td_request_handle(request));
+ if (r) {
+ ERROR(self->ctx, "Adding handle failed: %s\n", curl_multi_strerror(r));
+ return -ENOTSUP;
+ }
+
+ return 0;
+}
#include "ctx.h"
#include "daemon.h"
+#include "request.h"
int td_client_create(td_client** client,
td_ctx* ctx, td_daemon* daemon);
td_client* td_client_ref(td_client* self);
td_client* td_client_unref(td_client* self);
+int td_client_launch_request(td_client* self, td_request* request);
+
#endif /* TELEMETRY_CLIENT_H */