Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../usr/include/event2
File: buffer_compat.h
/*
[0] Fix | Delete
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
[1] Fix | Delete
*
[2] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[3] Fix | Delete
* modification, are permitted provided that the following conditions
[4] Fix | Delete
* are met:
[5] Fix | Delete
* 1. Redistributions of source code must retain the above copyright
[6] Fix | Delete
* notice, this list of conditions and the following disclaimer.
[7] Fix | Delete
* 2. Redistributions in binary form must reproduce the above copyright
[8] Fix | Delete
* notice, this list of conditions and the following disclaimer in the
[9] Fix | Delete
* documentation and/or other materials provided with the distribution.
[10] Fix | Delete
* 3. The name of the author may not be used to endorse or promote products
[11] Fix | Delete
* derived from this software without specific prior written permission.
[12] Fix | Delete
*
[13] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
[14] Fix | Delete
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
[15] Fix | Delete
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
[16] Fix | Delete
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
[17] Fix | Delete
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
[18] Fix | Delete
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
[19] Fix | Delete
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
[20] Fix | Delete
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
[21] Fix | Delete
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
[22] Fix | Delete
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[23] Fix | Delete
*/
[24] Fix | Delete
[25] Fix | Delete
#ifndef EVENT2_BUFFER_COMPAT_H_INCLUDED_
[26] Fix | Delete
#define EVENT2_BUFFER_COMPAT_H_INCLUDED_
[27] Fix | Delete
[28] Fix | Delete
#include <event2/visibility.h>
[29] Fix | Delete
[30] Fix | Delete
/** @file event2/buffer_compat.h
[31] Fix | Delete
[32] Fix | Delete
Obsolete and deprecated versions of the functions in buffer.h: provided
[33] Fix | Delete
only for backward compatibility.
[34] Fix | Delete
*/
[35] Fix | Delete
[36] Fix | Delete
[37] Fix | Delete
/**
[38] Fix | Delete
Obsolete alias for evbuffer_readln(buffer, NULL, EVBUFFER_EOL_ANY).
[39] Fix | Delete
[40] Fix | Delete
@deprecated This function is deprecated because its behavior is not correct
[41] Fix | Delete
for almost any protocol, and also because it's wholly subsumed by
[42] Fix | Delete
evbuffer_readln().
[43] Fix | Delete
[44] Fix | Delete
@param buffer the evbuffer to read from
[45] Fix | Delete
@return pointer to a single line, or NULL if an error occurred
[46] Fix | Delete
[47] Fix | Delete
*/
[48] Fix | Delete
EVENT2_EXPORT_SYMBOL
[49] Fix | Delete
char *evbuffer_readline(struct evbuffer *buffer);
[50] Fix | Delete
[51] Fix | Delete
/** Type definition for a callback that is invoked whenever data is added or
[52] Fix | Delete
removed from an evbuffer.
[53] Fix | Delete
[54] Fix | Delete
An evbuffer may have one or more callbacks set at a time. The order
[55] Fix | Delete
in which they are executed is undefined.
[56] Fix | Delete
[57] Fix | Delete
A callback function may add more callbacks, or remove itself from the
[58] Fix | Delete
list of callbacks, or add or remove data from the buffer. It may not
[59] Fix | Delete
remove another callback from the list.
[60] Fix | Delete
[61] Fix | Delete
If a callback adds or removes data from the buffer or from another
[62] Fix | Delete
buffer, this can cause a recursive invocation of your callback or
[63] Fix | Delete
other callbacks. If you ask for an infinite loop, you might just get
[64] Fix | Delete
one: watch out!
[65] Fix | Delete
[66] Fix | Delete
@param buffer the buffer whose size has changed
[67] Fix | Delete
@param old_len the previous length of the buffer
[68] Fix | Delete
@param new_len the current length of the buffer
[69] Fix | Delete
@param arg a pointer to user data
[70] Fix | Delete
*/
[71] Fix | Delete
typedef void (*evbuffer_cb)(struct evbuffer *buffer, size_t old_len, size_t new_len, void *arg);
[72] Fix | Delete
[73] Fix | Delete
/**
[74] Fix | Delete
Replace all callbacks on an evbuffer with a single new callback, or
[75] Fix | Delete
remove them.
[76] Fix | Delete
[77] Fix | Delete
Subsequent calls to evbuffer_setcb() replace callbacks set by previous
[78] Fix | Delete
calls. Setting the callback to NULL removes any previously set callback.
[79] Fix | Delete
[80] Fix | Delete
@deprecated This function is deprecated because it clears all previous
[81] Fix | Delete
callbacks set on the evbuffer, which can cause confusing behavior if
[82] Fix | Delete
multiple parts of the code all want to add their own callbacks on a
[83] Fix | Delete
buffer. Instead, use evbuffer_add(), evbuffer_del(), and
[84] Fix | Delete
evbuffer_setflags() to manage your own evbuffer callbacks without
[85] Fix | Delete
interfering with callbacks set by others.
[86] Fix | Delete
[87] Fix | Delete
@param buffer the evbuffer to be monitored
[88] Fix | Delete
@param cb the callback function to invoke when the evbuffer is modified,
[89] Fix | Delete
or NULL to remove all callbacks.
[90] Fix | Delete
@param cbarg an argument to be provided to the callback function
[91] Fix | Delete
*/
[92] Fix | Delete
EVENT2_EXPORT_SYMBOL
[93] Fix | Delete
void evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg);
[94] Fix | Delete
[95] Fix | Delete
[96] Fix | Delete
/**
[97] Fix | Delete
Find a string within an evbuffer.
[98] Fix | Delete
[99] Fix | Delete
@param buffer the evbuffer to be searched
[100] Fix | Delete
@param what the string to be searched for
[101] Fix | Delete
@param len the length of the search string
[102] Fix | Delete
@return a pointer to the beginning of the search string, or NULL if the search failed.
[103] Fix | Delete
*/
[104] Fix | Delete
EVENT2_EXPORT_SYMBOL
[105] Fix | Delete
unsigned char *evbuffer_find(struct evbuffer *buffer, const unsigned char *what, size_t len);
[106] Fix | Delete
[107] Fix | Delete
/** deprecated in favor of calling the functions directly */
[108] Fix | Delete
#define EVBUFFER_LENGTH(x) evbuffer_get_length(x)
[109] Fix | Delete
/** deprecated in favor of calling the functions directly */
[110] Fix | Delete
#define EVBUFFER_DATA(x) evbuffer_pullup((x), -1)
[111] Fix | Delete
[112] Fix | Delete
#endif
[113] Fix | Delete
[114] Fix | Delete
[115] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function