2 * Summary: Result structure used for libmemcached.
4 * Copy: See Copyright for the status of this software.
9 #ifndef __MEMCACHED_RESULT_H__
10 #define __MEMCACHED_RESULT_H__
16 struct memcached_result_st
{
23 memcached_string_st value
;
24 char key
[MEMCACHED_MAX_KEY
];
25 /* Add result callback function */
29 void memcached_result_free(memcached_result_st
*result
);
30 void memcached_result_reset(memcached_result_st
*ptr
);
31 memcached_result_st
*memcached_result_create(memcached_st
*ptr
,
32 memcached_result_st
*result
);
33 #define memcached_result_key_value(A) (A)->key
34 #define memcached_result_key_length(A) (A)->key_length
35 #define memcached_result_string_st(A) ((A)->value)
37 #define memcached_result_value(A) memcached_string_value((A)->value)
38 #define memcached_result_length(A) memcached_string_length((A)->value)
40 char *memcached_result_value(memcached_result_st
*ptr
);
41 size_t memcached_result_length(memcached_result_st
*ptr
);
43 #define memcached_result_flags(A) (A)->flags
44 #define memcached_result_cas(A) (A)->cas
45 memcached_return
memcached_result_set_value(memcached_result_st
*ptr
, char *value
, size_t length
);
46 #define memcached_result_set_flags(A,B) (A)->flags=(B)
47 #define memcached_result_set_expiration(A,B) (A)->expiration=(B)
53 #endif /* __MEMCACHED_RESULT_H__ */