collection.conf: Configure the "memory" graph.
[collection4.git] / graph_ident.h
index abc451d..5107011 100644 (file)
@@ -1,6 +1,12 @@
 #ifndef GRAPH_IDENT_H
 #define GRAPH_IDENT_H 1
 
+#define ANY_TOKEN "/any/"
+#define ALL_TOKEN "/all/"
+
+#define IS_ANY(str) (((str) != NULL) && (strcasecmp (ANY_TOKEN, (str)) == 0))
+#define IS_ALL(str) (((str) != NULL) && (strcasecmp (ALL_TOKEN, (str)) == 0))
+
 struct graph_ident_s;
 typedef struct graph_ident_s graph_ident_t;
 
@@ -22,6 +28,14 @@ const char *ident_get_plugin_instance (graph_ident_t *ident);
 const char *ident_get_type (graph_ident_t *ident);
 const char *ident_get_type_instance (graph_ident_t *ident);
 
+int ident_set_host (graph_ident_t *ident, const char *host);
+int ident_set_plugin (graph_ident_t *ident, const char *plugin);
+int ident_set_plugin_instance (graph_ident_t *ident,
+    const char *plugin_instance);
+int ident_set_type (graph_ident_t *ident, const char *type);
+int ident_set_type_instance (graph_ident_t *ident,
+    const char *type_instance);
+
 int ident_compare (const graph_ident_t *i0,
     const graph_ident_t *i1);