aboutsummaryrefslogtreecommitdiffstats
path: root/lib/events_libevent.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2009-10-11 00:25:54 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2009-10-11 00:25:54 +0100
commite046390da36e369c94af607fdedfe7b9f99d9e47 (patch)
tree7955564156898b8ca738c383ae561f91cc347f17 /lib/events_libevent.c
parent0cbef26bd1f82787a8107e92b14839a59187e0c2 (diff)
Make purple use BitlBee's event handling API. Since the APIs never really
diverged too much this is fairly transparent. I did rename and redefine GAIM_INPUT_* variables to really make it work without adding another stupid layer in between. One problem left, the new libpurple input API doesn't care about return values. Fixing that in the next CL.
Diffstat (limited to 'lib/events_libevent.c')
-rw-r--r--lib/events_libevent.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/events_libevent.c b/lib/events_libevent.c
index cf616576..b52a5dd3 100644
--- a/lib/events_libevent.c
+++ b/lib/events_libevent.c
@@ -125,9 +125,9 @@ static void b_event_passthrough( int fd, short event, void *data )
if( fd >= 0 )
{
if( event & EV_READ )
- cond |= GAIM_INPUT_READ;
+ cond |= B_EV_IO_READ;
if( event & EV_WRITE )
- cond |= GAIM_INPUT_WRITE;
+ cond |= B_EV_IO_WRITE;
}
event_debug( "b_event_passthrough( %d, %d, 0x%x ) (%d)\n", fd, event, (int) data, b_ev->id );
@@ -173,8 +173,8 @@ gint b_input_add( gint fd, b_input_condition condition, b_event_handler function
event_debug( "b_input_add( %d, %d, 0x%x, 0x%x ) ", fd, condition, function, data );
- if( ( condition & GAIM_INPUT_READ && ( b_ev = g_hash_table_lookup( read_hash, &fd ) ) ) ||
- ( condition & GAIM_INPUT_WRITE && ( b_ev = g_hash_table_lookup( write_hash, &fd ) ) ) )
+ if( ( condition & B_EV_IO_READ && ( b_ev = g_hash_table_lookup( read_hash, &fd ) ) ) ||
+ ( condition & B_EV_IO_WRITE && ( b_ev = g_hash_table_lookup( write_hash, &fd ) ) ) )
{
/* We'll stick with this libevent entry, but give it a new BitlBee id. */
g_hash_table_remove( id_hash, &b_ev->id );
@@ -197,9 +197,9 @@ gint b_input_add( gint fd, b_input_condition condition, b_event_handler function
b_ev->data = data;
out_cond = EV_PERSIST;
- if( condition & GAIM_INPUT_READ )
+ if( condition & B_EV_IO_READ )
out_cond |= EV_READ;
- if( condition & GAIM_INPUT_WRITE )
+ if( condition & B_EV_IO_WRITE )
out_cond |= EV_WRITE;
event_set( &b_ev->evinfo, fd, out_cond, b_event_passthrough, b_ev );