#ifndef ZABBIX_ITEM_PREPROC_H
#define ZABBIX_ITEM_PREPROC_H
#define ZBX_PREPROC_MAX_PACKET_SIZE (ZBX_MEBIBYTE * 128)
ZBX_VECTOR_DECL(ppcache, zbx_preproc_cache_ref_t)
zbx_vector_ppcache_t refs;
int zbx_item_preproc(zbx_preproc_cache_t *cache, unsigned char value_type, zbx_variant_t *value,
const zbx_timespec_t *ts, const zbx_preproc_op_t *op, zbx_variant_t *history_value,
zbx_timespec_t *history_ts, char **error);
int zbx_item_preproc_handle_error(zbx_variant_t *value, const zbx_preproc_op_t *op, char **error);
int zbx_item_preproc_convert_value_to_numeric(zbx_variant_t *value_num, const zbx_variant_t *value,
unsigned char value_type, char **errmsg);
int zbx_item_preproc_test(unsigned char value_type, zbx_variant_t *value, const zbx_timespec_t *ts,
zbx_preproc_op_t *steps, int steps_num, zbx_vector_ptr_t *history_in, zbx_vector_ptr_t *history_out,
zbx_preproc_result_t *results, int *results_num, char **error);
void *zbx_preproc_cache_get(zbx_preproc_cache_t *cache, unsigned char type);
void zbx_preproc_cache_put(zbx_preproc_cache_t *cache, unsigned char type, void *impl);
void zbx_preproc_cache_init(zbx_preproc_cache_t *cache);
void zbx_preproc_cache_clear(zbx_preproc_cache_t *cache);