Changeset cfc8d58 for protocols/yahoo/yahoo2_callbacks.h
- Timestamp:
- 2007-04-16T04:31:52Z (18 years ago)
- Branches:
- master
- Children:
- b3cae44
- Parents:
- 6bbb939
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/yahoo/yahoo2_callbacks.h
r6bbb939 rcfc8d58 29 29 * declared in this file and defined in libyahoo2.c 30 30 */ 31 32 31 33 32 … … 67 66 68 67 69 70 68 /* 71 69 * The following functions need to be implemented in the client … … 96 94 * url - url to reactivate account if locked 97 95 */ 98 void YAHOO_CALLBACK_TYPE(ext_yahoo_login_response)(int id, int succ, char *url); 99 100 96 void YAHOO_CALLBACK_TYPE(ext_yahoo_login_response)(int id, int succ, const char *url); 101 97 102 98 … … 111 107 112 108 113 114 115 109 /* 116 110 * Name: ext_yahoo_got_ignore … … 123 117 124 118 125 126 127 128 119 /* 129 120 * Name: ext_yahoo_got_identities … … 136 127 137 128 138 139 140 141 129 /* 142 130 * Name: ext_yahoo_got_cookies … … 148 136 149 137 138 /* 139 * Name: ext_yahoo_got_ping 140 * Called when the ping packet is received from the server 141 * Params: 142 * id - the id that identifies the server connection 143 * errormsg - optional error message 144 */ 145 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_ping)(int id, const char *errormsg); 150 146 151 147 … … 159 155 * msg - the message if stat == YAHOO_STATUS_CUSTOM 160 156 * away - whether the contact is away or not (YAHOO_STATUS_CUSTOM) 161 * for YAHOO_STATUS_IDLE, this is the number of seconds he is idle162 * /163 void YAHOO_CALLBACK_TYPE(ext_yahoo_status_changed)(int id, char *who, int stat, char *msg, int away); 164 165 157 * idle - this is the number of seconds he is idle [if he is idle] 158 * mobile - this is set for mobile users/buddies 159 * TODO: add support for pager, chat, and game states 160 */ 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); 166 162 167 163 … … 171 167 * Params: 172 168 * id - the id that identifies the server connection 169 * me - the identity the message was sent to 173 170 * who - the handle of the remote user 174 171 * msg - the message - NULL if stat == 2 … … 180 177 * utf8 - whether the message is encoded as utf8 or not 181 178 */ 182 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_im)(int id, char *who, char *msg, long tm, int stat, int utf8); 183 184 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); 185 180 186 181 … … 190 185 * Params: 191 186 * id - the id that identifies the server connection 187 * me - the identity the invitation was sent to 192 188 * who - the user inviting you 193 189 * room - the room to join … … 195 191 * members - the initial members of the conference (null terminated list) 196 192 */ 197 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_conf_invite)(int id, char *who, char *room, char *msg, YList *members); 198 199 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); 200 194 201 195 … … 205 199 * Params: 206 200 * id - the id that identifies the server connection 201 * me - the identity in the conference 207 202 * who - the user who has declined 208 203 * room - the room 209 204 * msg - the declining message 210 205 */ 211 void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userdecline)(int id, char *who, char *room, char *msg); 212 213 206 void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userdecline)(int id, const char *me, const char *who, const char *room, const char *msg); 214 207 215 208 … … 219 212 * Params: 220 213 * id - the id that identifies the server connection 214 * me - the identity in the conference 221 215 * who - the user who has joined 222 216 * room - the room joined 223 217 */ 224 void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userjoin)(int id, char *who, char *room); 225 226 218 void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userjoin)(int id, const char *me, const char *who, const char *room); 227 219 228 220 … … 232 224 * Params: 233 225 * id - the id that identifies the server connection 226 * me - the identity in the conference 234 227 * who - the user who has left 235 228 * room - the room left 236 229 */ 237 void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userleave)(int id, char *who, char *room); 238 239 240 241 230 void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userleave)(int id, const char *me, const char *who, const char *room); 242 231 243 232 244 233 /* 245 234 * Name: ext_yahoo_chat_cat_xml 246 * Called when joining the chatroom.235 * Called when ? 247 236 * Params: 248 237 * id - the id that identifies the server connection 249 * room - the room joined, used in all other chat calls, freed by 250 * library after call 251 * topic - the topic of the room, freed by library after call 252 * members - the initial members of the chatroom (null terminated YList of 253 * yahoo_chat_member's) Must be freed by the client 254 */ 255 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_cat_xml)(int id, char *xml); 256 257 258 259 260 238 * xml - ? 239 */ 240 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_cat_xml)(int id, const char *xml); 261 241 262 242 … … 266 246 * Params: 267 247 * id - the id that identifies the server connection 248 * me - the identity in the chatroom 268 249 * room - the room joined, used in all other chat calls, freed by 269 250 * library after call … … 273 254 * fd - the socket where the connection is coming from (for tracking) 274 255 */ 275 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_join)(int id, char *room, char *topic, YList *members, int fd); 276 277 278 279 256 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_join)(int id, const char *me, const char *room, const char *topic, YList *members, int fd); 280 257 281 258 … … 285 262 * Params: 286 263 * id - the id that identifies the server connection 264 * me - the identity in the chatroom 287 265 * room - the room joined 288 266 * who - the user who has joined, Must be freed by the client 289 267 */ 290 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_userjoin)(int id, char *room, struct yahoo_chat_member *who); 291 292 268 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_userjoin)(int id, const char *me, const char *room, struct yahoo_chat_member *who); 293 269 294 270 … … 298 274 * Params: 299 275 * id - the id that identifies the server connection 276 * me - the identity in the chatroom 300 277 * room - the room left 301 278 * who - the user who has left (Just the User ID) 302 279 */ 303 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_userleave)(int id, char *room, char *who); 304 305 280 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_userleave)(int id, const char *me, const char *room, const char *who); 306 281 307 282 … … 311 286 * Params: 312 287 * id - the id that identifies the server connection 288 * me - the identity in the chatroom 313 289 * room - the room 314 290 * who - the user who messaged (Just the user id) … … 318 294 * utf8 - whether the message is utf8 encoded or not 319 295 */ 320 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_message)(int id, char *who, char *room, char *msg, int msgtype, int utf8); 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 321 298 322 299 /* … … 329 306 * Params: 330 307 * id - the id that identifies this connection 308 * me - the identity in the chatroom 331 309 * Returns: 332 310 * nothing. 333 311 */ 334 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_yahoologout)(int id); 312 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_yahoologout)(int id, const char *me); 313 335 314 336 315 /* … … 344 323 * Params: 345 324 * id - the id that identifies this connection 325 * me - the identity in the chatroom 346 326 * Returns: 347 327 * nothing. 348 328 */ 349 350 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_yahooerror)(int id); 329 void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_yahooerror)(int id, const char *me); 330 351 331 352 332 /* … … 355 335 * Params: 356 336 * id - the id that identifies the server connection 337 * me - the identity the conf message was sent to 357 338 * who - the user who messaged 358 339 * room - the room … … 360 341 * utf8 - whether the message is utf8 encoded or not 361 342 */ 362 void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_message)(int id, char *who, char *room, char *msg, int utf8); 363 364 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); 365 344 366 345 … … 370 349 * Params: 371 350 * id - the id that identifies the server connection 351 * me - the identity the file was sent to 372 352 * who - the user who sent the file 373 353 * url - the file url … … 377 357 * fsize- the file size if direct transfer 378 358 */ 379 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_file)(int id, char *who, char *url, long expires, char *msg, char *fname, unsigned long fesize); 380 381 359 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_file)(int id, const char *me, const char *who, const char *url, long expires, const char *msg, const char *fname, unsigned long fesize); 382 360 383 361 … … 391 369 * msg - any message sent 392 370 */ 393 void YAHOO_CALLBACK_TYPE(ext_yahoo_contact_added)(int id, char *myid, char *who, char *msg); 394 395 371 void YAHOO_CALLBACK_TYPE(ext_yahoo_contact_added)(int id, const char *myid, const char *who, const char *msg); 396 372 397 373 … … 404 380 * msg - any message sent 405 381 */ 406 void YAHOO_CALLBACK_TYPE(ext_yahoo_rejected)(int id, char *who, char *msg); 407 408 382 void YAHOO_CALLBACK_TYPE(ext_yahoo_rejected)(int id, const char *who, const char *msg); 409 383 410 384 … … 414 388 * Params: 415 389 * id - the id that identifies the server connection 390 * me - the handle of the identity the notification is sent to 416 391 * who - the handle of the remote user 417 392 * stat - 1 if typing, 0 if stopped typing 418 393 */ 419 void YAHOO_CALLBACK_TYPE(ext_yahoo_typing_notify)(int id, char *who, int stat); 420 421 394 void YAHOO_CALLBACK_TYPE(ext_yahoo_typing_notify)(int id, const char *me, const char *who, int stat); 422 395 423 396 … … 427 400 * Params: 428 401 * id - the id that identifies the server connection 402 * me - the handle of the identity the notification is sent to 429 403 * who - the handle of the remote user 430 404 * stat - 1 if game, 0 if stopped gaming 431 405 */ 432 void YAHOO_CALLBACK_TYPE(ext_yahoo_game_notify)(int id, char *who, int stat); 433 434 406 void YAHOO_CALLBACK_TYPE(ext_yahoo_game_notify)(int id, const char *me, const char *who, int stat); 435 407 436 408 … … 444 416 * cnt - mail count - 0 if new mail notification 445 417 */ 446 void YAHOO_CALLBACK_TYPE(ext_yahoo_mail_notify)(int id, char *from, char *subj, int cnt); 447 448 418 void YAHOO_CALLBACK_TYPE(ext_yahoo_mail_notify)(int id, const char *from, const char *subj, int cnt); 449 419 450 420 … … 456 426 * msg - the message 457 427 */ 458 void YAHOO_CALLBACK_TYPE(ext_yahoo_system_message)(int id, char *msg); 459 460 461 462 463 464 465 466 467 468 428 void YAHOO_CALLBACK_TYPE(ext_yahoo_system_message)(int id, const char *msg); 429 430 /* 431 * Name: ext_yahoo_got_buddyicon 432 * Buddy icon received 433 * Params: 434 * id - the id that identifies the server connection 435 * me - the handle of the identity the notification is sent to 436 * who - the person the buddy icon is for 437 * url - the url to use to load the icon 438 * checksum - the checksum of the icon content 439 */ 440 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buddyicon)(int id, const char *me, const char *who, const char *url, int checksum); 441 442 /* 443 * Name: ext_yahoo_got_buddyicon_checksum 444 * Buddy icon checksum received 445 * Params: 446 * id - the id that identifies the server connection 447 * me - the handle of the identity the notification is sent to 448 * who - the yahoo id of the buddy icon checksum is for 449 * checksum - the checksum of the icon content 450 */ 451 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buddyicon_checksum)(int id, const char *me,const char *who, int checksum); 452 453 /* 454 * Name: ext_yahoo_got_buddyicon_request 455 * Buddy icon request received 456 * Params: 457 * id - the id that identifies the server connection 458 * me - the handle of the identity the notification is sent to 459 * who - the yahoo id of the buddy that requested the buddy icon 460 */ 461 void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buddyicon_request)(int id, const char *me, const char *who); 462 463 /* 464 * Name: ext_yahoo_got_buddyicon_request 465 * Buddy icon request received 466 * Params: 467 * id - the id that identifies the server connection 468 * url - remote url, the uploaded buddy icon can be fetched from 469 */ 470 void YAHOO_CALLBACK_TYPE(ext_yahoo_buddyicon_uploaded)(int id, const char *url); 469 471 470 472 /* … … 496 498 497 499 498 499 500 500 /* 501 501 * Name: ext_yahoo_webcam_invite … … 503 503 * Params: 504 504 * id - the id that identifies the server connection 505 * me - identity the invitation is to 505 506 * from - who the invitation is from 506 507 */ 507 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_invite)(int id, char *from); 508 509 508 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_invite)(int id, const char *me, const char *from); 510 509 511 510 … … 515 514 * Params: 516 515 * id - the id that identifies the server connection 516 * me - identity the invitation response is to 517 517 * from - who the invitation response is from 518 518 * accept - 0 (decline), 1 (accept) 519 519 */ 520 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_invite_reply)(int id, char *from, int accept); 521 520 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_invite_reply)(int id, const char *me, const char *from, int accept); 522 521 523 522 … … 534 533 * 4 = user does not have webcam online 535 534 */ 536 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_closed)(int id, c har *who, int reason);535 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_closed)(int id, const char *who, int reason); 537 536 538 537 … … 552 551 553 552 554 555 553 /* 556 554 * Name: ext_yahoo_error … … 560 558 * err - the error message 561 559 * fatal- whether this error is fatal to the connection or not 562 */ 563 void YAHOO_CALLBACK_TYPE(ext_yahoo_error)(int id, char *err, int fatal); 564 565 560 * num - Which error is this 561 */ 562 void YAHOO_CALLBACK_TYPE(ext_yahoo_error)(int id, const char *err, int fatal, int num); 566 563 567 564 … … 574 571 * connect - 0=disconnect 1=connect 2=request 575 572 */ 576 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_viewer)(int id, char *who, int connect); 577 578 573 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_viewer)(int id, const char *who, int connect); 579 574 580 575 … … 587 582 */ 588 583 void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_data_request)(int id, int send); 589 590 591 584 592 585 … … 599 592 * 0 600 593 */ 601 int YAHOO_CALLBACK_TYPE(ext_yahoo_log)(char *fmt, ...); 602 603 604 605 606 607 594 int YAHOO_CALLBACK_TYPE(ext_yahoo_log)(const char *fmt, ...); 608 595 609 596 … … 624 611 625 612 626 627 628 613 /* 629 614 * Name: ext_yahoo_remove_handler … … 634 619 */ 635 620 void YAHOO_CALLBACK_TYPE(ext_yahoo_remove_handler)(int id, int tag); 636 637 638 639 621 640 622 … … 648 630 * a unix file descriptor to the socket 649 631 */ 650 int YAHOO_CALLBACK_TYPE(ext_yahoo_connect)(char *host, int port); 651 652 653 654 655 656 632 int YAHOO_CALLBACK_TYPE(ext_yahoo_connect)(const char *host, int port); 657 633 658 634 … … 675 651 * a unix file descriptor to the socket 676 652 */ 677 int YAHOO_CALLBACK_TYPE(ext_yahoo_connect_async)(int id, c har *host, int port,653 int YAHOO_CALLBACK_TYPE(ext_yahoo_connect_async)(int id, const char *host, int port, 678 654 yahoo_connect_callback callback, void *callback_data); 679 655 … … 686 662 */ 687 663 void yahoo_register_callbacks(struct yahoo_callbacks * tyc); 688 664 689 665 #undef YAHOO_CALLBACK_TYPE 690 666 … … 696 672 697 673 #endif 674
Note: See TracChangeset
for help on using the changeset viewer.