summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2ab3d5b)
raw | patch | inline | side by side (parent: 2ab3d5b)
author | Florian Forster <ff@octo.it> | |
Wed, 23 Jun 2010 07:07:40 +0000 (09:07 +0200) | ||
committer | Florian Forster <octo@verplant.org> | |
Wed, 23 Jun 2010 07:07:40 +0000 (09:07 +0200) |
src/graph_list.c | patch | blob | history | |
src/graph_list.h | patch | blob | history |
diff --git a/src/graph_list.c b/src/graph_list.c
index 0dc00063f06a9cd01cc41a34a555b824dfca3eb1..de80b3b63c2647c534b2ffe92dd0824fc7776ae7 100644 (file)
--- a/src/graph_list.c
+++ b/src/graph_list.c
return (0);
} /* }}} int gl_search */
+int gl_search_field (graph_ident_field_t field, /* {{{ */
+ const char *field_value,
+ graph_inst_callback_t callback, void *user_data)
+{
+ size_t i;
+
+ if ((field_value == NULL) || (callback == NULL))
+ return (EINVAL);
+
+ for (i = 0; i < gl_active_num; i++)
+ {
+ int status;
+
+ status = graph_inst_search_field (gl_active[i],
+ field, field_value,
+ /* callback = */ callback,
+ /* user data = */ user_data);
+ if (status != 0)
+ return (status);
+ }
+
+ return (0);
+} /* }}} int gl_search_field */
+
int gl_update (void) /* {{{ */
{
time_t now;
diff --git a/src/graph_list.h b/src/graph_list.h
index e6b6888cdbf528724ac18a310dd8a70f9d8fcfd8..5d0c917bdc9714ed3efc3aeff19a8e279b3a81d3 100644 (file)
--- a/src/graph_list.h
+++ b/src/graph_list.h
#define GRAPH_LIST_H 1
#include "graph_types.h"
-#include "graph.h"
-#include "graph_instance.h"
+#include "graph_ident.h"
/*
* Functions
int gl_search (const char *search, graph_inst_callback_t callback,
void *user_data);
+int gl_search_field (graph_ident_field_t field, const char *field_value,
+ graph_inst_callback_t callback, void *user_data);
+
int gl_update (void);
#endif /* GRAPH_LIST_H */