- Timestamp:
- 2009-10-10T23:25:54Z (15 years ago)
- Branches:
- master
- Children:
- c5c18c1
- Parents:
- 0cbef26
- Location:
- protocols
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/io.c
r0cbef26 re046390 64 64 most cases it probably won't be necessary.) */ 65 65 if( ( ret = jabber_write_queue( ic ) ) && jd->tx_len > 0 ) 66 jd->w_inpa = b_input_add( jd->fd, GAIM_INPUT_WRITE, jabber_write_callback, ic );66 jd->w_inpa = b_input_add( jd->fd, B_EV_IO_WRITE, jabber_write_callback, ic ); 67 67 } 68 68 else … … 529 529 530 530 if( jd->r_inpa <= 0 ) 531 jd->r_inpa = b_input_add( jd->fd, GAIM_INPUT_READ, jabber_read_callback, ic );531 jd->r_inpa = b_input_add( jd->fd, B_EV_IO_READ, jabber_read_callback, ic ); 532 532 533 533 greet = g_strdup_printf( "<?xml version='1.0' ?>" -
protocols/msn/ns.c
r0cbef26 re046390 75 75 if( msn_write( ic, s, strlen( s ) ) ) 76 76 { 77 ic->inpa = b_input_add( md->fd, GAIM_INPUT_READ, msn_ns_callback, ic );77 ic->inpa = b_input_add( md->fd, B_EV_IO_READ, msn_ns_callback, ic ); 78 78 imcb_log( ic, "Connected to server, waiting for reply" ); 79 79 } -
protocols/msn/sb.c
r0cbef26 re046390 309 309 310 310 if( msn_sb_write( sb, buf, strlen( buf ) ) ) 311 sb->inp = b_input_add( sb->fd, GAIM_INPUT_READ, msn_sb_callback, sb );311 sb->inp = b_input_add( sb->fd, B_EV_IO_READ, msn_sb_callback, sb ); 312 312 else 313 313 debug( "Error %d while connecting to switchboard server", 2 ); -
protocols/oscar/oscar.c
r0cbef26 re046390 291 291 odata = (struct oscar_data *)ic->proto_data; 292 292 293 if (condition & GAIM_INPUT_READ) {293 if (condition & B_EV_IO_READ) { 294 294 if (aim_get_command(odata->sess, conn) >= 0) { 295 295 aim_rxdispatch(odata->sess); … … 363 363 364 364 aim_conn_completeconnect(sess, conn); 365 ic->inpa = b_input_add(conn->fd, GAIM_INPUT_READ,365 ic->inpa = b_input_add(conn->fd, B_EV_IO_READ, 366 366 oscar_callback, conn); 367 367 … … 487 487 488 488 aim_conn_completeconnect(sess, bosconn); 489 ic->inpa = b_input_add(bosconn->fd, GAIM_INPUT_READ,489 ic->inpa = b_input_add(bosconn->fd, B_EV_IO_READ, 490 490 oscar_callback, bosconn); 491 491 imcb_log(ic, _("Connection established, cookie sent")); … … 663 663 if (pos->modname) 664 664 g_free(pos->modname); 665 pos->inpa = b_input_add(pos->fd, GAIM_INPUT_READ, damn_you, pos);665 pos->inpa = b_input_add(pos->fd, B_EV_IO_READ, damn_you, pos); 666 666 return FALSE; 667 667 } … … 832 832 833 833 aim_conn_completeconnect(sess, tstconn); 834 odata->cnpa = b_input_add(tstconn->fd, GAIM_INPUT_READ,834 odata->cnpa = b_input_add(tstconn->fd, B_EV_IO_READ, 835 835 oscar_callback, tstconn); 836 836 … … 860 860 861 861 aim_conn_completeconnect(sess, tstconn); 862 odata->paspa = b_input_add(tstconn->fd, GAIM_INPUT_READ,862 odata->paspa = b_input_add(tstconn->fd, B_EV_IO_READ, 863 863 oscar_callback, tstconn); 864 864 … … 896 896 aim_conn_completeconnect(sess, ccon->conn); 897 897 ccon->inpa = b_input_add(tstconn->fd, 898 GAIM_INPUT_READ,898 B_EV_IO_READ, 899 899 oscar_callback, tstconn); 900 900 odata->oscar_chats = g_slist_append(odata->oscar_chats, ccon); -
protocols/purple/purple.c
r0cbef26 re046390 63 63 } 64 64 65 static void purple_glib_io_destroy(gpointer data) 66 { 67 g_free(data); 68 } 69 70 static gboolean purple_glib_io_invoke(GIOChannel *source, GIOCondition condition, gpointer data) 71 { 72 PurpleGLibIOClosure *closure = data; 73 PurpleInputCondition purple_cond = 0; 74 75 if (condition & PURPLE_GLIB_READ_COND) 76 purple_cond |= PURPLE_INPUT_READ; 77 if (condition & PURPLE_GLIB_WRITE_COND) 78 purple_cond |= PURPLE_INPUT_WRITE; 79 80 closure->function(closure->data, g_io_channel_unix_get_fd(source), 81 purple_cond); 82 83 return TRUE; 84 } 85 86 static guint glib_input_add(gint fd, PurpleInputCondition condition, PurpleInputFunction function, 87 gpointer data) 88 { 89 PurpleGLibIOClosure *closure = g_new0(PurpleGLibIOClosure, 1); 90 GIOChannel *channel; 91 GIOCondition cond = 0; 92 93 closure->function = function; 94 closure->data = data; 95 96 if (condition & PURPLE_INPUT_READ) 97 cond |= PURPLE_GLIB_READ_COND; 98 if (condition & PURPLE_INPUT_WRITE) 99 cond |= PURPLE_GLIB_WRITE_COND; 100 101 channel = g_io_channel_unix_new(fd); 102 closure->result = g_io_add_watch_full(channel, G_PRIORITY_DEFAULT, cond, 103 purple_glib_io_invoke, closure, purple_glib_io_destroy); 104 105 g_io_channel_unref(channel); 106 return closure->result; 65 static guint prplcb_ev_timeout_add( guint interval, GSourceFunc func, gpointer udata ) 66 { 67 return b_timeout_add( interval, (b_event_handler) func, udata ); 68 } 69 70 static guint prplcb_ev_input_add( int fd, PurpleInputCondition cond, PurpleInputFunction func, gpointer udata ) 71 { 72 return (guint) b_input_add( fd, cond, (b_event_handler) func, udata ); 107 73 } 108 74 109 75 static PurpleEventLoopUiOps glib_eventloops = 110 76 { 111 g_timeout_add, 112 g_source_remove, 113 glib_input_add, 114 g_source_remove, 115 NULL, 116 #if GLIB_CHECK_VERSION(2,14,0) 117 g_timeout_add_seconds, 118 #else 119 NULL, 120 #endif 121 122 /* padding */ 123 NULL, 124 NULL, 125 NULL 77 prplcb_ev_timeout_add, 78 b_event_remove, 79 prplcb_ev_input_add, 80 b_event_remove, 126 81 }; 127 82 … … 137 92 PurpleAccount *pa; 138 93 //PurpleSavedStatus *ps; 139 GList *i;94 //GList *i; 140 95 141 96 /* For now this is needed in the _connected() handlers if using … … 343 298 NULL, /* write_chat */ 344 299 prplcb_conv_im, /* write_im */ 345 NULL, //null_write_conv,/* write_conv */300 NULL, /* write_conv */ 346 301 NULL, /* chat_add_users */ 347 302 NULL, /* chat_rename_user */ … … 381 336 { 382 337 GList *prots; 338 339 if( B_EV_IO_READ != PURPLE_INPUT_READ || 340 B_EV_IO_WRITE != PURPLE_INPUT_WRITE ) 341 { 342 /* FIXME FIXME FIXME FIXME FIXME :-) */ 343 exit( 1 ); 344 } 383 345 384 346 purple_util_set_user_dir("/tmp"); -
protocols/yahoo/yahoo.c
r0cbef26 re046390 682 682 683 683 inp->d = d; 684 d->tag = inp->h = b_input_add( fd, GAIM_INPUT_READ, (b_event_handler) byahoo_read_ready_callback, (gpointer) d );684 d->tag = inp->h = b_input_add( fd, B_EV_IO_READ, (b_event_handler) byahoo_read_ready_callback, (gpointer) d ); 685 685 } 686 686 else if( cond == YAHOO_INPUT_WRITE ) … … 693 693 694 694 inp->d = d; 695 d->tag = inp->h = b_input_add( fd, GAIM_INPUT_WRITE, (b_event_handler) byahoo_write_ready_callback, (gpointer) d );695 d->tag = inp->h = b_input_add( fd, B_EV_IO_WRITE, (b_event_handler) byahoo_write_ready_callback, (gpointer) d ); 696 696 } 697 697 else
Note: See TracChangeset
for help on using the changeset viewer.