1 #include <bindings.dsl.h>
2 #include <apr_memcache.h>
4 module Bindings.APR.MemCache where
7 import Bindings.APR.ErrNo
8 import Bindings.APR.Hash
9 import Bindings.APR.Network.IO
10 import Bindings.APR.Pools
11 import Bindings.APR.ResList
12 import Bindings.APR.Thread.Mutex
13 import Bindings.APR.Time
15 #integral_t apr_memcache_server_status_t
16 #num APR_MC_SERVER_LIVE
17 #num APR_MC_SERVER_DEAD
19 #opaque_t apr_memcache_conn_t
21 #starttype struct apr_memcache_server_t
22 # field host , Ptr CChar
23 # field port , <apr_port_t>
24 # field status, <apr_memcache_server_status_t>
26 # field conns, Ptr <apr_reslist_t>
28 # field conn, Ptr <apr_memcache_conn_t>
30 # field p , Ptr <apr_pool_t>
32 # field lock, Ptr <apr_thread_mutex_t>
34 # field btime , <apr_time_t>
37 #callback apr_memcache_hash_func , Ptr () -> Ptr CChar -> <apr_size_t> -> IO <apr_uint32_t>
38 #callback apr_memcache_server_func, Ptr () -> Ptr <apr_memcache_t> -> <apr_uint32_t> -> IO (Ptr <apr_memcache_server_t>)
40 #starttype struct apr_memcache_t
41 # field flags , <apr_uint32_t>
42 # field nalloc , <apr_uint16_t>
43 # field ntotal , <apr_uint16_t>
44 # field live_servers, Ptr (Ptr <apr_memcache_server_t>)
45 # field p , Ptr <apr_pool_t>
46 # field hash_func , <apr_memcache_hash_func>
47 # field server_baton, Ptr ()
48 # field server_func , <apr_memcache_server_func>
51 #starttype apr_memcache_value_t
52 # field status, <apr_status_t>
53 # field key , Ptr CChar
54 # field len , <apr_size_t>
56 # field flags , <apr_uint16_t>
59 #ccall apr_memcache_hash , Ptr <apr_memcache_t> -> Ptr CChar -> <apr_size_t> -> IO <apr_uint32_t>
60 #ccall apr_memcache_hash_crc32 , Ptr () -> Ptr CChar -> <apr_size_t> -> IO <apr_uint32_t>
61 #ccall apr_memcache_hash_default, Ptr () -> Ptr CChar -> <apr_size_t> -> IO <apr_uint32_t>
63 #ccall apr_memcache_find_server_hash , Ptr <apr_memcache_t> -> <apr_uint32_t> -> IO (Ptr <apr_memcache_server_t>)
64 #ccall apr_memcache_find_server_hash_default, Ptr () -> Ptr <apr_memcache_t> -> <apr_uint32_t> -> IO (Ptr <apr_memcache_server_t>)
66 #ccall apr_memcache_add_server , Ptr <apr_memcache_t> -> Ptr <apr_memcache_server_t> -> IO <apr_status_t>
67 #ccall apr_memcache_find_server , Ptr <apr_memcache_t> -> Ptr CChar -> <apr_port_t> -> IO (Ptr <apr_memcache_server_t>)
68 #ccall apr_memcache_enable_server , Ptr <apr_memcache_t> -> Ptr <apr_memcache_server_t> -> IO <apr_status_t>
69 #ccall apr_memcache_disable_server , Ptr <apr_memcache_t> -> Ptr <apr_memcache_server_t> -> IO <apr_status_t>
70 #ccall apr_memcache_server_create , Ptr <apr_pool_t> -> Ptr CChar -> <apr_port_t> -> <apr_uint32_t> -> <apr_uint32_t> -> <apr_uint32_t> -> <apr_uint32_t> -> Ptr (Ptr <apr_memcache_server_t>) -> IO <apr_status_t>
71 #ccall apr_memcache_create , Ptr <apr_pool_t> -> <apr_uint16_t> -> <apr_uint32_t> -> Ptr (Ptr <apr_memcache_t>) -> IO <apr_status_t>
72 #ccall apr_memcache_getp , Ptr <apr_memcache_t> -> Ptr <apr_pool_t> -> Ptr CChar -> Ptr (Ptr CChar) -> Ptr <apr_size_t> -> Ptr <apr_uint16_t> -> IO <apr_status_t>
73 #ccall apr_memcache_add_multget_key, Ptr <apr_pool_t> -> Ptr CChar -> Ptr (Ptr <apr_hash_t>) -> IO ()
74 #ccall apr_memcache_multgetp , Ptr <apr_memcache_t> -> Ptr <apr_pool_t> -> Ptr <apr_pool_t> -> Ptr <apr_hash_t> -> IO <apr_status_t>
75 #ccall apr_memcache_set , Ptr <apr_memcache_t> -> Ptr CChar -> Ptr CChar -> <apr_size_t> -> <apr_uint32_t> -> <apr_uint16_t> -> IO <apr_status_t>
76 #ccall apr_memcache_add , Ptr <apr_memcache_t> -> Ptr CChar -> Ptr CChar -> <apr_size_t> -> <apr_uint32_t> -> <apr_uint16_t> -> IO <apr_status_t>
77 #ccall apr_memcache_replace , Ptr <apr_memcache_t> -> Ptr CChar -> Ptr CChar -> <apr_size_t> -> <apr_uint32_t> -> <apr_uint16_t> -> IO <apr_status_t>
78 #ccall apr_memcache_delete , Ptr <apr_memcache_t> -> Ptr CChar -> <apr_uint32_t> -> IO <apr_status_t>
79 #ccall apr_memcache_incr , Ptr <apr_memcache_t> -> Ptr CChar -> <apr_int32_t> -> Ptr <apr_uint32_t> -> IO <apr_status_t>
80 #ccall apr_memcache_decr , Ptr <apr_memcache_t> -> Ptr CChar -> <apr_int32_t> -> Ptr <apr_uint32_t> -> IO <apr_status_t>
81 #ccall apr_memcache_version , Ptr <apr_memcache_server_t> -> Ptr <apr_pool_t> -> Ptr (Ptr CChar) -> IO <apr_status_t>
83 #starttype apr_memcache_stats_t
84 # field version , Ptr CChar
85 # field pid , <apr_uint32_t>
86 # field uptime , <apr_uint32_t>
87 # field time , <apr_time_t>
88 # field pointer_size , <apr_uint32_t>
89 # field rusage_user , <apr_time_t>
90 # field rusage_system, <apr_time_t>
91 # field curr_items , <apr_uint32_t>
92 # field total_items , <apr_uint32_t>
93 # field bytes , <apr_uint64_t>
94 # field curr_connections , <apr_uint32_t>
95 # field total_connections, <apr_uint32_t>
96 # field connection_structures, <apr_uint32_t>
97 # field cmd_get , <apr_uint32_t>
98 # field cmd_set , <apr_uint32_t>
99 # field get_hits , <apr_uint32_t>
100 # field get_misses , <apr_uint32_t>
101 # field evictions , <apr_uint64_t>
102 # field bytes_read , <apr_uint64_t>
103 # field bytes_written , <apr_uint64_t>
104 # field limit_maxbytes, <apr_uint32_t>
105 # field threads , <apr_uint32_t>
108 #ccall apr_memcache_stats, Ptr <apr_memcache_server_t> -> Ptr <apr_pool_t> -> Ptr (Ptr <apr_memcache_stats_t>) -> IO <apr_status_t>