]> gitweb @ CieloNegro.org - bindings-librrd.git/blob - Bindings/Librrd/Client.hsc
rrdc_flush_if_daemon() was not really exported
[bindings-librrd.git] / Bindings / Librrd / Client.hsc
1 #include <bindings.dsl.h>
2 #include <HsBaseConfig.h>
3 #include <rrd_client.h>
4
5 -- |<http://oss.oetiker.ch/rrdtool/doc/librrd.en.html>
6 -- 
7 -- <http://oss.oetiker.ch/rrdtool/doc/rrdcached.en.html>
8
9 module Bindings.Librrd.Client where
10 #strict_import
11
12 #cinline RRDCACHED_DEFAULT_ADDRESS, CString
13 #cinline RRDCACHED_DEFAULT_PORT   , CString
14 #cinline ENV_RRDCACHED_ADDRESS    , CString
15
16 #ccall rrdc_connect     , CString -> IO CInt
17 #ccall rrdc_is_connected, CString -> IO CInt
18 #ccall rrdc_disconnect  , IO CInt
19
20 #ccall rrdc_update, CString -> CInt -> Ptr CString -> IO CInt
21
22 #ccall rrdc_flush          , CString -> IO CInt
23 -- This one is not exported from the shared library.
24 -- #ccall rrdc_flush_if_daemon, CString -> CString -> IO CInt
25
26 -- Helper definitions for rrdc_stats_t
27 #num RRDC_STATS_TYPE_GAUGE
28 #num RRDC_STATS_TYPE_COUNTER
29
30 #starttype struct rrdc_stats_s
31 #field name , CString
32 #field type , Word16
33 #union_field value.counter, Word64
34 #union_field value.gauge  , CDouble
35 #field next , Ptr <rrdc_stats_s>
36 #stoptype
37 #synonym_t rrdc_stats_t, <rrdc_stats_s>
38
39 #ccall rrdc_stats_get , Ptr (Ptr <rrdc_stats_t>) -> IO CInt
40 #ccall rrdc_stats_free, Ptr <rrdc_stats_t> -> IO ()