Changeset e046390
- Timestamp:
- 2009-10-10T23:25:54Z (15 years ago)
- Branches:
- master
- Children:
- c5c18c1
- Parents:
- 0cbef26
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
bitlbee.c
r0cbef26 re046390 93 93 } 94 94 95 global.listen_watch_source_id = b_input_add( global.listen_socket, GAIM_INPUT_READ, bitlbee_io_new_client, NULL );95 global.listen_watch_source_id = b_input_add( global.listen_socket, B_EV_IO_READ, bitlbee_io_new_client, NULL ); 96 96 97 97 #ifndef _WIN32 … … 284 284 child->pid = client_pid; 285 285 child->ipc_fd = fds[0]; 286 child->ipc_inpa = b_input_add( child->ipc_fd, GAIM_INPUT_READ, ipc_master_read, child );286 child->ipc_inpa = b_input_add( child->ipc_fd, B_EV_IO_READ, ipc_master_read, child ); 287 287 child_list = g_slist_append( child_list, child ); 288 288 … … 312 312 /* We can store the IPC fd there now. */ 313 313 global.listen_socket = fds[1]; 314 global.listen_watch_source_id = b_input_add( fds[1], GAIM_INPUT_READ, ipc_child_read, irc );314 global.listen_watch_source_id = b_input_add( fds[1], B_EV_IO_READ, ipc_child_read, irc ); 315 315 316 316 close( fds[0] ); -
ipc.c
r0cbef26 re046390 514 514 } 515 515 516 child->ipc_inpa = b_input_add( child->ipc_fd, GAIM_INPUT_READ, ipc_master_read, child );516 child->ipc_inpa = b_input_add( child->ipc_fd, B_EV_IO_READ, ipc_master_read, child ); 517 517 518 518 child_list = g_slist_append( child_list, child ); … … 552 552 } 553 553 554 b_input_add( serversock, GAIM_INPUT_READ, new_ipc_client, NULL );554 b_input_add( serversock, B_EV_IO_READ, new_ipc_client, NULL ); 555 555 556 556 return 1; … … 597 597 return 0; 598 598 } 599 child->ipc_inpa = b_input_add( child->ipc_fd, GAIM_INPUT_READ, ipc_master_read, child );599 child->ipc_inpa = b_input_add( child->ipc_fd, B_EV_IO_READ, ipc_master_read, child ); 600 600 601 601 child_list = g_slist_append( child_list, child ); -
irc.c
r0cbef26 re046390 90 90 sock_make_nonblocking( irc->fd ); 91 91 92 irc->r_watch_source_id = b_input_add( irc->fd, GAIM_INPUT_READ, bitlbee_io_current_client_read, irc );92 irc->r_watch_source_id = b_input_add( irc->fd, B_EV_IO_READ, bitlbee_io_current_client_read, irc ); 93 93 94 94 irc->status = USTATUS_OFFLINE; … … 653 653 in the event queue. */ 654 654 /* Really can't be done as long as the code doesn't do error checking very well: 655 if( bitlbee_io_current_client_write( irc, irc->fd, GAIM_INPUT_WRITE ) ) */655 if( bitlbee_io_current_client_write( irc, irc->fd, B_EV_IO_WRITE ) ) */ 656 656 657 657 /* So just always do it via the event handler. */ 658 irc->w_watch_source_id = b_input_add( irc->fd, GAIM_INPUT_WRITE, bitlbee_io_current_client_write, irc );658 irc->w_watch_source_id = b_input_add( irc->fd, B_EV_IO_WRITE, bitlbee_io_current_client_write, irc ); 659 659 } 660 660 … … 682 682 if( now ) 683 683 { 684 bitlbee_io_current_client_write( irc, irc->fd, GAIM_INPUT_WRITE );684 bitlbee_io_current_client_write( irc, irc->fd, B_EV_IO_WRITE ); 685 685 } 686 686 temp = temp->next; -
lib/events.h
r0cbef26 re046390 48 48 the given callback function. */ 49 49 typedef enum { 50 GAIM_INPUT_READ = 1 << 1,51 GAIM_INPUT_WRITE = 1 << 250 B_EV_IO_READ = 1 << 0, 51 B_EV_IO_WRITE = 1 << 1 52 52 } b_input_condition; 53 53 typedef gboolean (*b_event_handler)(gpointer data, gint fd, b_input_condition cond); -
lib/events_glib.c
r0cbef26 re046390 76 76 77 77 if (condition & GAIM_READ_COND) 78 gaim_cond |= GAIM_INPUT_READ;78 gaim_cond |= B_EV_IO_READ; 79 79 if (condition & GAIM_WRITE_COND) 80 gaim_cond |= GAIM_INPUT_WRITE;80 gaim_cond |= B_EV_IO_WRITE; 81 81 82 82 event_debug( "gaim_io_invoke( %d, %d, 0x%x )\n", g_io_channel_unix_get_fd(source), condition, data ); … … 106 106 closure->data = data; 107 107 108 if (condition & GAIM_INPUT_READ)108 if (condition & B_EV_IO_READ) 109 109 cond |= GAIM_READ_COND; 110 if (condition & GAIM_INPUT_WRITE)110 if (condition & B_EV_IO_WRITE) 111 111 cond |= GAIM_WRITE_COND; 112 112 -
lib/events_libevent.c
r0cbef26 re046390 126 126 { 127 127 if( event & EV_READ ) 128 cond |= GAIM_INPUT_READ;128 cond |= B_EV_IO_READ; 129 129 if( event & EV_WRITE ) 130 cond |= GAIM_INPUT_WRITE;130 cond |= B_EV_IO_WRITE; 131 131 } 132 132 … … 174 174 event_debug( "b_input_add( %d, %d, 0x%x, 0x%x ) ", fd, condition, function, data ); 175 175 176 if( ( condition & GAIM_INPUT_READ && ( b_ev = g_hash_table_lookup( read_hash, &fd ) ) ) ||177 ( condition & GAIM_INPUT_WRITE && ( b_ev = g_hash_table_lookup( write_hash, &fd ) ) ) )176 if( ( condition & B_EV_IO_READ && ( b_ev = g_hash_table_lookup( read_hash, &fd ) ) ) || 177 ( condition & B_EV_IO_WRITE && ( b_ev = g_hash_table_lookup( write_hash, &fd ) ) ) ) 178 178 { 179 179 /* We'll stick with this libevent entry, but give it a new BitlBee id. */ … … 198 198 199 199 out_cond = EV_PERSIST; 200 if( condition & GAIM_INPUT_READ )200 if( condition & B_EV_IO_READ ) 201 201 out_cond |= EV_READ; 202 if( condition & GAIM_INPUT_WRITE )202 if( condition & B_EV_IO_WRITE ) 203 203 out_cond |= EV_WRITE; 204 204 -
lib/http_client.c
r0cbef26 re046390 149 149 if( req->bytes_written < req->request_length ) 150 150 req->inpa = b_input_add( source, 151 req->ssl ? ssl_getdirection( req->ssl ) : GAIM_INPUT_WRITE,151 req->ssl ? ssl_getdirection( req->ssl ) : B_EV_IO_WRITE, 152 152 http_connected, req ); 153 153 else 154 req->inpa = b_input_add( source, GAIM_INPUT_READ, http_incoming_data, req );154 req->inpa = b_input_add( source, B_EV_IO_READ, http_incoming_data, req ); 155 155 156 156 return FALSE; … … 234 234 /* There will be more! */ 235 235 req->inpa = b_input_add( req->fd, 236 req->ssl ? ssl_getdirection( req->ssl ) : GAIM_INPUT_READ,236 req->ssl ? ssl_getdirection( req->ssl ) : B_EV_IO_READ, 237 237 http_incoming_data, req ); 238 238 -
lib/proxy.c
r0cbef26 re046390 91 91 b_event_remove(phb->inpa); 92 92 if( phb->proxy_func ) 93 phb->proxy_func(phb->proxy_data, -1, GAIM_INPUT_READ);93 phb->proxy_func(phb->proxy_data, -1, B_EV_IO_READ); 94 94 else { 95 phb->func(phb->data, -1, GAIM_INPUT_READ);95 phb->func(phb->data, -1, B_EV_IO_READ); 96 96 g_free(phb); 97 97 } … … 102 102 b_event_remove(phb->inpa); 103 103 if( phb->proxy_func ) 104 phb->proxy_func(phb->proxy_data, source, GAIM_INPUT_READ);104 phb->proxy_func(phb->proxy_data, source, B_EV_IO_READ); 105 105 else { 106 phb->func(phb->data, source, GAIM_INPUT_READ);106 phb->func(phb->data, source, B_EV_IO_READ); 107 107 g_free(phb); 108 108 } … … 147 147 return -1; 148 148 } else { 149 phb->inpa = b_input_add(fd, GAIM_INPUT_WRITE, gaim_io_connected, phb);149 phb->inpa = b_input_add(fd, B_EV_IO_WRITE, gaim_io_connected, phb); 150 150 phb->fd = fd; 151 151 … … 179 179 if ((memcmp(HTTP_GOODSTRING, inputline, strlen(HTTP_GOODSTRING)) == 0) || 180 180 (memcmp(HTTP_GOODSTRING2, inputline, strlen(HTTP_GOODSTRING2)) == 0)) { 181 phb->func(phb->data, source, GAIM_INPUT_READ);181 phb->func(phb->data, source, B_EV_IO_READ); 182 182 g_free(phb->host); 183 183 g_free(phb); … … 186 186 187 187 close(source); 188 phb->func(phb->data, -1, GAIM_INPUT_READ);188 phb->func(phb->data, -1, B_EV_IO_READ); 189 189 g_free(phb->host); 190 190 g_free(phb); … … 204 204 if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { 205 205 close(source); 206 phb->func(phb->data, -1, GAIM_INPUT_READ);206 phb->func(phb->data, -1, B_EV_IO_READ); 207 207 g_free(phb->host); 208 208 g_free(phb); … … 215 215 if (send(source, cmd, strlen(cmd), 0) < 0) { 216 216 close(source); 217 phb->func(phb->data, -1, GAIM_INPUT_READ);217 phb->func(phb->data, -1, B_EV_IO_READ); 218 218 g_free(phb->host); 219 219 g_free(phb); … … 230 230 if (send(source, cmd, strlen(cmd), 0) < 0) { 231 231 close(source); 232 phb->func(phb->data, -1, GAIM_INPUT_READ);232 phb->func(phb->data, -1, B_EV_IO_READ); 233 233 g_free(phb->host); 234 234 g_free(phb); … … 240 240 if (send(source, cmd, strlen(cmd), 0) < 0) { 241 241 close(source); 242 phb->func(phb->data, -1, GAIM_INPUT_READ);243 g_free(phb->host); 244 g_free(phb); 245 return FALSE; 246 } 247 248 phb->inpa = b_input_add(source, GAIM_INPUT_READ, http_canread, phb);242 phb->func(phb->data, -1, B_EV_IO_READ); 243 g_free(phb->host); 244 g_free(phb); 245 return FALSE; 246 } 247 248 phb->inpa = b_input_add(source, B_EV_IO_READ, http_canread, phb); 249 249 250 250 return FALSE; … … 273 273 memset(packet, 0, sizeof(packet)); 274 274 if (read(source, packet, 9) >= 4 && packet[1] == 90) { 275 phb->func(phb->data, source, GAIM_INPUT_READ);275 phb->func(phb->data, source, B_EV_IO_READ); 276 276 g_free(phb->host); 277 277 g_free(phb); … … 280 280 281 281 close(source); 282 phb->func(phb->data, -1, GAIM_INPUT_READ);282 phb->func(phb->data, -1, B_EV_IO_READ); 283 283 g_free(phb->host); 284 284 g_free(phb); … … 299 299 if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { 300 300 close(source); 301 phb->func(phb->data, -1, GAIM_INPUT_READ);301 phb->func(phb->data, -1, B_EV_IO_READ); 302 302 g_free(phb->host); 303 303 g_free(phb); … … 309 309 if (!(hp = gethostbyname(phb->host))) { 310 310 close(source); 311 phb->func(phb->data, -1, GAIM_INPUT_READ);311 phb->func(phb->data, -1, B_EV_IO_READ); 312 312 g_free(phb->host); 313 313 g_free(phb); … … 326 326 if (write(source, packet, 9) != 9) { 327 327 close(source); 328 phb->func(phb->data, -1, GAIM_INPUT_READ);329 g_free(phb->host); 330 g_free(phb); 331 return FALSE; 332 } 333 334 phb->inpa = b_input_add(source, GAIM_INPUT_READ, s4_canread, phb);328 phb->func(phb->data, -1, B_EV_IO_READ); 329 g_free(phb->host); 330 g_free(phb); 331 return FALSE; 332 } 333 334 phb->inpa = b_input_add(source, B_EV_IO_READ, s4_canread, phb); 335 335 336 336 return FALSE; … … 359 359 if (read(source, buf, 10) < 10) { 360 360 close(source); 361 phb->func(phb->data, -1, GAIM_INPUT_READ);361 phb->func(phb->data, -1, B_EV_IO_READ); 362 362 g_free(phb->host); 363 363 g_free(phb); … … 366 366 if ((buf[0] != 0x05) || (buf[1] != 0x00)) { 367 367 close(source); 368 phb->func(phb->data, -1, GAIM_INPUT_READ);369 g_free(phb->host); 370 g_free(phb); 371 return FALSE; 372 } 373 374 phb->func(phb->data, source, GAIM_INPUT_READ);368 phb->func(phb->data, -1, B_EV_IO_READ); 369 g_free(phb->host); 370 g_free(phb); 371 return FALSE; 372 } 373 374 phb->func(phb->data, source, B_EV_IO_READ); 375 375 g_free(phb->host); 376 376 g_free(phb); … … 396 396 if (write(source, buf, (5 + strlen(phb->host) + 2)) < (5 + strlen(phb->host) + 2)) { 397 397 close(source); 398 phb->func(phb->data, -1, GAIM_INPUT_READ);398 phb->func(phb->data, -1, B_EV_IO_READ); 399 399 g_free(phb->host); 400 400 g_free(phb); … … 402 402 } 403 403 404 phb->inpa = b_input_add(source, GAIM_INPUT_READ, s5_canread_again, phb);404 phb->inpa = b_input_add(source, B_EV_IO_READ, s5_canread_again, phb); 405 405 } 406 406 … … 414 414 if (read(source, buf, 2) < 2) { 415 415 close(source); 416 phb->func(phb->data, -1, GAIM_INPUT_READ);416 phb->func(phb->data, -1, B_EV_IO_READ); 417 417 g_free(phb->host); 418 418 g_free(phb); … … 422 422 if ((buf[0] != 0x01) || (buf[1] != 0x00)) { 423 423 close(source); 424 phb->func(phb->data, -1, GAIM_INPUT_READ);424 phb->func(phb->data, -1, B_EV_IO_READ); 425 425 g_free(phb->host); 426 426 g_free(phb); … … 442 442 if (read(source, buf, 2) < 2) { 443 443 close(source); 444 phb->func(phb->data, -1, GAIM_INPUT_READ);444 phb->func(phb->data, -1, B_EV_IO_READ); 445 445 g_free(phb->host); 446 446 g_free(phb); … … 450 450 if ((buf[0] != 0x05) || (buf[1] == 0xff)) { 451 451 close(source); 452 phb->func(phb->data, -1, GAIM_INPUT_READ);452 phb->func(phb->data, -1, B_EV_IO_READ); 453 453 g_free(phb->host); 454 454 g_free(phb); … … 465 465 if (write(source, buf, 3 + i + j) < 3 + i + j) { 466 466 close(source); 467 phb->func(phb->data, -1, GAIM_INPUT_READ);467 phb->func(phb->data, -1, B_EV_IO_READ); 468 468 g_free(phb->host); 469 469 g_free(phb); … … 471 471 } 472 472 473 phb->inpa = b_input_add(source, GAIM_INPUT_READ, s5_readauth, phb);473 phb->inpa = b_input_add(source, B_EV_IO_READ, s5_readauth, phb); 474 474 } else { 475 475 s5_sendconnect(phb, source); … … 491 491 if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { 492 492 close(source); 493 phb->func(phb->data, -1, GAIM_INPUT_READ);493 phb->func(phb->data, -1, B_EV_IO_READ); 494 494 g_free(phb->host); 495 495 g_free(phb); … … 513 513 if (write(source, buf, i) < i) { 514 514 close(source); 515 phb->func(phb->data, -1, GAIM_INPUT_READ);516 g_free(phb->host); 517 g_free(phb); 518 return FALSE; 519 } 520 521 phb->inpa = b_input_add(source, GAIM_INPUT_READ, s5_canread, phb);515 phb->func(phb->data, -1, B_EV_IO_READ); 516 g_free(phb->host); 517 g_free(phb); 518 return FALSE; 519 } 520 521 phb->inpa = b_input_add(source, B_EV_IO_READ, s5_canread, phb); 522 522 523 523 return FALSE; -
lib/ssl_bogus.c
r0cbef26 re046390 59 59 b_input_condition ssl_getdirection( void *conn ) 60 60 { 61 return GAIM_INPUT_READ;61 return B_EV_IO_READ; 62 62 } 63 63 -
lib/ssl_client.h
r0cbef26 re046390 71 71 G_MODULE_EXPORT int ssl_getfd( void *conn ); 72 72 73 /* This function returns GAIM_INPUT_READ/WRITE. With SSL connections it's73 /* This function returns B_EV_IO_READ/WRITE. With SSL connections it's 74 74 possible that something has to be read while actually were trying to 75 75 write something (think about key exchange/refresh/etc). So when an -
lib/ssl_gnutls.c
r0cbef26 re046390 106 106 struct scd *conn = data; 107 107 108 return ssl_connected( conn, conn->fd, GAIM_INPUT_WRITE );108 return ssl_connected( conn, conn->fd, B_EV_IO_WRITE ); 109 109 } 110 110 … … 244 244 { 245 245 return( gnutls_record_get_direction( ((struct scd*)conn)->session ) ? 246 GAIM_INPUT_WRITE : GAIM_INPUT_READ );247 } 246 B_EV_IO_WRITE : B_EV_IO_READ ); 247 } -
lib/ssl_nss.c
r0cbef26 re046390 193 193 { 194 194 /* Just in case someone calls us, let's return the most likely case: */ 195 return GAIM_INPUT_READ;195 return B_EV_IO_READ; 196 196 } -
lib/ssl_openssl.c
r0cbef26 re046390 102 102 struct scd *conn = data; 103 103 104 return ssl_connected( conn, conn->fd, GAIM_INPUT_WRITE );104 return ssl_connected( conn, conn->fd, B_EV_IO_WRITE ); 105 105 } 106 106 … … 270 270 b_input_condition ssl_getdirection( void *conn ) 271 271 { 272 return( ((struct scd*)conn)->lasterr == SSL_ERROR_WANT_WRITE ? GAIM_INPUT_WRITE : GAIM_INPUT_READ );273 } 272 return( ((struct scd*)conn)->lasterr == SSL_ERROR_WANT_WRITE ? B_EV_IO_WRITE : B_EV_IO_READ ); 273 } -
lib/ssl_sspi.c
r0cbef26 re046390 275 275 GaimInputCondition ssl_getdirection( void *conn ) 276 276 { 277 return GAIM_INPUT_WRITE; /* FIXME: or GAIM_INPUT_READ */278 } 277 return B_EV_IO_WRITE; /* FIXME: or B_EV_IO_READ */ 278 } -
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.