#define ZBX_HISTORY_IFACE_SQL 0
#define ZBX_HISTORY_IFACE_ELASTIC 1
typedef struct zbx_history_iface zbx_history_iface_t;
typedef void (*zbx_history_destroy_func_t)(struct zbx_history_iface *hist);
typedef int (*zbx_history_add_values_func_t)(struct zbx_history_iface *hist, const zbx_vector_dc_history_ptr_t *history,
int config_history_storage_pipelines);
typedef int (*zbx_history_get_values_func_t)(struct zbx_history_iface *hist, zbx_uint64_t itemid, int start,
int count, int end, zbx_vector_history_record_t *values);
typedef int (*zbx_history_flush_func_t)(struct zbx_history_iface *hist);
typedef void (*zbx_history_func_t)(const zbx_vector_dc_history_ptr_t *);
unsigned char value_type;
unsigned char requires_trends;
zbx_history_func_t sql_history_func;
zbx_history_destroy_func_t destroy;
zbx_history_add_values_func_t add_values;
zbx_history_get_values_func_t get_values;
zbx_history_flush_func_t flush;
int config_log_slow_queries;
void zbx_history_sql_init(zbx_history_iface_t *hist, unsigned char value_type);
int zbx_history_elastic_init(zbx_history_iface_t *hist, unsigned char value_type,
const char *config_history_storage_url, int config_log_slow_queries, char **error);
void zbx_elastic_version_extract(struct zbx_json *json, int *result, int config_allow_unsupported_db_versions,
const char *config_history_storage_url);
zbx_uint32_t zbx_elastic_version_get(void);