X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=graph_ident.h;h=5107011ed3dec9d9848ee874895c3cdf32df9bd5;hb=7a6beaf075a32bfd93d314c00179f258c8e43ee5;hp=abc451db0edc95ee005f11fe93e7b2ef8b2dcbcd;hpb=379b04abccb88f539f4532c825537831cc6660dc;p=collection4.git diff --git a/graph_ident.h b/graph_ident.h index abc451d..5107011 100644 --- a/graph_ident.h +++ b/graph_ident.h @@ -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);