X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=graph_list.h;h=c17d6fc08c17c220c2e911eeb85f1e5cd0ff75f5;hb=af2ed61b280e1ec169aba2bcb9df30ac76b006d2;hp=3669e026b468cafd478d09db5db9111a23bd1e72;hpb=61b195a230f143f03101f2af1072644379fe5739;p=collection4.git diff --git a/graph_list.h b/graph_list.h index 3669e02..c17d6fc 100644 --- a/graph_list.h +++ b/graph_list.h @@ -1,23 +1,36 @@ #ifndef GRAPH_LIST_H #define GRAPH_LIST_H 1 -struct graph_ident_s; -typedef struct graph_ident_s graph_ident_t; +#include "graph_instance.h" -struct graph_list_s -{ - char *host; - char *plugin; - char *plugin_instance; - char *type; - char *type_instance; -}; -typedef struct graph_list_s graph_list_t; +/* + * Callback types + */ +typedef int (*gl_cfg_callback) (graph_config_t *cfg, + void *user_data); -typedef int (*gl_callback) (const graph_list_t *, void *); +typedef int (*gl_inst_callback) (graph_config_t *cfg, + graph_instance_t *inst, void *user_data); + +/* + * Functions + */ +int gl_add_graph (graph_config_t *cfg); + +int gl_config_submit (void); + +int gl_graph_get_all (gl_cfg_callback callback, + void *user_data); + +graph_config_t *gl_graph_get_selected (void); + +int gl_graph_instance_get_all (graph_config_t *cfg, + gl_inst_callback callback, void *user_data); + +int gl_instance_get_all (gl_inst_callback callback, + void *user_data); int gl_update (void); -int gl_foreach (gl_callback callback, void *user_data); #endif /* GRAPH_LIST_H */ /* vim: set sw=2 sts=2 et fdm=marker : */