X-Git-Url: https://git.octo.it/?p=collection4.git;a=blobdiff_plain;f=src%2Fdata_provider.h;h=30f36703a78e497985e52f77c1dc6a0a36727cc3;hp=a5e9c76dca25796bf742233d4de3a4c2347d6bdd;hb=d00ed057f5ca87431c18ecbf9c45364eb85c24f4;hpb=97a0180ffe26c193c835e7906ea75c3b47fe3944 diff --git a/src/data_provider.h b/src/data_provider.h index a5e9c76..30f3670 100644 --- a/src/data_provider.h +++ b/src/data_provider.h @@ -25,6 +25,7 @@ #define DATA_PROVIDER_H 1 #include "graph_types.h" +#include "oconfig.h" #include @@ -46,7 +47,8 @@ typedef int (*dp_list_get_ident_ds_names_callback) (const graph_ident_t *, /* 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 { @@ -63,5 +65,16 @@ struct data_provider_s }; 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 : */