Ignore:
Timestamp:
2006-06-21T16:34:33Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
59f5c42a
Parents:
3af70b0 (diff), df417ca (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging libevent branch: Events can now be handles by both glib and libevent.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/yahoo/yahoo.c

    r3af70b0 rb72caac  
    443443};
    444444
    445 void byahoo_connect_callback( gpointer data, gint source, GaimInputCondition cond )
     445void byahoo_connect_callback( gpointer data, gint source, b_input_condition cond )
    446446{
    447447        struct byahoo_connect_callback_data *d = data;
     
    465465};
    466466
    467 void byahoo_read_ready_callback( gpointer data, gint source, GaimInputCondition cond )
     467gboolean byahoo_read_ready_callback( gpointer data, gint source, b_input_condition cond )
    468468{
    469469        struct byahoo_read_ready_data *d = data;
    470470       
    471471        if( !byahoo_get_gc_by_id( d->id ) )
    472         {
    473472                /* WTF doesn't libyahoo clean this up? */
    474                 ext_yahoo_remove_handler( d->id, d->tag );
    475                 return;
    476         }
     473                return FALSE;
    477474       
    478475        yahoo_read_ready( d->id, d->fd, d->data );
     476       
     477        return TRUE;
    479478}
    480479
     
    487486};
    488487
    489 void byahoo_write_ready_callback( gpointer data, gint source, GaimInputCondition cond )
     488gboolean byahoo_write_ready_callback( gpointer data, gint source, b_input_condition cond )
    490489{
    491490        struct byahoo_write_ready_data *d = data;
    492491       
    493492        if( !byahoo_get_gc_by_id( d->id ) )
    494         {
    495493                /* WTF doesn't libyahoo clean this up? */
    496                 ext_yahoo_remove_handler( d->id, d->tag );
    497                 return;
    498         }
     494                return FALSE;
    499495       
    500496        yahoo_write_ready( d->id, d->fd, d->data );
     497       
     498        return FALSE;
    501499}
    502500
     
    687685               
    688686                inp->d = d;
    689                 d->tag = inp->h = gaim_input_add( fd, GAIM_INPUT_READ, (GaimInputFunction) byahoo_read_ready_callback, (gpointer) d );
     687                d->tag = inp->h = b_input_add( fd, GAIM_INPUT_READ, (b_event_handler) byahoo_read_ready_callback, (gpointer) d );
    690688        }
    691689        else if( cond == YAHOO_INPUT_WRITE )
     
    698696               
    699697                inp->d = d;
    700                 d->tag = inp->h = gaim_input_add( fd, GAIM_INPUT_WRITE, (GaimInputFunction) byahoo_write_ready_callback, (gpointer) d );
     698                d->tag = inp->h = b_input_add( fd, GAIM_INPUT_WRITE, (b_event_handler) byahoo_write_ready_callback, (gpointer) d );
    701699        }
    702700        else
     
    729727        }
    730728       
    731         gaim_input_remove( tag );
     729        b_event_remove( tag );
    732730}
    733731
     
    738736       
    739737        d = g_new0( struct byahoo_connect_callback_data, 1 );
    740         if( ( fd = proxy_connect( host, port, (GaimInputFunction) byahoo_connect_callback, (gpointer) d ) ) < 0 )
     738        if( ( fd = proxy_connect( host, port, (b_event_handler) byahoo_connect_callback, (gpointer) d ) ) < 0 )
    741739        {
    742740                g_free( d );
Note: See TracChangeset for help on using the changeset viewer.