graph_list.c: Improve error handling in one little case.
[collection4.git] / graph_ident.h
1 #ifndef GRAPH_IDENT_H
2 #define GRAPH_IDENT_H 1
3
4 struct graph_ident_s;
5 typedef struct graph_ident_s graph_ident_t;
6
7 graph_ident_t *ident_create (const char *host,
8     const char *plugin, const char *plugin_instance,
9     const char *type, const char *type_instance);
10 graph_ident_t *ident_clone (const graph_ident_t *ident);
11
12 #define IDENT_FLAG_REPLACE_ALL 0x01
13 #define IDENT_FLAG_REPLACE_ANY 0x02
14 graph_ident_t *ident_copy_with_selector (const graph_ident_t *selector,
15     const graph_ident_t *ident, unsigned int flags);
16
17 void ident_destroy (graph_ident_t *ident);
18
19 const char *ident_get_host (graph_ident_t *ident);
20 const char *ident_get_plugin (graph_ident_t *ident);
21 const char *ident_get_plugin_instance (graph_ident_t *ident);
22 const char *ident_get_type (graph_ident_t *ident);
23 const char *ident_get_type_instance (graph_ident_t *ident);
24
25 int ident_compare (const graph_ident_t *i0,
26     const graph_ident_t *i1);
27
28 _Bool ident_matches (const graph_ident_t *selector,
29                 const graph_ident_t *ident);
30
31 char *ident_to_string (const graph_ident_t *ident);
32 char *ident_to_file (const graph_ident_t *ident);
33 char *ident_to_json (const graph_ident_t *ident);
34
35 /* vim: set sw=2 sts=2 et fdm=marker : */
36 #endif /* GRAPH_IDENT_H */