X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=bindings-librrd.git;a=blobdiff_plain;f=Bindings%2FLibrrd%2FClient.hsc;fp=Bindings%2FLibrrd%2FClient.hsc;h=e1fb6e257e5574a4795f0bf4b67ffd5a82a927f1;hp=0000000000000000000000000000000000000000;hb=c92e8d9597bf2c453a7c586439f5e8ebb8aee803;hpb=11431e2090eb04af77645232df98dea64303736b diff --git a/Bindings/Librrd/Client.hsc b/Bindings/Librrd/Client.hsc new file mode 100644 index 0000000..e1fb6e2 --- /dev/null +++ b/Bindings/Librrd/Client.hsc @@ -0,0 +1,39 @@ +#include +#include +#include + +-- | +-- +-- + +module Bindings.Librrd.Client where +#strict_import + +#cinline RRDCACHED_DEFAULT_ADDRESS, CString +#cinline RRDCACHED_DEFAULT_PORT , CString +#cinline ENV_RRDCACHED_ADDRESS , CString + +#ccall rrdc_connect , CString -> IO CInt +#ccall rrdc_is_connected, CString -> IO CInt +#ccall rrdc_disconnect , IO CInt + +#ccall rrdc_update, CString -> CInt -> Ptr CString -> IO CInt + +#ccall rrdc_flush , CString -> IO CInt +#ccall rrdc_flush_if_daemon, CString -> CString -> IO CInt + +-- Helper definitions for rrdc_stats_t +#num RRDC_STATS_TYPE_GAUGE +#num RRDC_STATS_TYPE_COUNTER + +#starttype struct rrdc_stats_s +#field name , CString +#field type , Word16 +#union_field value.counter, Word64 +#union_field value.gauge , CDouble +#field next , Ptr +#stoptype +#synonym_t rrdc_stats_t, + +#ccall rrdc_stats_get , Ptr (Ptr ) -> IO CInt +#ccall rrdc_stats_free, Ptr -> IO ()