1 2 #ifndef _EVENT2_BUFFER_COMPAT_H_ 3 #define _EVENT2_BUFFER_COMPAT_H_ 4 5 /** @file buffer_compat.h 6 7 Obsolete and deprecated versions of the functions in buffer.h: provided 8 only for backward compatibility. 9 */ 10 11 12 /** 13 Obsolete alias for evbuffer_readln(buffer, NULL, EOL_STYLE_ANY). 14 15 @param buffer the evbuffer to read from 16 @return pointer to a single line, or NULL if an error occurred 17 */ 18 char *evbuffer_readline(struct evbuffer *buffer); 19 20 /** 21 Replace all callbacks on an evbuffer with a single new callback, or 22 remove them. 23 24 Subsequent calls to evbuffer_setcb() replace callbacks set by previous 25 calls. Setting the callback to NULL removes any previously set callback. 26 27 @param buffer the evbuffer to be monitored 28 @param cb the callback function to invoke when the evbuffer is modified, 29 or NULL to remove all callbacks. 30 @param cbarg an argument to be provided to the callback function 31 */ 32 void evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg); 33 34 #endif 35 36