X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fgraph_list.h;h=a7ca00344536a26a3390c84b166678655bbbc2b8;hb=b8b8d15d228be65ae62db08e4163d34e958e7766;hp=c17d6fc08c17c220c2e911eeb85f1e5cd0ff75f5;hpb=0ab3085f89e64eecd67d3179ea87f0463e918a10;p=collection4.git diff --git a/src/graph_list.h b/src/graph_list.h index c17d6fc..a7ca003 100644 --- a/src/graph_list.h +++ b/src/graph_list.h @@ -1,16 +1,8 @@ #ifndef GRAPH_LIST_H #define GRAPH_LIST_H 1 -#include "graph_instance.h" - -/* - * Callback types - */ -typedef int (*gl_cfg_callback) (graph_config_t *cfg, - void *user_data); - -typedef int (*gl_inst_callback) (graph_config_t *cfg, - graph_instance_t *inst, void *user_data); +#include "graph_types.h" +#include "graph_ident.h" /* * Functions @@ -19,15 +11,22 @@ int gl_add_graph (graph_config_t *cfg); int gl_config_submit (void); -int gl_graph_get_all (gl_cfg_callback callback, +graph_config_t *gl_graph_get_selected (void); + +int gl_graph_get_all (graph_callback_t callback, void *user_data); + +int gl_graph_instance_get_all (graph_config_t *cfg, graph_inst_callback_t callback, void *user_data); -graph_config_t *gl_graph_get_selected (void); +int gl_instance_get_all (graph_inst_callback_t callback, void *user_data); + +int gl_search (const char *search, graph_inst_callback_t callback, + void *user_data); -int gl_graph_instance_get_all (graph_config_t *cfg, - gl_inst_callback callback, void *user_data); +int gl_search_field (graph_ident_field_t field, const char *field_value, + graph_inst_callback_t callback, void *user_data); -int gl_instance_get_all (gl_inst_callback callback, +int gl_foreach_host (int (*callback) (const char *host, void *user_data), void *user_data); int gl_update (void);