src/graph_instance.[ch]: Implement "inst_data_to_json".
[collection4.git] / src / graph_def.h
1 /**
2  * collection4 - graph_def.h
3  * Copyright (C) 2010  Florian octo Forster
4  * 
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * 
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  * 
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA  02110-1301  USA
19  *
20  * Authors:
21  *   Florian octo Forster <ff at octo.it>
22  **/
23
24 #ifndef GRAPH_DEF_H
25 #define GRAPH_DEF_H 1
26
27 #include <yajl/yajl_gen.h>
28
29 #include "graph_types.h"
30 #include "utils_array.h"
31 #include "oconfig.h"
32 #include "rrd_args.h"
33
34 graph_def_t *def_create (graph_config_t *cfg, graph_ident_t *ident,
35     const char *ds_name);
36
37 void def_destroy (graph_def_t *def);
38
39 int def_config (graph_config_t *cfg, const oconfig_item_t *ci);
40
41 int def_append (graph_def_t *head, graph_def_t *def);
42
43 graph_def_t *def_search (graph_def_t *head, graph_ident_t *ident,
44     const char *ds_name);
45
46 _Bool def_matches (graph_def_t *def, graph_ident_t *ident);
47
48 int def_foreach (graph_def_t *def, def_callback_t callback, void *user_data);
49
50 int def_get_rrdargs (graph_def_t *def, graph_ident_t *ident,
51     rrd_args_t *args);
52
53 int def_to_json (const graph_def_t *def, yajl_gen handler);
54
55 /* vim: set sw=2 sts=2 et fdm=marker : */
56 #endif