Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../usr/include/event2
File: event_compat.h
/*
[0] Fix | Delete
* Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
[1] Fix | Delete
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
[2] Fix | Delete
*
[3] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[4] Fix | Delete
* modification, are permitted provided that the following conditions
[5] Fix | Delete
* are met:
[6] Fix | Delete
* 1. Redistributions of source code must retain the above copyright
[7] Fix | Delete
* notice, this list of conditions and the following disclaimer.
[8] Fix | Delete
* 2. Redistributions in binary form must reproduce the above copyright
[9] Fix | Delete
* notice, this list of conditions and the following disclaimer in the
[10] Fix | Delete
* documentation and/or other materials provided with the distribution.
[11] Fix | Delete
* 3. The name of the author may not be used to endorse or promote products
[12] Fix | Delete
* derived from this software without specific prior written permission.
[13] Fix | Delete
*
[14] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
[15] Fix | Delete
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
[16] Fix | Delete
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
[17] Fix | Delete
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
[18] Fix | Delete
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
[19] Fix | Delete
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
[20] Fix | Delete
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
[21] Fix | Delete
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
[22] Fix | Delete
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
[23] Fix | Delete
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[24] Fix | Delete
*/
[25] Fix | Delete
#ifndef EVENT2_EVENT_COMPAT_H_INCLUDED_
[26] Fix | Delete
#define EVENT2_EVENT_COMPAT_H_INCLUDED_
[27] Fix | Delete
[28] Fix | Delete
/** @file event2/event_compat.h
[29] Fix | Delete
[30] Fix | Delete
Potentially non-threadsafe versions of the functions in event.h: provided
[31] Fix | Delete
only for backwards compatibility.
[32] Fix | Delete
[33] Fix | Delete
In the oldest versions of Libevent, event_base was not a first-class
[34] Fix | Delete
structure. Instead, there was a single event base that every function
[35] Fix | Delete
manipulated. Later, when separate event bases were added, the old functions
[36] Fix | Delete
that didn't take an event_base argument needed to work by manipulating the
[37] Fix | Delete
"current" event base. This could lead to thread-safety issues, and obscure,
[38] Fix | Delete
hard-to-diagnose bugs.
[39] Fix | Delete
[40] Fix | Delete
@deprecated All functions in this file are by definition deprecated.
[41] Fix | Delete
*/
[42] Fix | Delete
#include <event2/visibility.h>
[43] Fix | Delete
[44] Fix | Delete
#ifdef __cplusplus
[45] Fix | Delete
extern "C" {
[46] Fix | Delete
#endif
[47] Fix | Delete
[48] Fix | Delete
#include <event2/event-config.h>
[49] Fix | Delete
#ifdef EVENT__HAVE_SYS_TYPES_H
[50] Fix | Delete
#include <sys/types.h>
[51] Fix | Delete
#endif
[52] Fix | Delete
#ifdef EVENT__HAVE_SYS_TIME_H
[53] Fix | Delete
#include <sys/time.h>
[54] Fix | Delete
#endif
[55] Fix | Delete
[56] Fix | Delete
/* For int types. */
[57] Fix | Delete
#include <event2/util.h>
[58] Fix | Delete
[59] Fix | Delete
/**
[60] Fix | Delete
Initialize the event API.
[61] Fix | Delete
[62] Fix | Delete
The event API needs to be initialized with event_init() before it can be
[63] Fix | Delete
used. Sets the global current base that gets used for events that have no
[64] Fix | Delete
base associated with them.
[65] Fix | Delete
[66] Fix | Delete
@deprecated This function is deprecated because it replaces the "current"
[67] Fix | Delete
event_base, and is totally unsafe for multithreaded use. The replacement
[68] Fix | Delete
is event_base_new().
[69] Fix | Delete
[70] Fix | Delete
@see event_base_set(), event_base_new()
[71] Fix | Delete
*/
[72] Fix | Delete
EVENT2_EXPORT_SYMBOL
[73] Fix | Delete
struct event_base *event_init(void);
[74] Fix | Delete
[75] Fix | Delete
/**
[76] Fix | Delete
Loop to process events.
[77] Fix | Delete
[78] Fix | Delete
Like event_base_dispatch(), but uses the "current" base.
[79] Fix | Delete
[80] Fix | Delete
@deprecated This function is deprecated because it is easily confused by
[81] Fix | Delete
multiple calls to event_init(), and because it is not safe for
[82] Fix | Delete
multithreaded use. The replacement is event_base_dispatch().
[83] Fix | Delete
[84] Fix | Delete
@see event_base_dispatch(), event_init()
[85] Fix | Delete
*/
[86] Fix | Delete
EVENT2_EXPORT_SYMBOL
[87] Fix | Delete
int event_dispatch(void);
[88] Fix | Delete
[89] Fix | Delete
/**
[90] Fix | Delete
Handle events.
[91] Fix | Delete
[92] Fix | Delete
This function behaves like event_base_loop(), but uses the "current" base
[93] Fix | Delete
[94] Fix | Delete
@deprecated This function is deprecated because it uses the event base from
[95] Fix | Delete
the last call to event_init, and is therefore not safe for multithreaded
[96] Fix | Delete
use. The replacement is event_base_loop().
[97] Fix | Delete
[98] Fix | Delete
@see event_base_loop(), event_init()
[99] Fix | Delete
*/
[100] Fix | Delete
EVENT2_EXPORT_SYMBOL
[101] Fix | Delete
int event_loop(int);
[102] Fix | Delete
[103] Fix | Delete
[104] Fix | Delete
/**
[105] Fix | Delete
Exit the event loop after the specified time.
[106] Fix | Delete
[107] Fix | Delete
This function behaves like event_base_loopexit(), except that it uses the
[108] Fix | Delete
"current" base.
[109] Fix | Delete
[110] Fix | Delete
@deprecated This function is deprecated because it uses the event base from
[111] Fix | Delete
the last call to event_init, and is therefore not safe for multithreaded
[112] Fix | Delete
use. The replacement is event_base_loopexit().
[113] Fix | Delete
[114] Fix | Delete
@see event_init, event_base_loopexit()
[115] Fix | Delete
*/
[116] Fix | Delete
EVENT2_EXPORT_SYMBOL
[117] Fix | Delete
int event_loopexit(const struct timeval *);
[118] Fix | Delete
[119] Fix | Delete
[120] Fix | Delete
/**
[121] Fix | Delete
Abort the active event_loop() immediately.
[122] Fix | Delete
[123] Fix | Delete
This function behaves like event_base_loopbreakt(), except that it uses the
[124] Fix | Delete
"current" base.
[125] Fix | Delete
[126] Fix | Delete
@deprecated This function is deprecated because it uses the event base from
[127] Fix | Delete
the last call to event_init, and is therefore not safe for multithreaded
[128] Fix | Delete
use. The replacement is event_base_loopbreak().
[129] Fix | Delete
[130] Fix | Delete
@see event_base_loopbreak(), event_init()
[131] Fix | Delete
*/
[132] Fix | Delete
EVENT2_EXPORT_SYMBOL
[133] Fix | Delete
int event_loopbreak(void);
[134] Fix | Delete
[135] Fix | Delete
/**
[136] Fix | Delete
Schedule a one-time event to occur.
[137] Fix | Delete
[138] Fix | Delete
@deprecated This function is obsolete, and has been replaced by
[139] Fix | Delete
event_base_once(). Its use is deprecated because it relies on the
[140] Fix | Delete
"current" base configured by event_init().
[141] Fix | Delete
[142] Fix | Delete
@see event_base_once()
[143] Fix | Delete
*/
[144] Fix | Delete
EVENT2_EXPORT_SYMBOL
[145] Fix | Delete
int event_once(evutil_socket_t , short,
[146] Fix | Delete
void (*)(evutil_socket_t, short, void *), void *, const struct timeval *);
[147] Fix | Delete
[148] Fix | Delete
[149] Fix | Delete
/**
[150] Fix | Delete
Get the kernel event notification mechanism used by Libevent.
[151] Fix | Delete
[152] Fix | Delete
@deprecated This function is obsolete, and has been replaced by
[153] Fix | Delete
event_base_get_method(). Its use is deprecated because it relies on the
[154] Fix | Delete
"current" base configured by event_init().
[155] Fix | Delete
[156] Fix | Delete
@see event_base_get_method()
[157] Fix | Delete
*/
[158] Fix | Delete
EVENT2_EXPORT_SYMBOL
[159] Fix | Delete
const char *event_get_method(void);
[160] Fix | Delete
[161] Fix | Delete
[162] Fix | Delete
/**
[163] Fix | Delete
Set the number of different event priorities.
[164] Fix | Delete
[165] Fix | Delete
@deprecated This function is deprecated because it is easily confused by
[166] Fix | Delete
multiple calls to event_init(), and because it is not safe for
[167] Fix | Delete
multithreaded use. The replacement is event_base_priority_init().
[168] Fix | Delete
[169] Fix | Delete
@see event_base_priority_init()
[170] Fix | Delete
*/
[171] Fix | Delete
EVENT2_EXPORT_SYMBOL
[172] Fix | Delete
int event_priority_init(int);
[173] Fix | Delete
[174] Fix | Delete
/**
[175] Fix | Delete
Prepare an event structure to be added.
[176] Fix | Delete
[177] Fix | Delete
@deprecated event_set() is not recommended for new code, because it requires
[178] Fix | Delete
a subsequent call to event_base_set() to be safe under most circumstances.
[179] Fix | Delete
Use event_assign() or event_new() instead.
[180] Fix | Delete
*/
[181] Fix | Delete
EVENT2_EXPORT_SYMBOL
[182] Fix | Delete
void event_set(struct event *, evutil_socket_t, short, void (*)(evutil_socket_t, short, void *), void *);
[183] Fix | Delete
[184] Fix | Delete
#define evtimer_set(ev, cb, arg) event_set((ev), -1, 0, (cb), (arg))
[185] Fix | Delete
#define evsignal_set(ev, x, cb, arg) \
[186] Fix | Delete
event_set((ev), (x), EV_SIGNAL|EV_PERSIST, (cb), (arg))
[187] Fix | Delete
[188] Fix | Delete
[189] Fix | Delete
/**
[190] Fix | Delete
@name timeout_* macros
[191] Fix | Delete
[192] Fix | Delete
@deprecated These macros are deprecated because their naming is inconsistent
[193] Fix | Delete
with the rest of Libevent. Use the evtimer_* macros instead.
[194] Fix | Delete
@{
[195] Fix | Delete
*/
[196] Fix | Delete
#define timeout_add(ev, tv) event_add((ev), (tv))
[197] Fix | Delete
#define timeout_set(ev, cb, arg) event_set((ev), -1, 0, (cb), (arg))
[198] Fix | Delete
#define timeout_del(ev) event_del(ev)
[199] Fix | Delete
#define timeout_pending(ev, tv) event_pending((ev), EV_TIMEOUT, (tv))
[200] Fix | Delete
#define timeout_initialized(ev) event_initialized(ev)
[201] Fix | Delete
/**@}*/
[202] Fix | Delete
[203] Fix | Delete
/**
[204] Fix | Delete
@name signal_* macros
[205] Fix | Delete
[206] Fix | Delete
@deprecated These macros are deprecated because their naming is inconsistent
[207] Fix | Delete
with the rest of Libevent. Use the evsignal_* macros instead.
[208] Fix | Delete
@{
[209] Fix | Delete
*/
[210] Fix | Delete
#define signal_add(ev, tv) event_add((ev), (tv))
[211] Fix | Delete
#define signal_set(ev, x, cb, arg) \
[212] Fix | Delete
event_set((ev), (x), EV_SIGNAL|EV_PERSIST, (cb), (arg))
[213] Fix | Delete
#define signal_del(ev) event_del(ev)
[214] Fix | Delete
#define signal_pending(ev, tv) event_pending((ev), EV_SIGNAL, (tv))
[215] Fix | Delete
#define signal_initialized(ev) event_initialized(ev)
[216] Fix | Delete
/**@}*/
[217] Fix | Delete
[218] Fix | Delete
#ifndef EVENT_FD
[219] Fix | Delete
/* These macros are obsolete; use event_get_fd and event_get_signal instead. */
[220] Fix | Delete
#define EVENT_FD(ev) ((int)event_get_fd(ev))
[221] Fix | Delete
#define EVENT_SIGNAL(ev) event_get_signal(ev)
[222] Fix | Delete
#endif
[223] Fix | Delete
[224] Fix | Delete
#ifdef __cplusplus
[225] Fix | Delete
}
[226] Fix | Delete
#endif
[227] Fix | Delete
[228] Fix | Delete
#endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */
[229] Fix | Delete
[230] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function