X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=graph_ident.h;h=442bcfeba499e6cd3402da090574b2d6ee63230e;hb=4568880c50d790912fb4823d0ae785e95f65cad2;hp=09f3f0782aceb7f9354e2c93395e0e8c6b33cc3e;hpb=477b8a38dc1b3d0ae5e726f765722c962b2fcb46;p=collection4.git diff --git a/graph_ident.h b/graph_ident.h index 09f3f07..442bcfe 100644 --- a/graph_ident.h +++ b/graph_ident.h @@ -1,6 +1,9 @@ #ifndef GRAPH_IDENT_H #define GRAPH_IDENT_H 1 +#define ANY_TOKEN "/any/" +#define ALL_TOKEN "/all/" + struct graph_ident_s; typedef struct graph_ident_s graph_ident_t; @@ -9,8 +12,10 @@ graph_ident_t *ident_create (const char *host, const char *type, const char *type_instance); graph_ident_t *ident_clone (const graph_ident_t *ident); +#define IDENT_FLAG_REPLACE_ALL 0x01 +#define IDENT_FLAG_REPLACE_ANY 0x02 graph_ident_t *ident_copy_with_selector (const graph_ident_t *selector, - const graph_ident_t *ident, _Bool keep_all_selector); + const graph_ident_t *ident, unsigned int flags); void ident_destroy (graph_ident_t *ident); @@ -20,6 +25,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);