#ifndef ZABBIX_ASYNCHTTPPOLLER_H
#define ZABBIX_ASYNCHTTPPOLLER_H
#include "zbxsysinc.h"
#if defined(HAVE_LIBCURL) && defined(HAVE_LIBEVENT)
#include <curl/curl.h>
#include <curl/multi.h>
#include <event2/event.h>
typedef void (*process_httpagent_result_callback_fn)(CURL *easy_handle, CURLcode err, void *arg);
typedef void (*httpagent_action_callback_fn)(void *arg);
typedef struct
{
struct event_base *ev;
struct event *curl_timeout;
CURLM *curl_handle;
process_httpagent_result_callback_fn process_httpagent_result;
httpagent_action_callback_fn http_agent_action;
void *http_agent_arg;
}
zbx_asynchttppoller_config;
void zbx_async_httpagent_init(void);
zbx_asynchttppoller_config *zbx_async_httpagent_create(struct event_base *ev,
process_httpagent_result_callback_fn process_httpagent_result_callback,
httpagent_action_callback_fn httpagent_action_callback, void *arg, char **error);
void zbx_async_httpagent_clean(zbx_asynchttppoller_config *asynchttppoller_config);
#endif
#endif