1 /* 2 +----------------------------------------------------------------------+ 3 | Yet Another Cache | 4 +----------------------------------------------------------------------+ 5 | Copyright (c) 2013-2013 The PHP Group | 6 +----------------------------------------------------------------------+ 7 | This source file is subject to version 3.01 of the PHP license, | 8 | that is bundled with this package in the file LICENSE, and is | 9 | available through the world-wide-web at the following url: | 10 | http://www.php.net/license/3_01.txt | 11 | If you did not receive a copy of the PHP license and are unable to | 12 | obtain it through the world-wide-web, please send a note to | 13 | license@php.net so we can mail you a copy immediately. | 14 +----------------------------------------------------------------------+ 15 | Author: Xinchen Hui <laruence@php.net> | 16 +----------------------------------------------------------------------+ 17 */ 18 19 /* $Id$ */ 20 21 #ifndef YAC_SERIALIZER_H 22 #define YAC_SERIALIZER_H 23 24 typedef int (*yac_serializer_t)(zval*, smart_str*, char**); 25 typedef zval* (*yac_unserializer_t)(char *, size_t, char**, zval*); 26 27 #ifdef YAC_ENABLE_MSGPACK 28 int yac_serializer_msgpack_pack(zval *pzval, smart_str *buf, char **msg); 29 zval * yac_serializer_msgpack_unpack(char *content, size_t len, char **msg, zval *rv); 30 #endif 31 32 int yac_serializer_php_pack(zval *pzval, smart_str *buf, char **msg); 33 zval * yac_serializer_php_unpack(char *content, size_t len, char **msg, zval *rv); 34 35 #ifdef YAC_ENABLE_IGBINARY 36 int yac_serializer_igbinary_pack(zval *pzval, smart_str *buf, char **msg); 37 zval * yac_serializer_igbinary_unpack(char *content, size_t len, char **msg, zval *rv); 38 #endif 39 40 #ifdef YAC_ENABLE_JSON 41 int yac_serializer_json_pack(zval *pzval, smart_str *buf, char **msg); 42 zval * yac_serializer_json_unpack(char *content, size_t len, char **msg, zval *rv); 43 #endif 44 45 #endif /* YAC_SERIALIZER_H */ 46 47 /* 48 * Local variables: 49 * tab-width: 4 50 * c-basic-offset: 4 51 * End: 52 * vim600: noet sw=4 ts=4 fdm=marker 53 * vim<600: noet sw=4 ts=4 54 */ 55