Implement "DEF" configuration.
[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_instance_s;
8 typedef struct graph_instance_s graph_instance_t;
9
10 struct graph_config_s;
11 typedef struct graph_config_s graph_config_t;
12
13 /*
14  * Callback types
15  */
16 typedef int (*gl_cfg_callback) (graph_config_t *cfg,
17     void *user_data);
18
19 typedef int (*gl_inst_callback) (graph_config_t *cfg,
20     graph_instance_t *inst, void *user_data);
21
22 #include "graph_def.h"
23 #include "graph_ident.h"
24 #include "utils_array.h"
25 #include "oconfig.h"
26
27 /*
28  * Functions
29  */
30 int graph_config_add (const oconfig_item_t *ci);
31 int graph_config_submit (void);
32
33 int gl_graph_get_all (gl_cfg_callback callback,
34     void *user_data);
35
36 graph_config_t *graph_get_selected (void);
37
38 int gl_graph_get_title (graph_config_t *cfg,
39     char *buffer, size_t buffer_size);
40
41 graph_ident_t *gl_graph_get_selector (graph_config_t *cfg);
42
43 int gl_graph_add_def (graph_config_t *cfg, graph_def_t *def);
44
45 int gl_graph_instance_get_all (graph_config_t *cfg,
46     gl_inst_callback callback, void *user_data);
47
48 graph_instance_t *inst_get_selected (graph_config_t *cfg);
49
50 int gl_instance_get_all (gl_inst_callback callback,
51     void *user_data);
52
53 int gl_instance_get_params (graph_config_t *cfg, graph_instance_t *inst,
54     char *buffer, size_t buffer_size);
55
56 int gl_instance_get_rrdargs (graph_config_t *cfg, graph_instance_t *inst,
57     str_array_t *args);
58
59 graph_ident_t *gl_instance_get_selector (graph_instance_t *inst);
60
61 int gl_update (void);
62
63 #endif /* GRAPH_LIST_H */
64 /* vim: set sw=2 sts=2 et fdm=marker : */