First attempt at a search infrastructure.
[collection4.git] / graph_list.h
index 3669e02..e6b6888 100644 (file)
@@ -1,23 +1,30 @@
 #ifndef GRAPH_LIST_H
 #define GRAPH_LIST_H 1
 
-struct graph_ident_s;
-typedef struct graph_ident_s graph_ident_t;
+#include "graph_types.h"
+#include "graph.h"
+#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;
+/*
+ * Functions
+ */
+int gl_add_graph (graph_config_t *cfg);
 
-typedef int (*gl_callback) (const graph_list_t *, void *);
+int gl_config_submit (void);
+
+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);
+
+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_update (void);
-int gl_foreach (gl_callback callback, void *user_data);
 
 #endif /* GRAPH_LIST_H */
 /* vim: set sw=2 sts=2 et fdm=marker : */