src/graph{,_instance}.[ch]: Implement graph instances as an array in graph_config_t.
[collection4.git] / src / graph_instance.h
1 #ifndef GRAPH_INSTANCE_H
2 #define GRAPH_INSTANCE_H 1
3
4 #include <time.h>
5
6 #include "graph_types.h"
7 #include "utils_array.h"
8
9 /*
10  * Methods
11  */
12 graph_instance_t *inst_create (graph_config_t *cfg,
13                 const graph_ident_t *ident);
14
15 void inst_destroy (graph_instance_t *inst);
16
17 int inst_add_file (graph_instance_t *inst, const graph_ident_t *file);
18
19 graph_instance_t *inst_get_selected (graph_config_t *cfg);
20
21 int inst_get_params (graph_config_t *cfg, graph_instance_t *inst,
22     char *buffer, size_t buffer_size);
23
24 int inst_get_rrdargs (graph_config_t *cfg, graph_instance_t *inst,
25     str_array_t *args);
26
27 graph_ident_t *inst_get_selector (graph_instance_t *inst);
28
29 int inst_compare_ident (graph_instance_t *inst, const graph_ident_t *ident);
30
31 _Bool inst_matches_ident (graph_instance_t *inst, const graph_ident_t *ident);
32
33 _Bool inst_matches_string (graph_config_t *cfg, graph_instance_t *inst,
34     const char *term);
35
36 int inst_describe (graph_config_t *cfg, graph_instance_t *inst,
37     char *buffer, size_t buffer_size);
38
39 time_t inst_get_mtime (graph_instance_t *inst);
40
41 #endif /* GRAPH_INSTANCE_H */
42 /* vim: set sw=2 sts=2 et fdm=marker : */