X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fgraph_def.h;h=ed9a24c11b28ed800466fbf94a23b8d009cdff2f;hb=2ea55b3be5e18fc58050670f9419f35d66ba2ec8;hp=b2cd2282c50a909d44aec56bb06cf9cf9fa2c8d3;hpb=0ab3085f89e64eecd67d3179ea87f0463e918a10;p=collection4.git diff --git a/src/graph_def.h b/src/graph_def.h index b2cd228..ed9a24c 100644 --- a/src/graph_def.h +++ b/src/graph_def.h @@ -1,16 +1,35 @@ +/** + * collection4 - graph_def.h + * Copyright (C) 2010 Florian octo Forster + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + * + * Authors: + * Florian octo Forster + **/ + #ifndef GRAPH_DEF_H #define GRAPH_DEF_H 1 -struct graph_def_s; -typedef struct graph_def_s graph_def_t; - -typedef int (*def_callback_t) (graph_def_t *def, - void *user_data); +#include -#include "graph.h" -#include "graph_ident.h" +#include "graph_types.h" #include "utils_array.h" #include "oconfig.h" +#include "rrd_args.h" graph_def_t *def_create (graph_config_t *cfg, graph_ident_t *ident, const char *ds_name); @@ -29,7 +48,9 @@ _Bool def_matches (graph_def_t *def, graph_ident_t *ident); int def_foreach (graph_def_t *def, def_callback_t callback, void *user_data); int def_get_rrdargs (graph_def_t *def, graph_ident_t *ident, - str_array_t *args); + rrd_args_t *args); + +int def_to_json (const graph_def_t *def, yajl_gen handler); /* vim: set sw=2 sts=2 et fdm=marker : */ #endif