Changeset c36f73b for protocols/yahoo/yahoo2_callbacks.h
- Timestamp:
- 2010-07-23T14:35:45Z (14 years ago)
- Branches:
- master
- Children:
- 9034ba0
- Parents:
- 938c305
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/yahoo/yahoo2_callbacks.h
r938c305 rc36f73b 30 30 */ 31 31 32 33 32 #ifndef YAHOO2_CALLBACKS_H 34 33 #define YAHOO2_CALLBACKS_H … … 46 45 */ 47 46 48 typedef enum {49 YAHOO_INPUT_READ = 1 << 0,50 YAHOO_INPUT_WRITE = 1 << 1,51 YAHOO_INPUT_EXCEPTION = 1 << 252 } yahoo_input_condition;47 typedef enum { 48 YAHOO_INPUT_READ = 1 << 0, 49 YAHOO_INPUT_WRITE = 1 << 1, 50 YAHOO_INPUT_EXCEPTION = 1 << 2 51 } yahoo_input_condition; 53 52 54 53 /* … … 94 93 * url - url to reactivate account if locked 95 94 */ 96 void YAHOO_CALLBACK_TYPE(ext_yahoo_login_response)(int id, int succ, const char *url); 97 95 void YAHOO_CALLBACK_TYPE(ext_yahoo_login_response) (int id, int succ, 96 const char *url); 98 97 99 98 /* … … 104 103 * buds - the buddy list 105 104 */ 106 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buddies)(int id, YList * buds); 107 105 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buddies) (int id, YList *buds); 108 106 109 107 /* … … 114 112 * igns - the ignore list 115 113 */ 116 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_ignore)(int id, YList * igns); 117 114 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_ignore) (int id, YList *igns); 118 115 119 116 /* … … 124 121 * ids - the identity list 125 122 */ 126 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_identities)(int id, YList * ids); 127 123 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_identities) (int id, YList *ids); 128 124 129 125 /* … … 133 129 * id - the id that identifies the server connection 134 130 */ 135 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_cookies)(int id); 136 131 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_cookies) (int id); 137 132 138 133 /* … … 143 138 * errormsg - optional error message 144 139 */ 145 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_ping)(int id, const char *errormsg); 146 140 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_ping) (int id, 141 const char *errormsg); 147 142 148 143 /* … … 159 154 * TODO: add support for pager, chat, and game states 160 155 */ 161 void YAHOO_CALLBACK_TYPE(ext_yahoo_status_changed)(int id, const char *who, int stat, const char *msg, int away, int idle, int mobile); 162 156 void YAHOO_CALLBACK_TYPE(ext_yahoo_status_changed) (int id, 157 const char *who, int stat, const char *msg, int away, int idle, 158 int mobile); 159 160 /* 161 * Name: ext_yahoo_got_buzz 162 * Called when remote user sends you a buzz. 163 * Params: 164 * id - the id that identifies the server connection 165 * me - the identity the message was sent to 166 * who - the handle of the remote user 167 * tm - timestamp of message if offline 168 */ 169 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buzz) (int id, const char *me, 170 const char *who, long tm); 163 171 164 172 /* … … 177 185 * utf8 - whether the message is encoded as utf8 or not 178 186 */ 179 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_im)(int id, const char *me, const char *who, const char *msg, long tm, int stat, int utf8); 180 187 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_im) (int id, const char *me, 188 const char *who, const char *msg, long tm, int stat, int utf8); 181 189 182 190 /* … … 191 199 * members - the initial members of the conference (null terminated list) 192 200 */ 193 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_conf_invite)(int id, const char *me, const char *who, const char *room, const char *msg, YList *members); 194 201 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_conf_invite) (int id, 202 const char *me, const char *who, const char *room, 203 const char *msg, YList *members); 195 204 196 205 /* … … 204 213 * msg - the declining message 205 214 */ 206 void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userdecline)(int id, const char *me, const char *who, const char *room, const char *msg); 207 215 void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userdecline) (int id, 216 const char *me, const char *who, const char *room, 217 const char *msg); 208 218 209 219 /* … … 216 226 * room - the room joined 217 227 */ 218 void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userjoin)(int id, const char *me, const char *who, const char *room); 219 228 void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userjoin) (int id, 229 const char *me, const char *who, const char *room); 220 230 221 231 /* … … 228 238 * room - the room left 229 239 */ 230 void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userleave)(int id, const char *me, const char *who, const char *room); 231 240 void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userleave) (int id, 241 const char *me, const char *who, const char *room); 232 242 233 243 /* … … 238 248 * xml - ? 239 249 */ 240 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_cat_xml)(int id, const char *xml); 241 250 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_cat_xml) (int id, 251 const char *xml); 242 252 243 253 /* … … 254 264 * fd - the socket where the connection is coming from (for tracking) 255 265 */ 256 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_join)(int id, const char *me, const char *room, const char *topic, YList *members, int fd); 257 266 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_join) (int id, const char *me, 267 const char *room, const char *topic, YList *members, int fd); 258 268 259 269 /* … … 266 276 * who - the user who has joined, Must be freed by the client 267 277 */ 268 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_userjoin)(int id, const char *me, const char *room, struct yahoo_chat_member *who); 269 278 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_userjoin) (int id, 279 const char *me, const char *room, 280 struct yahoo_chat_member *who); 270 281 271 282 /* … … 278 289 * who - the user who has left (Just the User ID) 279 290 */ 280 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_userleave)(int id, const char *me, const char *room, const char *who); 281 291 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_userleave) (int id, 292 const char *me, const char *room, const char *who); 282 293 283 294 /* … … 294 305 * utf8 - whether the message is utf8 encoded or not 295 306 */ 296 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_message)(int id, const char *me, const char *who, const char *room, const char *msg, int msgtype, int utf8); 297 307 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_message) (int id, 308 const char *me, const char *who, const char *room, 309 const char *msg, int msgtype, int utf8); 298 310 299 311 /* … … 310 322 * nothing. 311 323 */ 312 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_yahoologout)(int id, const char *me); 313 324 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_yahoologout) (int id, 325 const char *me); 314 326 315 327 /* … … 327 339 * nothing. 328 340 */ 329 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_yahooerror)(int id, const char *me); 330 341 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_yahooerror) (int id, 342 const char *me); 331 343 332 344 /* … … 341 353 * utf8 - whether the message is utf8 encoded or not 342 354 */ 343 void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_message)(int id, const char *me, const char *who, const char *room, const char *msg, int utf8); 344 355 void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_message) (int id, 356 const char *me, const char *who, const char *room, 357 const char *msg, int utf8); 345 358 346 359 /* … … 381 394 * msg - any message sent 382 395 */ 383 void YAHOO_CALLBACK_TYPE(ext_yahoo_contact_added)(int id, const char *myid, const char *who, const char *msg); 384 396 void YAHOO_CALLBACK_TYPE(ext_yahoo_contact_added) (int id, 397 const char *myid, const char *who, const char *msg); 385 398 386 399 /* … … 392 405 * msg - any message sent 393 406 */ 394 void YAHOO_CALLBACK_TYPE(ext_yahoo_rejected)(int id, const char *who, const char *msg); 395 407 void YAHOO_CALLBACK_TYPE(ext_yahoo_rejected) (int id, const char *who, 408 const char *msg); 396 409 397 410 /* … … 404 417 * stat - 1 if typing, 0 if stopped typing 405 418 */ 406 void YAHOO_CALLBACK_TYPE(ext_yahoo_typing_notify)(int id, const char *me, const char *who, int stat); 407 419 void YAHOO_CALLBACK_TYPE(ext_yahoo_typing_notify) (int id, 420 const char *me, const char *who, int stat); 408 421 409 422 /* … … 428 441 * cnt - mail count - 0 if new mail notification 429 442 */ 430 void YAHOO_CALLBACK_TYPE(ext_yahoo_mail_notify)(int id, const char *from, const char *subj, int cnt); 431 443 void YAHOO_CALLBACK_TYPE(ext_yahoo_mail_notify) (int id, 444 const char *from, const char *subj, int cnt); 432 445 433 446 /* … … 450 463 * checksum - the checksum of the icon content 451 464 */ 452 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buddyicon)(int id, const char *me, const char *who, const char *url, int checksum); 465 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buddyicon) (int id, 466 const char *me, const char *who, const char *url, int checksum); 453 467 454 468 /* … … 461 475 * checksum - the checksum of the icon content 462 476 */ 463 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buddyicon_checksum)(int id, const char *me,const char *who, int checksum); 477 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buddyicon_checksum) (int id, 478 const char *me, const char *who, int checksum); 464 479 465 480 /* … … 471 486 * who - the yahoo id of the buddy that requested the buddy icon 472 487 */ 473 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buddyicon_request)(int id, const char *me, const char *who); 488 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buddyicon_request) (int id, 489 const char *me, const char *who); 474 490 475 491 /* … … 480 496 * url - remote url, the uploaded buddy icon can be fetched from 481 497 */ 482 void YAHOO_CALLBACK_TYPE(ext_yahoo_buddyicon_uploaded)(int id, const char *url); 498 void YAHOO_CALLBACK_TYPE(ext_yahoo_buddyicon_uploaded) (int id, 499 const char *url); 483 500 484 501 /* … … 505 522 * a timestamp to stay in sync 506 523 */ 507 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_webcam_image)(int id, const char * who, 508 const unsigned char *image, unsigned int image_size, unsigned int real_size, 524 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_webcam_image) (int id, 525 const char *who, const unsigned char *image, 526 unsigned int image_size, unsigned int real_size, 509 527 unsigned int timestamp); 510 511 528 512 529 /* … … 518 535 * from - who the invitation is from 519 536 */ 520 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_invite)(int id, const char *me, const char *from); 521 537 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_invite) (int id, 538 const char *me, const char *from); 522 539 523 540 /* … … 530 547 * accept - 0 (decline), 1 (accept) 531 548 */ 532 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_invite_reply)(int id, const char *me, const char *from, int accept); 533 549 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_invite_reply) (int id, 550 const char *me, const char *from, int accept); 534 551 535 552 /* … … 545 562 * 4 = user does not have webcam online 546 563 */ 547 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_closed)(int id, const char *who, int reason); 548 564 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_closed) (int id, 565 const char *who, int reason); 549 566 550 567 /* … … 560 577 * if you need to use the information, make a copy 561 578 */ 562 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_search_result)(int id, int found, int start, int total, YList *contacts); 563 579 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_search_result) (int id, 580 int found, int start, int total, YList *contacts); 564 581 565 582 /* … … 572 589 * num - Which error is this 573 590 */ 574 void YAHOO_CALLBACK_TYPE(ext_yahoo_error)(int id, const char *err, int fatal, int num); 575 591 void YAHOO_CALLBACK_TYPE(ext_yahoo_error) (int id, const char *err, 592 int fatal, int num); 576 593 577 594 /* … … 583 600 * connect - 0=disconnect 1=connect 2=request 584 601 */ 585 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_viewer)(int id, const char *who, int connect); 586 602 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_viewer) (int id, 603 const char *who, int connect); 587 604 588 605 /* … … 593 610 * send - whether to send images or not 594 611 */ 595 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_data_request)(int id, int send); 596 612 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_data_request) (int id, 613 int send); 597 614 598 615 /* … … 604 621 * 0 605 622 */ 606 int YAHOO_CALLBACK_TYPE(ext_yahoo_log)(const char *fmt, ...); 607 623 int YAHOO_CALLBACK_TYPE(ext_yahoo_log) (const char *fmt, ...); 608 624 609 625 /* … … 620 636 * Returns: a tag to be used when removing the handler 621 637 */ 622 int YAHOO_CALLBACK_TYPE(ext_yahoo_add_handler)(int id, int fd, yahoo_input_condition cond, void *data); 623 638 int YAHOO_CALLBACK_TYPE(ext_yahoo_add_handler) (int id, int fd, 639 yahoo_input_condition cond, void *data); 624 640 625 641 /* … … 630 646 * tag - the handler tag to remove 631 647 */ 632 void YAHOO_CALLBACK_TYPE(ext_yahoo_remove_handler)(int id, int tag); 633 648 void YAHOO_CALLBACK_TYPE(ext_yahoo_remove_handler) (int id, int tag); 634 649 635 650 /* … … 642 657 * a unix file descriptor to the socket 643 658 */ 644 int YAHOO_CALLBACK_TYPE(ext_yahoo_connect)(const char *host, int port); 645 659 int YAHOO_CALLBACK_TYPE(ext_yahoo_connect) (const char *host, int port); 646 660 647 661 /* 648 662 * Name: ext_yahoo_connect_async 649 * Connect to a host:port asynchronously. 663 * Connect to a host:port asynchronously. This function should return 650 664 * immediately returing a tag used to identify the connection handler, 651 665 * or a pre-connect error (eg: host name lookup failure). … … 663 677 * a unix file descriptor to the socket 664 678 */ 665 int YAHOO_CALLBACK_TYPE(ext_yahoo_connect_async)(int id, const char *host, int port, 666 yahoo_connect_callback callback, void *callback_data); 679 int YAHOO_CALLBACK_TYPE(ext_yahoo_connect_async) (int id, 680 const char *host, int port, yahoo_connect_callback callback, 681 void *callback_data); 667 682 668 683 #ifdef USE_STRUCT_CALLBACKS … … 673 688 * before doing anything else 674 689 */ 675 void yahoo_register_callbacks(struct yahoo_callbacks * 690 void yahoo_register_callbacks(struct yahoo_callbacks *tyc); 676 691 677 692 #undef YAHOO_CALLBACK_TYPE
Note: See TracChangeset
for help on using the changeset viewer.