summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1b6d2fd)
raw | patch | inline | side by side (parent: 1b6d2fd)
author | Florian Forster <ff@octo.it> | |
Fri, 25 Jun 2010 09:31:11 +0000 (11:31 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 25 Jun 2010 09:31:11 +0000 (11:31 +0200) |
src/graph_instance.c | patch | blob | history | |
src/graph_instance.h | patch | blob | history |
diff --git a/src/graph_instance.c b/src/graph_instance.c
index 671430ab6ab711c0408ab35b4825aff58f0d6f97..2d12873e7624b037852bc40e685ed7ff2b0bb711 100644 (file)
--- a/src/graph_instance.c
+++ b/src/graph_instance.c
return (inst);
} /* }}} graph_instance_t *inst_get_selected */
+int inst_get_all_selected (graph_config_t *cfg, /* {{{ */
+ graph_inst_callback_t callback, void *user_data)
+{
+ graph_ident_t *ident;
+ int status;
+
+ if ((cfg == NULL) || (callback == NULL))
+ return (EINVAL);
+
+ ident = inst_get_selector_from_params ();
+ if (ident == NULL)
+ {
+ fprintf (stderr, "inst_get_all_selected: "
+ "inst_get_selector_from_params failed\n");
+ return (EINVAL);
+ }
+
+ status = graph_inst_find_all_matching (cfg, ident, callback, user_data);
+
+ ident_destroy (ident);
+ return (status);
+} /* }}} int inst_get_all_selected */
+
int inst_get_rrdargs (graph_config_t *cfg, /* {{{ */
graph_instance_t *inst,
str_array_t *args)
diff --git a/src/graph_instance.h b/src/graph_instance.h
index b1d2df9c043301ec89838117e2b351cdeb8d8a63..a6e7462163e5aae3dd47f6ca12bfbdd912816778 100644 (file)
--- a/src/graph_instance.h
+++ b/src/graph_instance.h
graph_instance_t *inst_get_selected (graph_config_t *cfg);
+int inst_get_all_selected (graph_config_t *cfg,
+ graph_inst_callback_t callback, void *user_data);
+
int inst_get_params (graph_config_t *cfg, graph_instance_t *inst,
char *buffer, size_t buffer_size);