X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdata_provider.h;h=87025f21ad31019c4b4c9218739f19e1f531d70c;hb=a9177c62be39c0b47777f1d3547fca2612c73003;hp=6dbcd1e8702cdfd79a67eb820910bdab4f7df502;hpb=b578a6b9f331c11ebc70d153494c7b6113990ee7;p=collection4.git diff --git a/src/data_provider.h b/src/data_provider.h index 6dbcd1e..87025f2 100644 --- a/src/data_provider.h +++ b/src/data_provider.h @@ -39,15 +39,16 @@ struct dp_data_point_s typedef struct dp_data_point_s dp_data_point_t; /* Callback passed to the "get_idents" function. */ -typedef int (*dp_get_idents_callback) (const graph_ident_t *, void *); +typedef int (*dp_get_idents_callback) (graph_ident_t *, void *); /* Callback passed to the "get_ident_ds_names" function. */ -typedef int (*dp_list_get_ident_ds_names_callback) (const graph_ident_t *, +typedef int (*dp_list_get_ident_ds_names_callback) (graph_ident_t *, const char *ds_name, void *); /* Callback passed to the "get_ident_data" function. */ typedef int (*dp_get_ident_data_callback) (graph_ident_t *, const char *ds_name, - const dp_data_point_t *, void *); + const dp_data_point_t *dp, size_t dp_num, + void *); struct data_provider_s { @@ -66,5 +67,14 @@ typedef struct data_provider_s data_provider_t; int data_provider_config (const oconfig_item_t *ci); +int data_provider_register (const char *name, data_provider_t *p); +int data_provider_get_idents (dp_get_idents_callback callback, void *user_data); +int data_provider_get_ident_ds_names (graph_ident_t *ident, + dp_list_get_ident_ds_names_callback callback, void *user_data); +int data_provider_get_ident_data (graph_ident_t *ident, + const char *ds_name, + dp_time_t begin, dp_time_t end, + dp_get_ident_data_callback callback, void *user_data); + #endif /* DATA_PROVIDER_H */ /* vim: set sw=2 sts=2 et fdm=marker : */