graph_ident.[ch]: Move the graph_ident_t data structure into an own module.
[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 graph_ident_t *ident_copy_with_selector (const graph_ident_t *selector,
13     const graph_ident_t *ident, _Bool keep_all_selector);
14
15 void ident_destroy (graph_ident_t *ident);
16
17 const char *ident_get_host (graph_ident_t *ident);
18 const char *ident_get_plugin (graph_ident_t *ident);
19 const char *ident_get_plugin_instance (graph_ident_t *ident);
20 const char *ident_get_type (graph_ident_t *ident);
21 const char *ident_get_type_instance (graph_ident_t *ident);
22
23 int ident_compare (const graph_ident_t *i0,
24     const graph_ident_t *i1);
25
26 _Bool ident_matches (const graph_ident_t *selector,
27                 const graph_ident_t *ident);
28
29 char *ident_to_string (const graph_ident_t *ident);
30 char *ident_to_file (const graph_ident_t *ident);
31 char *ident_to_json (const graph_ident_t *ident);
32
33 /* vim: set sw=2 sts=2 et fdm=marker : */
34 #endif /* GRAPH_IDENT_H */