X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd.h;h=b2c81c499ecc970f213cb137a9541f7fa41ae29b;hp=1a83746158085452ed10b4bef784742c571b7a2c;hb=e1c12d5c14b4a716ea999204cedb13e98466ff15;hpb=5493345a7b1e79ef80e6f333b3b5162b976390b9 diff --git a/src/rrd.h b/src/rrd.h index 1a83746..b2c81c4 100644 --- a/src/rrd.h +++ b/src/rrd.h @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.23 Copyright by Tobi Oetiker, 1997-2007 + * RRDtool 1.3rc3 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrdlib.h Public header file for librrd ***************************************************************************** @@ -57,6 +57,21 @@ extern "C" { #include #include /* for FILE */ + +/* Formerly rrd_nan_inf.h */ +#ifndef DNAN +# define DNAN set_to_DNAN() +#endif + +#ifndef DINF +# define DINF set_to_DINF() +#endif + double set_to_DNAN( + void); + double set_to_DINF( + void); +/* end of rrd_nan_inf.h */ + /* Transplanted from rrd_format.h */ typedef double rrd_value_t; /* the data storage type is * double */ @@ -71,6 +86,35 @@ extern "C" { off_t pos; /* current pos in file */ } rrd_file_t; +/* rrd info interface */ + typedef struct rrd_blob_t { + unsigned long size; /* size of the blob */ + unsigned char *ptr; /* pointer */ + } rrd_blob_t; + + enum info_type { RD_I_VAL = 0, + RD_I_CNT, + RD_I_STR, + RD_I_INT, + RD_I_BLO + }; + + typedef union infoval { + unsigned long u_cnt; + rrd_value_t u_val; + char *u_str; + int u_int; + struct rrd_blob_t u_blo; + } infoval; + + typedef struct info_t { + char *key; + enum info_type type; + union infoval value; + struct info_t *next; + } info_t; + + /* main function blocks */ int rrd_create( int, @@ -87,16 +131,9 @@ extern "C" { FILE *, double *, double *); - - unsigned char *rrd_graph_in_memory( - int argc, - char **argv, - char ***prdata, - int *xsize, - int *ysize, - double *ymin, - double *ymax, - size_t * img_size); + info_t *rrd_graph_v( + int, + char **); int rrd_fetch( int,