rrd_info_t *info;
int status;
- cfg = graph_get_selected ();
+ cfg = gl_graph_get_selected ();
if (cfg == NULL)
- OUTPUT_ERROR ("graph_get_selected () failed.\n");
+ OUTPUT_ERROR ("gl_graph_get_selected () failed.\n");
inst = inst_get_selected (cfg);
if (inst == NULL)
return (0);
} /* }}} int gl_graph_get_title */
-graph_ident_t *gl_graph_get_selector (graph_config_t *cfg) /* {{{ */
+graph_ident_t *graph_get_selector (graph_config_t *cfg) /* {{{ */
{
if (cfg == NULL)
return (NULL);
return (ident_clone (cfg->select));
-} /* }}} graph_ident_t *gl_graph_get_selector */
+} /* }}} graph_ident_t *graph_get_selector */
-graph_instance_t *gl_graph_get_instances (graph_config_t *cfg) /* {{{ */
+graph_instance_t *graph_get_instances (graph_config_t *cfg) /* {{{ */
{
if (cfg == NULL)
return (NULL);
return (cfg->instances);
-} /* }}} graph_instance_t *gl_graph_get_instances */
+} /* }}} graph_instance_t *graph_get_instances */
-graph_def_t *gl_graph_get_defs (graph_config_t *cfg) /* {{{ */
+graph_def_t *graph_get_defs (graph_config_t *cfg) /* {{{ */
{
if (cfg == NULL)
return (NULL);
return (cfg->defs);
-} /* }}} graph_def_t *gl_graph_get_defs */
+} /* }}} graph_def_t *graph_get_defs */
-int gl_graph_add_def (graph_config_t *cfg, graph_def_t *def) /* {{{ */
+int graph_add_def (graph_config_t *cfg, graph_def_t *def) /* {{{ */
{
if ((cfg == NULL) || (def == NULL))
return (EINVAL);
}
return (def_append (cfg->defs, def));
-} /* }}} int gl_graph_add_def */
+} /* }}} int graph_add_def */
_Bool graph_matches (graph_config_t *cfg, const graph_ident_t *ident) /* {{{ */
{
int graph_add_file (graph_config_t *cfg, const graph_ident_t *file);
-int gl_graph_get_title (graph_config_t *cfg,
+int graph_get_title (graph_config_t *cfg,
char *buffer, size_t buffer_size);
-graph_ident_t *gl_graph_get_selector (graph_config_t *cfg);
+graph_ident_t *graph_get_selector (graph_config_t *cfg);
-graph_instance_t *gl_graph_get_instances (graph_config_t *cfg);
+graph_instance_t *graph_get_instances (graph_config_t *cfg);
-graph_def_t *gl_graph_get_defs (graph_config_t *cfg);
+graph_def_t *graph_get_defs (graph_config_t *cfg);
-int gl_graph_add_def (graph_config_t *cfg, graph_def_t *def);
+int graph_add_def (graph_config_t *cfg, graph_def_t *def);
_Bool graph_matches (graph_config_t *cfg, const graph_ident_t *ident);
graph_def_t *def;
int i;
- ident = gl_graph_get_selector (cfg);
+ ident = graph_get_selector (cfg);
if (ident == NULL)
{
- fprintf (stderr, "def_config_get_obj: gl_graph_get_selector failed");
+ fprintf (stderr, "def_config_get_obj: graph_get_selector failed");
return (NULL);
}
if ((cfg == NULL) || (ident == NULL) || (ds_name == NULL))
return (NULL);
- selector = gl_graph_get_selector (cfg);
+ selector = graph_get_selector (cfg);
if (selector == NULL)
return (NULL);
child->key);
}
- return (gl_graph_add_def (cfg, def));
+ return (graph_add_def (cfg, def));
} /* }}} int def_config */
int def_append (graph_def_t *head, graph_def_t *def) /* {{{ */
return (NULL);
memset (i, 0, sizeof (*i));
- selector = gl_graph_get_selector (cfg);
+ selector = graph_get_selector (cfg);
if (selector == NULL)
{
- fprintf (stderr, "inst_create: gl_graph_get_selector failed\n");
+ fprintf (stderr, "inst_create: graph_get_selector failed\n");
free (i);
return (NULL);
}
graph_instance_t *inst;
if (cfg == NULL)
- cfg = graph_get_selected ();
+ cfg = gl_graph_get_selected ();
if (cfg == NULL)
{
ident = ident_create (host, plugin, plugin_instance, type, type_instance);
- for (inst = gl_graph_get_instances (cfg); inst != NULL; inst = inst->next)
+ for (inst = graph_get_instances (cfg); inst != NULL; inst = inst->next)
{
if (ident_compare (ident, inst->select) != 0)
continue;
}
#endif
- defs = gl_graph_get_defs (cfg);
+ defs = graph_get_defs (cfg);
if (defs == NULL)
{
defs = inst_get_default_defs (cfg, inst);
|| (buffer == NULL) || (buffer_size < 1))
return (EINVAL);
- cfg_select = gl_graph_get_selector (cfg);
+ cfg_select = graph_get_selector (cfg);
if (cfg_select == NULL)
{
- fprintf (stderr, "inst_get_params: gl_graph_get_selector failed");
+ fprintf (stderr, "inst_get_params: graph_get_selector failed");
return (-1);
}
return (0);
} /* }}} int gl_graph_get_all */
-graph_config_t *graph_get_selected (void) /* {{{ */
+graph_config_t *gl_graph_get_selected (void) /* {{{ */
{
const char *host = get_part_from_param ("graph_host", "host");
const char *plugin = get_part_from_param ("graph_plugin", "plugin");
ident_destroy (ident);
return (NULL);
-} /* }}} graph_config_t *graph_get_selected */
+} /* }}} graph_config_t *gl_graph_get_selected */
/* gl_instance_get_all, gl_graph_instance_get_all {{{ */
struct gl_inst_callback_data /* {{{ */
if ((cfg == NULL) || (callback == NULL))
return (EINVAL);
- return (inst_foreach (gl_graph_get_instances (cfg),
+ return (inst_foreach (graph_get_instances (cfg),
gl_inst_callback_handler, &data));
} /* }}} int gl_graph_instance_get_all */
int gl_graph_get_all (gl_cfg_callback callback,
void *user_data);
-graph_config_t *graph_get_selected (void);
+graph_config_t *gl_graph_get_selected (void);
int gl_graph_instance_get_all (graph_config_t *cfg,
gl_inst_callback callback, void *user_data);