X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_client.h;h=58f5473c7cf4d3becefa8dcf6a7792350df35035;hb=46a2db0465372eae273b1ff827e465a779339198;hp=1776c2b3fcde3049e9e83e7570fd0796284209a3;hpb=a12627275ff8487174cbb907a066f62a00b6ae44;p=rrdtool.git diff --git a/src/rrd_client.h b/src/rrd_client.h index 1776c2b..58f5473 100644 --- a/src/rrd_client.h +++ b/src/rrd_client.h @@ -1,6 +1,6 @@ /** * RRDTool - src/rrd_client.h - * Copyright (C) 2008 Florian octo Forster + * Copyright (C) 2008-2010 Florian octo Forster * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -22,7 +22,28 @@ #ifndef __RRD_CLIENT_H #define __RRD_CLIENT_H 1 -#include +#ifndef WIN32 +# ifdef HAVE_STDINT_H +# include +# else +# ifdef HAVE_INTTYPES_H +# include +# else +# error "you should have stdint.h or inttypes.h to compile this" +# endif +# endif +#else +# include + typedef signed char int8_t; + typedef unsigned char uint8_t; + typedef signed int int16_t; + typedef unsigned int uint16_t; + typedef signed long int int32_t; + typedef unsigned long int uint32_t; + typedef signed long long int int64_t; + typedef unsigned long long int uint64_t; +#endif + #ifndef RRDCACHED_DEFAULT_ADDRESS # define RRDCACHED_DEFAULT_ADDRESS "unix:/tmp/rrdcached.sock" @@ -31,6 +52,10 @@ #define RRDCACHED_DEFAULT_PORT "42217" #define ENV_RRDCACHED_ADDRESS "RRDCACHED_ADDRESS" + +// Windows version has no daemon/client support + +#ifndef WIN32 int rrdc_connect (const char *addr); int rrdc_is_connected(const char *daemon_addr); int rrdc_disconnect (void); @@ -41,6 +66,21 @@ int rrdc_update (const char *filename, int values_num, int rrdc_flush (const char *filename); int rrdc_flush_if_daemon (const char *opt_daemon, const char *filename); +int rrdc_fetch (const char *filename, + const char *cf, + time_t *ret_start, time_t *ret_end, + unsigned long *ret_step, + unsigned long *ret_ds_num, + char ***ret_ds_names, + rrd_value_t **ret_data); + +#else +# define rrdc_flush_if_daemon(a,b) 0 +# define rrdc_connect(a) 0 +# define rrdc_is_connected(a) 0 +# define rrdc_flush(a) 0 +# define rrdc_update(a,b,c) 0 +#endif struct rrdc_stats_s {