#include "zbxcacheconfig.h"
#include "zbxdiscovery.h"
#define ZBX_PROXYMODE_ACTIVE 0
#define ZBX_PROXYMODE_PASSIVE 1
#define ZBX_PROXY_UPLOAD_UNDEFINED 0
#define ZBX_PROXY_UPLOAD_DISABLED 1
#define ZBX_PROXY_UPLOAD_ENABLED 2
ZBX_TEMPLATE_LINK_MANUAL = 0,
ZBX_TEMPLATE_LINK_LLD = 1
zbx_host_template_link_type;
typedef int (*zbx_trigger_func_t)(zbx_variant_t *, const zbx_dc_evaluate_item_t *, const char *, const char *,
const zbx_timespec_t *, char **);
typedef void (*zbx_lld_process_agent_result_func_t)(zbx_uint64_t itemid, zbx_uint64_t hostid, AGENT_RESULT *result,
zbx_timespec_t *ts, char *error);
typedef void (*zbx_preprocess_item_value_func_t)(zbx_uint64_t itemid, zbx_uint64_t hostid,
unsigned char item_value_type, unsigned char item_flags, AGENT_RESULT *result, zbx_timespec_t *ts,
unsigned char state, char *error);
typedef void (*zbx_preprocessor_flush_func_t)(void);
void zbx_init_library_dbwrap(zbx_lld_process_agent_result_func_t lld_process_agent_result_func,
zbx_preprocess_item_value_func_t preprocess_item_value_func,
zbx_preprocessor_flush_func_t preprocessor_flush_func);
int zbx_check_access_passive_proxy(zbx_socket_t *sock, int send_response, const char *req,
const zbx_config_tls_t *config_tls, int config_timeout, const char *server);
int zbx_get_active_proxy_from_request(const struct zbx_json_parse *jp, zbx_dc_proxy_t *proxy, char **error);
int zbx_proxy_check_permissions(const zbx_dc_proxy_t *proxy, const zbx_socket_t *sock, char **error);
int zbx_get_interface_availability_data(struct zbx_json *json, int *ts);
int zbx_proxy_get_host_active_availability(struct zbx_json *j);
int zbx_proxy_get_delay(zbx_uint64_t lastid);
int zbx_process_history_data(zbx_history_recv_item_t *items, zbx_agent_value_t *values, int *errcodes,
size_t values_num, zbx_proxy_suppress_t *nodata_win);