From: Florian Forster Date: Wed, 8 Sep 2010 15:19:05 +0000 (+0200) Subject: src/data_provider.[ch]: Implement "data_provider_get_ident_ds_names". X-Git-Tag: v4.0.0~39 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e481a79ecdfc8a6b678656f4354a81b5aa97a4aa;p=collection4.git src/data_provider.[ch]: Implement "data_provider_get_ident_ds_names". --- diff --git a/src/data_provider.c b/src/data_provider.c index f512c11..0236443 100644 --- a/src/data_provider.c +++ b/src/data_provider.c @@ -69,6 +69,16 @@ int data_provider_get_idents (dp_get_idents_callback callback, /* {{{ */ return (status); } /* }}} int data_provider_get_idents */ +int data_provider_get_ident_ds_names (graph_ident_t *ident, /* {{{ */ + dp_list_get_ident_ds_names_callback callback, void *user_data) +{ + if (data_provider == NULL) + return (EINVAL); + + return (data_provider->get_ident_ds_names (data_provider->private_data, + ident, callback, user_data)); +} /* }}} int data_provider_get_ident_ds_names */ + int data_provider_get_ident_data (graph_ident_t *ident, /* {{{ */ const char *ds_name, dp_time_t begin, dp_time_t end, diff --git a/src/data_provider.h b/src/data_provider.h index 1cdb42e..30f3670 100644 --- a/src/data_provider.h +++ b/src/data_provider.h @@ -47,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 { @@ -68,6 +69,8 @@ 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,