filesystem.[ch]: Move filesystem accessing functions into a separate module.
[collection4.git] / graph_list.h
1 #ifndef GRAPH_LIST_H
2 #define GRAPH_LIST_H 1
3
4 /*
5  * Data types
6  */
7 struct graph_config_s;
8 typedef struct graph_config_s graph_config_t;
9
10 #include "graph_def.h"
11 #include "graph_ident.h"
12 #include "graph_instance.h"
13 #include "utils_array.h"
14 #include "oconfig.h"
15
16 /*
17  * Callback types
18  */
19 typedef int (*gl_cfg_callback) (graph_config_t *cfg,
20     void *user_data);
21
22 typedef int (*gl_inst_callback) (graph_config_t *cfg,
23     graph_instance_t *inst, void *user_data);
24
25 /*
26  * Functions
27  */
28 int graph_config_add (const oconfig_item_t *ci);
29 int graph_config_submit (void);
30
31 int gl_graph_get_all (gl_cfg_callback callback,
32     void *user_data);
33
34 graph_config_t *graph_get_selected (void);
35
36 int gl_graph_get_title (graph_config_t *cfg,
37     char *buffer, size_t buffer_size);
38
39 graph_ident_t *gl_graph_get_selector (graph_config_t *cfg);
40
41 graph_instance_t *gl_graph_get_instances (graph_config_t *cfg);
42
43 graph_def_t *gl_graph_get_defs (graph_config_t *cfg);
44
45 int gl_graph_add_def (graph_config_t *cfg, graph_def_t *def);
46
47 int gl_graph_instance_get_all (graph_config_t *cfg,
48     gl_inst_callback callback, void *user_data);
49
50 int gl_instance_get_all (gl_inst_callback callback,
51     void *user_data);
52
53 int gl_update (void);
54
55 #endif /* GRAPH_LIST_H */
56 /* vim: set sw=2 sts=2 et fdm=marker : */