4 #include "graph_types.h"
5 #include "graph_ident.h"
7 #include "utils_array.h"
12 graph_config_t *graph_create (const graph_ident_t *selector);
14 void graph_destroy (graph_config_t *graph);
16 int graph_config_add (const oconfig_item_t *ci);
18 int graph_add_file (graph_config_t *cfg, const graph_ident_t *file);
20 int graph_get_title (graph_config_t *cfg,
21 char *buffer, size_t buffer_size);
23 int graph_get_params (graph_config_t *cfg, char *buffer, size_t buffer_size);
25 graph_ident_t *graph_get_selector (graph_config_t *cfg);
27 graph_def_t *graph_get_defs (graph_config_t *cfg);
29 int graph_add_def (graph_config_t *cfg, graph_def_t *def);
31 _Bool graph_matches_ident (graph_config_t *cfg, const graph_ident_t *ident);
33 /* Compares the given string with the appropriate field of the selector. If the
34 * selector field is "/all/" or "/any/", returns true without checking the
35 * instances. See "graph_inst_search_field" for finding all matching instances.
37 _Bool graph_matches_field (graph_config_t *cfg,
38 graph_ident_field_t field, const char *field_value);
40 int graph_inst_foreach (graph_config_t *cfg,
41 inst_callback_t cb, void *user_data);
43 graph_instance_t *graph_inst_find_exact (graph_config_t *cfg,
44 graph_ident_t *ident);
46 graph_instance_t *graph_inst_find_matching (graph_config_t *cfg,
47 const graph_ident_t *ident);
49 int graph_inst_search (graph_config_t *cfg, const char *term,
50 graph_inst_callback_t callback, void *user_data);
52 /* Iterates over all instances and calls "inst_matches_field". If that method
53 * returns true, calls the callback with the graph and instance pointers. */
54 int graph_inst_search_field (graph_config_t *cfg,
55 graph_ident_field_t field, const char *field_value,
56 graph_inst_callback_t callback, void *user_data);
58 int graph_compare (graph_config_t *cfg, const graph_ident_t *ident);
60 int graph_clear_instances (graph_config_t *cfg);
62 int graph_get_rrdargs (graph_config_t *cfg, graph_instance_t *inst,
66 /* vim: set sw=2 sts=2 et fdm=marker : */