X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd.h;h=5f4145bde9a5d81c32a0156e354e18b65d795a06;hb=b005d2cbe00924ddfcb8766d49201e4044abfc21;hp=3030788e6451dc78dbf65a6cf0e9d6f78bf030c6;hpb=4711139e9d9dae2bd34ce56bf1e77778d375c5fb;p=rrdtool.git diff --git a/src/rrd.h b/src/rrd.h index 3030788..5f4145b 100644 --- a/src/rrd.h +++ b/src/rrd.h @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.99907080300 Copyright by Tobi Oetiker, 1997-2007 + * RRDtool 1.3rc7 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrdlib.h Public header file for librrd ***************************************************************************** @@ -66,8 +66,10 @@ extern "C" { #ifndef DINF # define DINF set_to_DINF() #endif -double set_to_DNAN(void); -double set_to_DINF(void); + double set_to_DNAN( + void); + double set_to_DINF( + void); /* end of rrd_nan_inf.h */ /* Transplanted from rrd_format.h */ @@ -84,6 +86,35 @@ double set_to_DINF(void); 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, @@ -100,16 +131,9 @@ double set_to_DINF(void); 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, @@ -207,10 +231,8 @@ double set_to_DINF(void); /* END parsetime.h */ struct rrd_context { - int len; - int errlen; - char *lib_errstr; - char *rrd_error; + char lib_errstr[256]; + char rrd_error[4096]; }; /* returns the current per-thread rrd_context */