6e9ae07fb0e2cb03e459173bd3d6030c3d4c15ba
[collection4.git] / graph.h
1 #ifndef GRAPH_H
2 #define GRAPH_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 "oconfig.h"
14 #include "utils_array.h"
15
16 /*
17  * Functions
18  */
19 graph_config_t *graph_create (const graph_ident_t *selector);
20
21 void graph_destroy (graph_config_t *graph);
22
23 int graph_config_add (const oconfig_item_t *ci);
24
25 int graph_add_file (graph_config_t *cfg, const graph_ident_t *file);
26
27 int graph_get_title (graph_config_t *cfg,
28     char *buffer, size_t buffer_size);
29
30 graph_ident_t *graph_get_selector (graph_config_t *cfg);
31
32 graph_instance_t *graph_get_instances (graph_config_t *cfg);
33
34 graph_def_t *graph_get_defs (graph_config_t *cfg);
35
36 int graph_add_def (graph_config_t *cfg, graph_def_t *def);
37
38 _Bool graph_matches (graph_config_t *cfg, const graph_ident_t *ident);
39
40 int graph_compare (graph_config_t *cfg, const graph_ident_t *ident);
41
42 int graph_clear_instances (graph_config_t *cfg);
43
44 int graph_get_rrdargs (graph_config_t *cfg, graph_instance_t *inst,
45     str_array_t *args);
46
47 #endif /* GRAPH_H */
48 /* vim: set sw=2 sts=2 et fdm=marker : */