18d168cfee18121dcee5410343c5bdc6d25b6844
[collection4.git] / src / graph.h
1 #ifndef GRAPH_H
2 #define GRAPH_H 1
3
4 #include "graph_types.h"
5 #include "oconfig.h"
6 #include "utils_array.h"
7
8 /*
9  * Functions
10  */
11 graph_config_t *graph_create (const graph_ident_t *selector);
12
13 void graph_destroy (graph_config_t *graph);
14
15 int graph_config_add (const oconfig_item_t *ci);
16
17 int graph_add_file (graph_config_t *cfg, const graph_ident_t *file);
18
19 int graph_get_title (graph_config_t *cfg,
20     char *buffer, size_t buffer_size);
21
22 int graph_get_params (graph_config_t *cfg, char *buffer, size_t buffer_size);
23
24 graph_ident_t *graph_get_selector (graph_config_t *cfg);
25
26 graph_def_t *graph_get_defs (graph_config_t *cfg);
27
28 int graph_add_def (graph_config_t *cfg, graph_def_t *def);
29
30 _Bool graph_matches (graph_config_t *cfg, const graph_ident_t *ident);
31
32 int graph_inst_foreach (graph_config_t *cfg,
33     inst_callback_t cb, void *user_data);
34
35 graph_instance_t *graph_inst_find_exact (graph_config_t *cfg,
36     graph_ident_t *ident);
37
38 graph_instance_t *graph_inst_find_matching (graph_config_t *cfg,
39     const graph_ident_t *ident);
40
41 int graph_inst_search (graph_config_t *cfg, const char *term,
42     graph_inst_callback_t callback, void *user_data);
43
44 int graph_compare (graph_config_t *cfg, const graph_ident_t *ident);
45
46 int graph_clear_instances (graph_config_t *cfg);
47
48 int graph_get_rrdargs (graph_config_t *cfg, graph_instance_t *inst,
49     str_array_t *args);
50
51 #endif /* GRAPH_H */
52 /* vim: set sw=2 sts=2 et fdm=marker : */