First attempt at a search infrastructure.
[collection4.git] / graph_instance.h
1 #ifndef GRAPH_INSTANCE_H
2 #define GRAPH_INSTANCE_H 1
3
4 /*
5  * Data types
6  */
7 #include "graph_types.h"
8 #include "utils_array.h"
9
10 /*
11  * Callback types
12  */
13 /*
14  * Methods
15  */
16 graph_instance_t *inst_create (graph_config_t *cfg,
17                 const graph_ident_t *ident);
18
19 void inst_destroy (graph_instance_t *inst);
20
21 int inst_add_file (graph_instance_t *inst, const graph_ident_t *file);
22
23 graph_instance_t *inst_get_selected (graph_config_t *cfg);
24
25 int inst_get_params (graph_config_t *cfg, graph_instance_t *inst,
26     char *buffer, size_t buffer_size);
27
28 int inst_get_rrdargs (graph_config_t *cfg, graph_instance_t *inst,
29     str_array_t *args);
30
31 graph_ident_t *inst_get_selector (graph_instance_t *inst);
32
33 int inst_append (graph_instance_t *head, graph_instance_t *inst);
34
35 int inst_foreach (graph_instance_t *inst,
36                 inst_callback_t cb, void *user_data);
37
38 int inst_search (graph_config_t *cfg, graph_instance_t *inst,
39     const char *term, inst_callback_t cb,
40     void *user_data);
41
42 graph_instance_t *inst_find_matching (graph_instance_t *inst,
43     const graph_ident_t *ident);
44
45 int inst_describe (graph_config_t *cfg, graph_instance_t *inst,
46     char *buffer, size_t buffer_size);
47
48 #endif /* GRAPH_INSTANCE_H */
49 /* vim: set sw=2 sts=2 et fdm=marker : */