4 #include "graph_types.h"
5 #include "graph_ident.h"
8 #include "utils_array.h"
13 graph_config_t *graph_create (const graph_ident_t *selector);
15 void graph_destroy (graph_config_t *graph);
17 int graph_config_add (const oconfig_item_t *ci);
19 int graph_add_file (graph_config_t *cfg, const graph_ident_t *file);
21 int graph_get_title (graph_config_t *cfg,
22 char *buffer, size_t buffer_size);
24 int graph_get_params (graph_config_t *cfg, char *buffer, size_t buffer_size);
26 graph_ident_t *graph_get_selector (graph_config_t *cfg);
28 graph_def_t *graph_get_defs (graph_config_t *cfg);
30 int graph_add_def (graph_config_t *cfg, graph_def_t *def);
32 _Bool graph_matches_ident (graph_config_t *cfg, const graph_ident_t *ident);
34 /* Compares the given string with the appropriate field of the selector. If the
35 * selector field is "/all/" or "/any/", returns true without checking the
36 * instances. See "graph_inst_search_field" for finding all matching instances.
38 _Bool graph_matches_field (graph_config_t *cfg,
39 graph_ident_field_t field, const char *field_value);
41 int graph_inst_foreach (graph_config_t *cfg,
42 inst_callback_t cb, void *user_data);
44 graph_instance_t *graph_inst_find_exact (graph_config_t *cfg,
45 graph_ident_t *ident);
47 graph_instance_t *graph_inst_find_matching (graph_config_t *cfg,
48 const graph_ident_t *ident);
50 int graph_inst_find_all_matching (graph_config_t *cfg,
51 const graph_ident_t *ident,
52 graph_inst_callback_t callback, void *user_data);
54 int graph_inst_search (graph_config_t *cfg, const char *term,
55 graph_inst_callback_t callback, void *user_data);
57 /* Iterates over all instances and calls "inst_matches_field". If that method
58 * returns true, calls the callback with the graph and instance pointers. */
59 int graph_inst_search_field (graph_config_t *cfg,
60 graph_ident_field_t field, const char *field_value,
61 graph_inst_callback_t callback, void *user_data);
63 int graph_compare (graph_config_t *cfg, const graph_ident_t *ident);
65 int graph_clear_instances (graph_config_t *cfg);
67 int graph_get_rrdargs (graph_config_t *cfg, graph_instance_t *inst,
71 /* vim: set sw=2 sts=2 et fdm=marker : */