Mercurial > pidgin
comparison src/protocols/oscar/oscar.h @ 13239:f260d319bbbc
[gaim-migrate @ 15605]
Renaming a bunch of structs and typedefs to use the same naming
scheme as the rest of Gaim
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 12 Feb 2006 16:02:05 +0000 |
parents | f2431a7e33aa |
children | 2871c385c45a |
comparison
equal
deleted
inserted
replaced
13238:1e855032d7bc | 13239:f260d319bbbc |
---|---|
26 * | 26 * |
27 */ | 27 */ |
28 | 28 |
29 #ifndef _OSCAR_H_ | 29 #ifndef _OSCAR_H_ |
30 #define _OSCAR_H_ | 30 #define _OSCAR_H_ |
31 | |
32 #include "snactypes.h" | |
33 | 31 |
34 #include "debug.h" | 32 #include "debug.h" |
35 #include "internal.h" | 33 #include "internal.h" |
36 | 34 |
37 #include <stdio.h> | 35 #include <stdio.h> |
51 #include <sys/socket.h> | 49 #include <sys/socket.h> |
52 #else | 50 #else |
53 #include "libc_interface.h" | 51 #include "libc_interface.h" |
54 #endif | 52 #endif |
55 | 53 |
54 typedef struct _ByteStream ByteStream; | |
55 typedef struct _ClientInfo ClientInfo; | |
56 typedef struct _FlapFrame FlapFrame; | |
57 typedef struct _IcbmCookie IcbmCookie; | |
58 typedef struct _OscarConnection OscarConnection; | |
59 typedef struct _OscarSession OscarSession; | |
60 | |
61 typedef guint32 aim_snacid_t; | |
62 typedef guint16 flap_seqnum_t; | |
63 | |
64 #include "peer.h" | |
65 #include "snactypes.h" | |
66 | |
56 #ifdef __cplusplus | 67 #ifdef __cplusplus |
57 extern "C" { | 68 extern "C" { |
58 #endif | 69 #endif |
59 | |
60 typedef guint32 aim_snacid_t; | |
61 typedef guint16 flap_seqnum_t; | |
62 | 70 |
63 #define WIN32_STATIC | 71 #define WIN32_STATIC |
64 #if defined(_WIN32) && !defined(WIN32_STATIC) | 72 #if defined(_WIN32) && !defined(WIN32_STATIC) |
65 /* | 73 /* |
66 * For a win32 DLL, we define WIN32_INDLL if this file | 74 * For a win32 DLL, we define WIN32_INDLL if this file |
80 */ | 88 */ |
81 #define faim_export | 89 #define faim_export |
82 #define faim_internal | 90 #define faim_internal |
83 #endif | 91 #endif |
84 | 92 |
85 #ifndef FALSE | |
86 #define FALSE (0) | |
87 #endif | |
88 | |
89 #ifndef TRUE | |
90 #define TRUE (!FALSE) | |
91 #endif | |
92 | |
93 #define FAIM_SNAC_HASH_SIZE 16 | 93 #define FAIM_SNAC_HASH_SIZE 16 |
94 | 94 |
95 /* | 95 /* |
96 * Current Maximum Length for Screen Names (not including NULL) | 96 * Current Maximum Length for Screen Names (not including NULL) |
97 * | 97 * |
125 | 125 |
126 /* | 126 /* |
127 * Current Maximum Length for Chat Room Messages | 127 * Current Maximum Length for Chat Room Messages |
128 * | 128 * |
129 * This is actually defined by the protocol to be | 129 * This is actually defined by the protocol to be |
130 * dynamic, but I have yet to see due cause to | 130 * dynamic, but I have yet to see due cause to |
131 * define it dynamically here. Maybe later. | 131 * define it dynamically here. Maybe later. |
132 * | 132 * |
133 */ | 133 */ |
134 #define MAXCHATMSGLEN 512 | 134 #define MAXCHATMSGLEN 512 |
135 | 135 |
139 #define MAXICQPASSLEN 8 | 139 #define MAXICQPASSLEN 8 |
140 | 140 |
141 #define AIM_MD5_STRING "AOL Instant Messenger (SM)" | 141 #define AIM_MD5_STRING "AOL Instant Messenger (SM)" |
142 | 142 |
143 /* | 143 /* |
144 * Client info. Filled in by the client and passed in to | 144 * Client info. Filled in by the client and passed in to |
145 * aim_send_login(). The information ends up getting passed to OSCAR | 145 * aim_send_login(). The information ends up getting passed to OSCAR |
146 * through the initial login command. | 146 * through the initial login command. |
147 * | 147 * |
148 */ | 148 */ |
149 struct client_info_s { | 149 struct _ClientInfo |
150 { | |
150 const char *clientstring; | 151 const char *clientstring; |
151 guint16 clientid; | 152 guint16 clientid; |
152 guint16 major; | 153 guint16 major; |
153 guint16 minor; | 154 guint16 minor; |
154 guint16 point; | 155 guint16 point; |
384 #define AIM_CONN_STATUS_INPROGRESS 0x0100 | 385 #define AIM_CONN_STATUS_INPROGRESS 0x0100 |
385 | 386 |
386 #define AIM_FRAMETYPE_FLAP 0x0000 | 387 #define AIM_FRAMETYPE_FLAP 0x0000 |
387 #define AIM_FRAMETYPE_OFT 0x0001 | 388 #define AIM_FRAMETYPE_OFT 0x0001 |
388 | 389 |
389 typedef struct aim_conn_s { | 390 struct _OscarConnection |
391 { | |
390 int fd; | 392 int fd; |
391 guint16 type; | 393 guint16 type; |
392 guint16 subtype; | 394 guint16 subtype; |
393 flap_seqnum_t seqnum; | 395 flap_seqnum_t seqnum; |
394 guint32 status; | 396 guint32 status; |
397 time_t lastactivity; /* time of last transmit */ | 399 time_t lastactivity; /* time of last transmit */ |
398 int forcedlatency; | 400 int forcedlatency; |
399 void *handlerlist; | 401 void *handlerlist; |
400 void *sessv; /* pointer to parent session */ | 402 void *sessv; /* pointer to parent session */ |
401 void *inside; /* only accessible from inside libfaim */ | 403 void *inside; /* only accessible from inside libfaim */ |
402 struct aim_conn_s *next; | 404 struct _OscarConnection *next; |
403 } aim_conn_t; | 405 }; |
404 | 406 |
405 /* | 407 /* |
406 * Byte Stream type. Sort of. | 408 * Byte Stream type. Sort of. |
407 * | 409 * |
408 * Use of this type serves a couple purposes: | 410 * Use of this type serves a couple purposes: |
414 * - I like having variables named "bs". | 416 * - I like having variables named "bs". |
415 * | 417 * |
416 * Don't touch the insides of this struct. Or I'll have to kill you. | 418 * Don't touch the insides of this struct. Or I'll have to kill you. |
417 * | 419 * |
418 */ | 420 */ |
419 typedef struct aim_bstream_s { | 421 struct _ByteStream |
422 { | |
420 guint8 *data; | 423 guint8 *data; |
421 guint32 len; | 424 guint32 len; |
422 guint32 offset; | 425 guint32 offset; |
423 } aim_bstream_t; | 426 }; |
424 | 427 |
425 typedef struct aim_frame_s { | 428 struct _FlapFrame |
429 { | |
426 guint8 hdrtype; /* defines which piece of the union to use */ | 430 guint8 hdrtype; /* defines which piece of the union to use */ |
427 union { | 431 union { |
428 struct { | 432 struct { |
429 guint8 channel; | 433 guint8 channel; |
430 flap_seqnum_t seqnum; | 434 flap_seqnum_t seqnum; |
433 guint8 magic[4]; /* ODC2 or OFT2 */ | 437 guint8 magic[4]; /* ODC2 or OFT2 */ |
434 guint16 hdrlen; | 438 guint16 hdrlen; |
435 guint16 type; | 439 guint16 type; |
436 } rend; | 440 } rend; |
437 } hdr; | 441 } hdr; |
438 aim_bstream_t data; /* payload stream */ | 442 ByteStream data; /* payload stream */ |
439 aim_conn_t *conn; /* the connection it came in on/is going out on */ | 443 OscarConnection *conn; /* the connection it came in on/is going out on */ |
440 guint8 handled; /* 0 = new, !0 = been handled */ | 444 guint8 handled; /* 0 = new, !0 = been handled */ |
441 struct aim_frame_s *next; | 445 struct _FlapFrame *next; |
442 } aim_frame_t; | 446 }; |
443 | 447 |
444 typedef struct aim_msgcookie_s { | 448 struct _IcbmCookie |
449 { | |
445 guchar cookie[8]; | 450 guchar cookie[8]; |
446 int type; | 451 int type; |
447 void *data; | 452 void *data; |
448 time_t addtime; | 453 time_t addtime; |
449 struct aim_msgcookie_s *next; | 454 struct _IcbmCookie *next; |
450 } aim_msgcookie_t; | 455 }; |
451 | 456 |
452 /* | 457 /* |
453 * AIM Session: The main client-data interface. | 458 * AIM Session: The main client-data interface. |
454 * | 459 * |
455 */ | 460 */ |
456 typedef struct aim_session_s { | 461 struct _OscarSession |
462 { | |
457 | 463 |
458 /* ---- Client Accessible ------------------------ */ | 464 /* ---- Client Accessible ------------------------ */ |
459 | 465 |
460 /* Our screen name. */ | 466 /* Our screen name. */ |
461 char sn[MAXSNLEN+1]; | 467 char sn[MAXSNLEN+1]; |
462 | 468 |
463 /* | 469 /* |
464 * Pointer to anything the client wants to | 470 * Pointer to anything the client wants to |
465 * explicitly associate with this session. | 471 * explicitly associate with this session. |
466 * | 472 * |
467 * This is for use in the callbacks mainly. In any | 473 * This is for use in the callbacks mainly. In any |
468 * callback, you can access this with sess->aux_data. | 474 * callback, you can access this with sess->aux_data. |
469 * | 475 * |
471 void *aux_data; | 477 void *aux_data; |
472 | 478 |
473 /* ---- Internal Use Only ------------------------ */ | 479 /* ---- Internal Use Only ------------------------ */ |
474 | 480 |
475 /* Connection information */ | 481 /* Connection information */ |
476 aim_conn_t *connlist; | 482 OscarConnection *connlist; |
477 | 483 |
478 /* | 484 /* |
479 * Transmit/receive queues. | 485 * Transmit/receive queues. |
480 * | 486 * |
481 * These are only used when you don't use your own lowlevel | 487 * These are only used when you don't use your own lowlevel |
482 * I/O. I don't suggest that you use libfaim's internal I/O. | 488 * I/O. I don't suggest that you use libfaim's internal I/O. |
483 * Its really bad and the API/event model is quirky at best. | 489 * Its really bad and the API/event model is quirky at best. |
484 * | 490 * |
485 */ | 491 */ |
486 aim_frame_t *queue_outgoing; | 492 FlapFrame *queue_outgoing; |
487 aim_frame_t *queue_incoming; | 493 FlapFrame *queue_incoming; |
488 | 494 |
489 /* | 495 /* |
490 * Tx Enqueuing function. | 496 * Tx Enqueuing function. |
491 * | 497 * |
492 * This is how you override the transmit direction of libfaim's | 498 * This is how you override the transmit direction of libfaim's |
493 * internal I/O. This function will be called whenever it needs | 499 * internal I/O. This function will be called whenever it needs |
494 * to send something. | 500 * to send something. |
495 * | 501 * |
496 */ | 502 */ |
497 int (*tx_enqueue)(struct aim_session_s *, aim_frame_t *); | 503 int (*tx_enqueue)(OscarSession *, FlapFrame *); |
498 | 504 |
499 void *modlistv; | 505 void *modlistv; |
500 | 506 |
501 struct { | 507 struct { |
502 char server[128]; | 508 char server[128]; |
512 * XXX: Should these be per-connection? -mid | 518 * XXX: Should these be per-connection? -mid |
513 */ | 519 */ |
514 void *snac_hash[FAIM_SNAC_HASH_SIZE]; | 520 void *snac_hash[FAIM_SNAC_HASH_SIZE]; |
515 aim_snacid_t snacid_next; | 521 aim_snacid_t snacid_next; |
516 | 522 |
517 aim_msgcookie_t *msgcookies; | 523 IcbmCookie *msgcookies; |
518 struct aim_icq_info *icq_info; | 524 struct aim_icq_info *icq_info; |
519 struct aim_oft_info *oft_info; | 525 PeerInfo *oft_info; |
520 struct aim_authresp_info *authinfo; | 526 struct aim_authresp_info *authinfo; |
521 struct aim_emailinfo *emailinfo; | 527 struct aim_emailinfo *emailinfo; |
522 | 528 |
523 struct { | 529 struct { |
524 struct aim_userinfo_s *userinfo; | 530 struct aim_userinfo_s *userinfo; |
535 struct aim_ssi_item *local; | 541 struct aim_ssi_item *local; |
536 struct aim_ssi_tmp *pending; | 542 struct aim_ssi_tmp *pending; |
537 time_t timestamp; | 543 time_t timestamp; |
538 int waiting_for_ack; | 544 int waiting_for_ack; |
539 } ssi; | 545 } ssi; |
540 } aim_session_t; | 546 }; |
541 | 547 |
542 /* Valid for calling aim_icq_setstatus() and for aim_userinfo_t->icqinfo.status */ | 548 /* Valid for calling aim_icq_setstatus() and for aim_userinfo_t->icqinfo.status */ |
543 #define AIM_ICQ_STATE_NORMAL 0x00000000 | 549 #define AIM_ICQ_STATE_NORMAL 0x00000000 |
544 #define AIM_ICQ_STATE_AWAY 0x00000001 | 550 #define AIM_ICQ_STATE_AWAY 0x00000001 |
545 #define AIM_ICQ_STATE_DND 0x00000002 | 551 #define AIM_ICQ_STATE_DND 0x00000002 |
560 * | 566 * |
561 * aim_get_commmand() is the libfaim lowlevel I/O in the receive direction. | 567 * aim_get_commmand() is the libfaim lowlevel I/O in the receive direction. |
562 * XXX Make this easily overridable. | 568 * XXX Make this easily overridable. |
563 * | 569 * |
564 */ | 570 */ |
565 faim_export int aim_get_command(aim_session_t *, aim_conn_t *); | 571 faim_export int aim_get_command(OscarSession *, OscarConnection *); |
566 | 572 |
567 /* | 573 /* |
568 * Dispatch commands that are in the rx queue. | 574 * Dispatch commands that are in the rx queue. |
569 */ | 575 */ |
570 faim_export void aim_rxdispatch(aim_session_t *); | 576 faim_export void aim_rxdispatch(OscarSession *); |
571 | 577 |
572 faim_export int aim_debugconn_sendconnect(aim_session_t *sess, aim_conn_t *conn); | 578 faim_export int aim_debugconn_sendconnect(OscarSession *sess, OscarConnection *conn); |
573 | 579 |
574 faim_export int aim_logoff(aim_session_t *); | 580 faim_export int aim_logoff(OscarSession *); |
575 | 581 |
576 /* the library should never call aim_conn_kill */ | 582 /* the library should never call aim_conn_kill */ |
577 faim_export void aim_conn_kill(aim_session_t *sess, aim_conn_t **deadconn); | 583 faim_export void aim_conn_kill(OscarSession *sess, OscarConnection **deadconn); |
578 | 584 |
579 typedef int (*aim_rxcallback_t)(aim_session_t *, aim_frame_t *, ...); | 585 typedef int (*aim_rxcallback_t)(OscarSession *, FlapFrame *, ...); |
580 | 586 |
581 | 587 |
582 /* auth.c */ | 588 /* family_auth.c */ |
583 struct aim_clientrelease { | 589 struct aim_clientrelease |
590 { | |
584 char *name; | 591 char *name; |
585 guint32 build; | 592 guint32 build; |
586 char *url; | 593 char *url; |
587 char *info; | 594 char *info; |
588 }; | 595 }; |
589 | 596 |
590 struct aim_authresp_info { | 597 struct aim_authresp_info |
598 { | |
591 char *sn; | 599 char *sn; |
592 guint16 errorcode; | 600 guint16 errorcode; |
593 char *errorurl; | 601 char *errorurl; |
594 guint16 regstatus; | 602 guint16 regstatus; |
595 char *email; | 603 char *email; |
600 struct aim_clientrelease latestrelease; | 608 struct aim_clientrelease latestrelease; |
601 struct aim_clientrelease latestbeta; | 609 struct aim_clientrelease latestbeta; |
602 }; | 610 }; |
603 | 611 |
604 /* Callback data for redirect. */ | 612 /* Callback data for redirect. */ |
605 struct aim_redirect_data { | 613 struct aim_redirect_data |
614 { | |
606 guint16 group; | 615 guint16 group; |
607 const char *ip; | 616 const char *ip; |
608 guint16 cookielen; | 617 guint16 cookielen; |
609 const guint8 *cookie; | 618 const guint8 *cookie; |
610 struct { /* group == AIM_CONN_TYPE_CHAT */ | 619 struct { /* group == AIM_CONN_TYPE_CHAT */ |
612 const char *room; | 621 const char *room; |
613 guint16 instance; | 622 guint16 instance; |
614 } chat; | 623 } chat; |
615 }; | 624 }; |
616 | 625 |
617 faim_export int aim_clientready(aim_session_t *sess, aim_conn_t *conn); | 626 faim_export int aim_clientready(OscarSession *sess, OscarConnection *conn); |
618 faim_export int aim_sendflapver(aim_session_t *sess, aim_conn_t *conn); | 627 faim_export int aim_sendflapver(OscarSession *sess, OscarConnection *conn); |
619 faim_export int aim_request_login(aim_session_t *sess, aim_conn_t *conn, const char *sn); | 628 faim_export int aim_request_login(OscarSession *sess, OscarConnection *conn, const char *sn); |
620 faim_export int aim_send_login(aim_session_t *, aim_conn_t *, const char *, const char *, struct client_info_s *, const char *key); | 629 faim_export int aim_send_login(OscarSession *, OscarConnection *, const char *, const char *, ClientInfo *, const char *key); |
621 /* 0x000b */ faim_export int aim_auth_securid_send(aim_session_t *sess, const char *securid); | 630 /* 0x000b */ faim_export int aim_auth_securid_send(OscarSession *sess, const char *securid); |
622 | 631 |
623 faim_export void aim_purge_rxqueue(aim_session_t *); | 632 faim_export void aim_purge_rxqueue(OscarSession *); |
624 faim_export void aim_cleansnacs(aim_session_t *, int maxage); | 633 faim_export void aim_cleansnacs(OscarSession *, int maxage); |
625 | 634 |
626 #define AIM_TX_QUEUED 0 /* default */ | 635 #define AIM_TX_QUEUED 0 /* default */ |
627 #define AIM_TX_IMMEDIATE 1 | 636 #define AIM_TX_IMMEDIATE 1 |
628 #define AIM_TX_USER 2 | 637 #define AIM_TX_USER 2 |
629 faim_export int aim_tx_setenqueue(aim_session_t *sess, int what, int (*func)(aim_session_t *, aim_frame_t *)); | 638 faim_export int aim_tx_setenqueue(OscarSession *sess, int what, int (*func)(OscarSession *, FlapFrame *)); |
630 | 639 |
631 faim_export int aim_tx_flushqueue(aim_session_t *); | 640 faim_export int aim_tx_flushqueue(OscarSession *); |
632 faim_export void aim_tx_purgequeue(aim_session_t *); | 641 faim_export void aim_tx_purgequeue(OscarSession *); |
633 | 642 |
634 faim_export int aim_conn_setlatency(aim_conn_t *conn, int newval); | 643 faim_export int aim_conn_setlatency(OscarConnection *conn, int newval); |
635 | 644 |
636 faim_export int aim_conn_addhandler(aim_session_t *, aim_conn_t *conn, guint16 family, guint16 type, aim_rxcallback_t newhandler, guint16 flags); | 645 faim_export int aim_conn_addhandler(OscarSession *, OscarConnection *conn, guint16 family, guint16 type, aim_rxcallback_t newhandler, guint16 flags); |
637 faim_export int aim_clearhandlers(aim_conn_t *conn); | 646 faim_export int aim_clearhandlers(OscarConnection *conn); |
638 | 647 |
639 faim_export aim_conn_t *aim_conn_findbygroup(aim_session_t *sess, guint16 group); | 648 faim_export OscarConnection *aim_conn_findbygroup(OscarSession *sess, guint16 group); |
640 faim_export aim_session_t *aim_conn_getsess(aim_conn_t *conn); | 649 faim_export OscarSession *aim_conn_getsess(OscarConnection *conn); |
641 faim_export void aim_conn_close(aim_conn_t *deadconn); | 650 faim_export void aim_conn_close(OscarConnection *deadconn); |
642 faim_export aim_conn_t *aim_newconn(aim_session_t *, int type); | 651 faim_export OscarConnection *aim_newconn(OscarSession *, int type); |
643 faim_export int aim_conn_in_sess(aim_session_t *sess, aim_conn_t *conn); | 652 faim_export int aim_conn_in_sess(OscarSession *sess, OscarConnection *conn); |
644 faim_export int aim_conn_isready(aim_conn_t *); | 653 faim_export int aim_conn_isready(OscarConnection *); |
645 faim_export int aim_conn_setstatus(aim_conn_t *, int); | 654 faim_export int aim_conn_setstatus(OscarConnection *, int); |
646 faim_export int aim_conn_completeconnect(aim_session_t *sess, aim_conn_t *conn); | 655 faim_export int aim_conn_completeconnect(OscarSession *sess, OscarConnection *conn); |
647 faim_export int aim_conn_isconnecting(aim_conn_t *conn); | 656 faim_export int aim_conn_isconnecting(OscarConnection *conn); |
648 | 657 |
649 faim_export void aim_session_init(aim_session_t *, guint8 nonblocking); | 658 faim_export void aim_session_init(OscarSession *, guint8 nonblocking); |
650 faim_export void aim_session_kill(aim_session_t *); | 659 faim_export void aim_session_kill(OscarSession *); |
651 faim_export aim_conn_t *aim_getconn_type(aim_session_t *, int type); | 660 faim_export OscarConnection *aim_getconn_type(OscarSession *, int type); |
652 faim_export aim_conn_t *aim_getconn_type_all(aim_session_t *, int type); | 661 faim_export OscarConnection *aim_getconn_type_all(OscarSession *, int type); |
653 faim_export aim_conn_t *aim_getconn_fd(aim_session_t *, int fd); | 662 faim_export OscarConnection *aim_getconn_fd(OscarSession *, int fd); |
654 | 663 |
655 /* 0x0001 - service.c */ | 664 /* 0x0001 - family_oservice.c */ |
656 faim_export int aim_srv_setstatusmsg(aim_session_t *sess, const char *msg); | 665 faim_export int aim_srv_setstatusmsg(OscarSession *sess, const char *msg); |
657 faim_export int aim_srv_setidle(aim_session_t *sess, guint32 idletime); | 666 faim_export int aim_srv_setidle(OscarSession *sess, guint32 idletime); |
658 | 667 |
659 /* misc.c */ | 668 /* misc.c */ |
660 | 669 |
661 #define AIM_VISIBILITYCHANGE_PERMITADD 0x05 | 670 #define AIM_VISIBILITYCHANGE_PERMITADD 0x05 |
662 #define AIM_VISIBILITYCHANGE_PERMITREMOVE 0x06 | 671 #define AIM_VISIBILITYCHANGE_PERMITREMOVE 0x06 |
666 #define AIM_PRIVFLAGS_ALLOWIDLE 0x01 | 675 #define AIM_PRIVFLAGS_ALLOWIDLE 0x01 |
667 #define AIM_PRIVFLAGS_ALLOWMEMBERSINCE 0x02 | 676 #define AIM_PRIVFLAGS_ALLOWMEMBERSINCE 0x02 |
668 | 677 |
669 #define AIM_WARN_ANON 0x01 | 678 #define AIM_WARN_ANON 0x01 |
670 | 679 |
671 faim_export int aim_sendpauseack(aim_session_t *sess, aim_conn_t *conn); | 680 faim_export int aim_sendpauseack(OscarSession *sess, OscarConnection *conn); |
672 faim_export int aim_nop(aim_session_t *, aim_conn_t *); | 681 faim_export int aim_nop(OscarSession *, OscarConnection *); |
673 faim_export int aim_flap_nop(aim_session_t *sess, aim_conn_t *conn); | 682 faim_export int aim_flap_nop(OscarSession *sess, OscarConnection *conn); |
674 faim_export int aim_bos_changevisibility(aim_session_t *, aim_conn_t *, int, const char *); | 683 faim_export int aim_bos_changevisibility(OscarSession *, OscarConnection *, int, const char *); |
675 faim_export int aim_bos_setgroupperm(aim_session_t *, aim_conn_t *, guint32 mask); | 684 faim_export int aim_bos_setgroupperm(OscarSession *, OscarConnection *, guint32 mask); |
676 faim_export int aim_bos_setprivacyflags(aim_session_t *, aim_conn_t *, guint32); | 685 faim_export int aim_bos_setprivacyflags(OscarSession *, OscarConnection *, guint32); |
677 faim_export int aim_reqpersonalinfo(aim_session_t *, aim_conn_t *); | 686 faim_export int aim_reqpersonalinfo(OscarSession *, OscarConnection *); |
678 faim_export int aim_reqservice(aim_session_t *, aim_conn_t *, guint16); | 687 faim_export int aim_reqservice(OscarSession *, OscarConnection *, guint16); |
679 faim_export int aim_bos_reqrights(aim_session_t *, aim_conn_t *); | 688 faim_export int aim_bos_reqrights(OscarSession *, OscarConnection *); |
680 faim_export int aim_setextstatus(aim_session_t *sess, guint32 status); | 689 faim_export int aim_setextstatus(OscarSession *sess, guint32 status); |
681 | 690 |
682 #define AIM_CLIENTTYPE_UNKNOWN 0x0000 | 691 #define AIM_CLIENTTYPE_UNKNOWN 0x0000 |
683 #define AIM_CLIENTTYPE_MC 0x0001 | 692 #define AIM_CLIENTTYPE_MC 0x0001 |
684 #define AIM_CLIENTTYPE_WINAIM 0x0002 | 693 #define AIM_CLIENTTYPE_WINAIM 0x0002 |
685 #define AIM_CLIENTTYPE_WINAIM41 0x0003 | 694 #define AIM_CLIENTTYPE_WINAIM41 0x0003 |
688 | 697 |
689 #define AIM_RATE_CODE_CHANGE 0x0001 | 698 #define AIM_RATE_CODE_CHANGE 0x0001 |
690 #define AIM_RATE_CODE_WARNING 0x0002 | 699 #define AIM_RATE_CODE_WARNING 0x0002 |
691 #define AIM_RATE_CODE_LIMIT 0x0003 | 700 #define AIM_RATE_CODE_LIMIT 0x0003 |
692 #define AIM_RATE_CODE_CLEARLIMIT 0x0004 | 701 #define AIM_RATE_CODE_CLEARLIMIT 0x0004 |
693 faim_export int aim_ads_requestads(aim_session_t *sess, aim_conn_t *conn); | 702 faim_export int aim_ads_requestads(OscarSession *sess, OscarConnection *conn); |
694 | 703 |
695 | 704 |
696 | 705 |
697 /* im.c */ | 706 /* family_icbm.c */ |
698 #define AIM_OFT_SUBTYPE_SEND_FILE 0x0001 | 707 #define AIM_OFT_SUBTYPE_SEND_FILE 0x0001 |
699 #define AIM_OFT_SUBTYPE_SEND_DIR 0x0002 | 708 #define AIM_OFT_SUBTYPE_SEND_DIR 0x0002 |
700 #define AIM_OFT_SUBTYPE_GET_FILE 0x0011 | 709 #define AIM_OFT_SUBTYPE_GET_FILE 0x0011 |
701 #define AIM_OPT_SUBTYPE_GET_LIST 0x0012 | 710 #define AIM_OPT_SUBTYPE_GET_LIST 0x0012 |
702 | 711 |
723 8000, \ | 732 8000, \ |
724 (99.9)*10, (99.9)*10, \ | 733 (99.9)*10, (99.9)*10, \ |
725 0 \ | 734 0 \ |
726 } | 735 } |
727 | 736 |
728 struct aim_icbmparameters { | 737 struct aim_icbmparameters |
738 { | |
729 guint16 maxchan; | 739 guint16 maxchan; |
730 guint32 flags; /* AIM_IMPARAM_FLAG_ */ | 740 guint32 flags; /* AIM_IMPARAM_FLAG_ */ |
731 guint16 maxmsglen; /* message size that you will accept */ | 741 guint16 maxmsglen; /* message size that you will accept */ |
732 guint16 maxsenderwarn; /* this and below are *10 (999=99.9%) */ | 742 guint16 maxsenderwarn; /* this and below are *10 (999=99.9%) */ |
733 guint16 maxrecverwarn; | 743 guint16 maxrecverwarn; |
734 guint32 minmsginterval; /* in milliseconds? */ | 744 guint32 minmsginterval; /* in milliseconds? */ |
735 }; | 745 }; |
736 | 746 |
737 struct aim_chat_roominfo { | 747 struct aim_chat_roominfo |
748 { | |
738 guint16 exchange; | 749 guint16 exchange; |
739 char *name; | 750 char *name; |
740 guint16 instance; | 751 guint16 instance; |
741 }; | 752 }; |
742 | 753 |
757 #define AIM_CHARSET_CUSTOM 0x0003 | 768 #define AIM_CHARSET_CUSTOM 0x0003 |
758 | 769 |
759 /* | 770 /* |
760 * Multipart message structures. | 771 * Multipart message structures. |
761 */ | 772 */ |
762 typedef struct aim_mpmsg_section_s { | 773 typedef struct aim_mpmsg_section_s |
774 { | |
763 guint16 charset; | 775 guint16 charset; |
764 guint16 charsubset; | 776 guint16 charsubset; |
765 gchar *data; | 777 gchar *data; |
766 guint16 datalen; | 778 guint16 datalen; |
767 struct aim_mpmsg_section_s *next; | 779 struct aim_mpmsg_section_s *next; |
768 } aim_mpmsg_section_t; | 780 } aim_mpmsg_section_t; |
769 | 781 |
770 typedef struct aim_mpmsg_s { | 782 typedef struct aim_mpmsg_s |
783 { | |
771 unsigned int numparts; | 784 unsigned int numparts; |
772 aim_mpmsg_section_t *parts; | 785 aim_mpmsg_section_t *parts; |
773 } aim_mpmsg_t; | 786 } aim_mpmsg_t; |
774 | 787 |
775 faim_export int aim_mpmsg_init(aim_session_t *sess, aim_mpmsg_t *mpm); | 788 faim_export int aim_mpmsg_init(OscarSession *sess, aim_mpmsg_t *mpm); |
776 faim_export int aim_mpmsg_addraw(aim_session_t *sess, aim_mpmsg_t *mpm, guint16 charset, guint16 charsubset, const gchar *data, guint16 datalen); | 789 faim_export int aim_mpmsg_addraw(OscarSession *sess, aim_mpmsg_t *mpm, guint16 charset, guint16 charsubset, const gchar *data, guint16 datalen); |
777 faim_export int aim_mpmsg_addascii(aim_session_t *sess, aim_mpmsg_t *mpm, const char *ascii); | 790 faim_export int aim_mpmsg_addascii(OscarSession *sess, aim_mpmsg_t *mpm, const char *ascii); |
778 faim_export int aim_mpmsg_addunicode(aim_session_t *sess, aim_mpmsg_t *mpm, const guint16 *unicode, guint16 unicodelen); | 791 faim_export int aim_mpmsg_addunicode(OscarSession *sess, aim_mpmsg_t *mpm, const guint16 *unicode, guint16 unicodelen); |
779 faim_export void aim_mpmsg_free(aim_session_t *sess, aim_mpmsg_t *mpm); | 792 faim_export void aim_mpmsg_free(OscarSession *sess, aim_mpmsg_t *mpm); |
780 | 793 |
781 /* | 794 /* |
782 * Arguments to aim_send_im_ext(). | 795 * Arguments to aim_send_im_ext(). |
783 * | 796 * |
784 * This is really complicated. But immensely versatile. | 797 * This is really complicated. But immensely versatile. |
785 * | 798 * |
786 */ | 799 */ |
787 struct aim_sendimext_args { | 800 struct aim_sendimext_args |
801 { | |
788 | 802 |
789 /* These are _required_ */ | 803 /* These are _required_ */ |
790 const char *destsn; | 804 const char *destsn; |
791 guint32 flags; /* often 0 */ | 805 guint32 flags; /* often 0 */ |
792 | 806 |
812 }; | 826 }; |
813 | 827 |
814 /* | 828 /* |
815 * Arguments to aim_send_rtfmsg(). | 829 * Arguments to aim_send_rtfmsg(). |
816 */ | 830 */ |
817 struct aim_sendrtfmsg_args { | 831 struct aim_sendrtfmsg_args |
832 { | |
818 const char *destsn; | 833 const char *destsn; |
819 guint32 fgcolor; | 834 guint32 fgcolor; |
820 guint32 bgcolor; | 835 guint32 bgcolor; |
821 const char *rtfmsg; /* must be in RTF */ | 836 const char *rtfmsg; /* must be in RTF */ |
822 }; | 837 }; |
823 | 838 |
824 /* | 839 /* |
825 * This information is provided in the Incoming ICBM callback for | 840 * This information is provided in the Incoming ICBM callback for |
826 * Channel 1 ICBM's. | 841 * Channel 1 ICBM's. |
827 * | 842 * |
828 * Note that although CUSTOMFEATURES and CUSTOMCHARSET say they | 843 * Note that although CUSTOMFEATURES and CUSTOMCHARSET say they |
829 * are optional, both are always set by the current libfaim code. | 844 * are optional, both are always set by the current libfaim code. |
830 * That may or may not change in the future. It is mainly for | 845 * That may or may not change in the future. It is mainly for |
831 * consistency with aim_sendimext_args. | 846 * consistency with aim_sendimext_args. |
832 * | 847 * |
833 * Multipart messages require some explanation. If you want to use them, | 848 * Multipart messages require some explanation. If you want to use them, |
834 * I suggest you read all the comments in im.c. | 849 * I suggest you read all the comments in family_icbm.c. |
835 * | 850 * |
836 */ | 851 */ |
837 struct aim_incomingim_ch1_args { | 852 struct aim_incomingim_ch1_args |
853 { | |
838 | 854 |
839 /* Always provided */ | 855 /* Always provided */ |
840 aim_mpmsg_t mpmsg; | 856 aim_mpmsg_t mpmsg; |
841 guint32 icbmflags; /* some flags apply only to ->msg, not all mpmsg */ | 857 guint32 icbmflags; /* some flags apply only to ->msg, not all mpmsg */ |
842 | 858 |
843 /* Only provided if message has a human-readable section */ | 859 /* Only provided if message has a human-readable section */ |
844 gchar *msg; | 860 gchar *msg; |
845 int msglen; | 861 int msglen; |
846 | 862 |
847 /* Only provided if AIM_IMFLAGS_HASICON is set */ | 863 /* Only provided if AIM_IMFLAGS_HASICON is set */ |
865 /* Valid values for channel 2 args->status */ | 881 /* Valid values for channel 2 args->status */ |
866 #define AIM_RENDEZVOUS_PROPOSE 0x0000 | 882 #define AIM_RENDEZVOUS_PROPOSE 0x0000 |
867 #define AIM_RENDEZVOUS_CANCEL 0x0001 | 883 #define AIM_RENDEZVOUS_CANCEL 0x0001 |
868 #define AIM_RENDEZVOUS_ACCEPT 0x0002 | 884 #define AIM_RENDEZVOUS_ACCEPT 0x0002 |
869 | 885 |
870 struct aim_incomingim_ch2_args { | 886 struct aim_incomingim_ch2_args |
887 { | |
871 guint16 status; | 888 guint16 status; |
872 guchar cookie[8]; | 889 guchar cookie[8]; |
873 int reqclass; | 890 int reqclass; |
874 const char *proxyip; | 891 const char *proxyip; |
875 const char *clientip; | 892 const char *clientip; |
912 /* Valid values for channel 4 args->type */ | 929 /* Valid values for channel 4 args->type */ |
913 #define AIM_ICQMSG_AUTHREQUEST 0x0006 | 930 #define AIM_ICQMSG_AUTHREQUEST 0x0006 |
914 #define AIM_ICQMSG_AUTHDENIED 0x0007 | 931 #define AIM_ICQMSG_AUTHDENIED 0x0007 |
915 #define AIM_ICQMSG_AUTHGRANTED 0x0008 | 932 #define AIM_ICQMSG_AUTHGRANTED 0x0008 |
916 | 933 |
917 struct aim_incomingim_ch4_args { | 934 struct aim_incomingim_ch4_args |
935 { | |
918 guint32 uin; /* Of the sender of the ICBM */ | 936 guint32 uin; /* Of the sender of the ICBM */ |
919 guint8 type; | 937 guint8 type; |
920 guint8 flags; | 938 guint8 flags; |
921 gchar *msg; /* Reason for auth request, deny, or accept */ | 939 gchar *msg; /* Reason for auth request, deny, or accept */ |
922 int msglen; | 940 int msglen; |
923 }; | 941 }; |
924 | 942 |
925 /* SNAC sending functions */ | 943 /* SNAC sending functions */ |
926 /* 0x0002 */ faim_export int aim_im_setparams(aim_session_t *sess, struct aim_icbmparameters *params); | 944 /* 0x0002 */ faim_export int aim_im_setparams(OscarSession *sess, struct aim_icbmparameters *params); |
927 /* 0x0004 */ faim_export int aim_im_reqparams(aim_session_t *sess); | 945 /* 0x0004 */ faim_export int aim_im_reqparams(OscarSession *sess); |
928 /* 0x0006 */ faim_export int aim_im_sendch1_ext(aim_session_t *sess, struct aim_sendimext_args *args); | 946 /* 0x0006 */ faim_export int aim_im_sendch1_ext(OscarSession *sess, struct aim_sendimext_args *args); |
929 /* 0x0006 */ faim_export int aim_im_sendch1(aim_session_t *, const char *destsn, guint16 flags, const char *msg); | 947 /* 0x0006 */ faim_export int aim_im_sendch1(OscarSession *, const char *destsn, guint16 flags, const char *msg); |
930 /* 0x0006 */ faim_export int aim_im_sendch2_chatinvite(aim_session_t *sess, const char *sn, const char *msg, guint16 exchange, const char *roomname, guint16 instance); | 948 /* 0x0006 */ faim_export int aim_im_sendch2_chatinvite(OscarSession *sess, const char *sn, const char *msg, guint16 exchange, const char *roomname, guint16 instance); |
931 /* 0x0006 */ faim_export int aim_im_sendch2_icon(aim_session_t *sess, const char *sn, const guint8 *icon, int iconlen, time_t stamp, guint16 iconsum); | 949 /* 0x0006 */ faim_export int aim_im_sendch2_icon(OscarSession *sess, const char *sn, const guint8 *icon, int iconlen, time_t stamp, guint16 iconsum); |
932 /* 0x0006 */ faim_export int aim_im_sendch2_rtfmsg(aim_session_t *sess, struct aim_sendrtfmsg_args *args); | 950 /* 0x0006 */ faim_export int aim_im_sendch2_rtfmsg(OscarSession *sess, struct aim_sendrtfmsg_args *args); |
933 /* 0x0006 */ faim_export int aim_im_sendch2_odcrequest(aim_session_t *sess, guchar *cookie, gboolean usecookie, const char *sn, const guint8 *ip, guint16 port); | 951 /* 0x0006 */ faim_export int aim_im_sendch2_odcrequest(OscarSession *sess, guchar *cookie, gboolean usecookie, const char *sn, const guint8 *ip, guint16 port); |
934 /* 0x0006 */ faim_export int aim_im_sendch2_sendfile_ask(aim_session_t *sess, struct aim_oft_info *oft_info); | 952 /* 0x0006 */ faim_export int aim_im_sendch2_sendfile_ask(OscarSession *sess, PeerInfo *oft_info); |
935 /* 0x0006 */ faim_export int aim_im_sendch2_sendfile_accept(aim_session_t *sess, struct aim_oft_info *info); | 953 /* 0x0006 */ faim_export int aim_im_sendch2_sendfile_accept(OscarSession *sess, PeerInfo *info); |
936 /* 0x0006 */ faim_export int aim_im_sendch2_sendfile_cancel(aim_session_t *sess, struct aim_oft_info *oft_info); | 954 /* 0x0006 */ faim_export int aim_im_sendch2_sendfile_cancel(OscarSession *sess, PeerInfo *oft_info); |
937 /* 0x0006 */ faim_export int aim_im_sendch2_geticqaway(aim_session_t *sess, const char *sn, int type); | 955 /* 0x0006 */ faim_export int aim_im_sendch2_geticqaway(OscarSession *sess, const char *sn, int type); |
938 /* 0x0006 */ faim_export int aim_im_sendch4(aim_session_t *sess, const char *sn, guint16 type, const char *message); | 956 /* 0x0006 */ faim_export int aim_im_sendch4(OscarSession *sess, const char *sn, guint16 type, const char *message); |
939 /* 0x0008 */ faim_export int aim_im_warn(aim_session_t *sess, aim_conn_t *conn, const char *destsn, guint32 flags); | 957 /* 0x0008 */ faim_export int aim_im_warn(OscarSession *sess, OscarConnection *conn, const char *destsn, guint32 flags); |
940 /* 0x000b */ faim_export int aim_im_denytransfer(aim_session_t *sess, const char *sender, const guchar *cookie, guint16 code); | 958 /* 0x000b */ faim_export int aim_im_denytransfer(OscarSession *sess, const char *sender, const guchar *cookie, guint16 code); |
941 /* 0x0014 */ faim_export int aim_im_sendmtn(aim_session_t *sess, guint16 type1, const char *sn, guint16 type2); | 959 /* 0x0014 */ faim_export int aim_im_sendmtn(OscarSession *sess, guint16 type1, const char *sn, guint16 type2); |
942 faim_export void aim_icbm_makecookie(guchar* cookie); | 960 faim_export void aim_icbm_makecookie(guchar* cookie); |
943 | 961 |
944 | 962 |
945 /* 0x0002 - locate.c */ | 963 /* 0x0002 - family_locate.c */ |
946 /* | 964 /* |
947 * AIM User Info, Standard Form. | 965 * AIM User Info, Standard Form. |
948 */ | 966 */ |
949 #define AIM_FLAG_UNCONFIRMED 0x0001 /* "damned transients" */ | 967 #define AIM_FLAG_UNCONFIRMED 0x0001 /* "damned transients" */ |
950 #define AIM_FLAG_ADMINISTRATOR 0x0002 | 968 #define AIM_FLAG_ADMINISTRATOR 0x0002 |
951 #define AIM_FLAG_AOL 0x0004 | 969 #define AIM_FLAG_AOL 0x0004 |
952 #define AIM_FLAG_OSCAR_PAY 0x0008 | 970 #define AIM_FLAG_OSCAR_PAY 0x0008 |
953 #define AIM_FLAG_FREE 0x0010 | 971 #define AIM_FLAG_FREE 0x0010 |
954 #define AIM_FLAG_AWAY 0x0020 | 972 #define AIM_FLAG_AWAY 0x0020 |
955 #define AIM_FLAG_ICQ 0x0040 | 973 #define AIM_FLAG_ICQ 0x0040 |
956 #define AIM_FLAG_WIRELESS 0x0080 | 974 #define AIM_FLAG_WIRELESS 0x0080 |
957 #define AIM_FLAG_UNKNOWN100 0x0100 | 975 #define AIM_FLAG_UNKNOWN100 0x0100 |
958 #define AIM_FLAG_UNKNOWN200 0x0200 | 976 #define AIM_FLAG_UNKNOWN200 0x0200 |
970 #define AIM_USERINFO_PRESENT_ICQDATA 0x00000040 | 988 #define AIM_USERINFO_PRESENT_ICQDATA 0x00000040 |
971 #define AIM_USERINFO_PRESENT_CAPABILITIES 0x00000080 | 989 #define AIM_USERINFO_PRESENT_CAPABILITIES 0x00000080 |
972 #define AIM_USERINFO_PRESENT_SESSIONLEN 0x00000100 | 990 #define AIM_USERINFO_PRESENT_SESSIONLEN 0x00000100 |
973 #define AIM_USERINFO_PRESENT_CREATETIME 0x00000200 | 991 #define AIM_USERINFO_PRESENT_CREATETIME 0x00000200 |
974 | 992 |
975 struct userinfo_node { | 993 struct userinfo_node |
994 { | |
976 char *sn; | 995 char *sn; |
977 struct userinfo_node *next; | 996 struct userinfo_node *next; |
978 }; | 997 }; |
979 | 998 |
980 typedef struct aim_userinfo_s { | 999 typedef struct aim_userinfo_s |
1000 { | |
981 char *sn; | 1001 char *sn; |
982 guint16 warnlevel; /* evil percent * 10 (999 = 99.9%) */ | 1002 guint16 warnlevel; /* evil percent * 10 (999 = 99.9%) */ |
983 guint16 idletime; /* in seconds */ | 1003 guint16 idletime; /* in seconds */ |
984 guint16 flags; | 1004 guint16 flags; |
985 guint32 createtime; /* time_t */ | 1005 guint32 createtime; /* time_t */ |
1044 #define AIM_CAPS_LAST 0x10000000 | 1064 #define AIM_CAPS_LAST 0x10000000 |
1045 | 1065 |
1046 #define AIM_SENDMEMBLOCK_FLAG_ISREQUEST 0 | 1066 #define AIM_SENDMEMBLOCK_FLAG_ISREQUEST 0 |
1047 #define AIM_SENDMEMBLOCK_FLAG_ISHASH 1 | 1067 #define AIM_SENDMEMBLOCK_FLAG_ISHASH 1 |
1048 | 1068 |
1049 faim_export int aim_sendmemblock(aim_session_t *sess, aim_conn_t *conn, guint32 offset, guint32 len, const guint8 *buf, guint8 flag); | 1069 faim_export int aim_sendmemblock(OscarSession *sess, OscarConnection *conn, guint32 offset, guint32 len, const guint8 *buf, guint8 flag); |
1050 | 1070 |
1051 struct aim_invite_priv { | 1071 struct aim_invite_priv |
1072 { | |
1052 char *sn; | 1073 char *sn; |
1053 char *roomname; | 1074 char *roomname; |
1054 guint16 exchange; | 1075 guint16 exchange; |
1055 guint16 instance; | 1076 guint16 instance; |
1056 }; | 1077 }; |
1070 #define AIM_COOKIETYPE_OFTSEND 0x12 | 1091 #define AIM_COOKIETYPE_OFTSEND 0x12 |
1071 #define AIM_COOKIETYPE_OFTVOICE 0x13 | 1092 #define AIM_COOKIETYPE_OFTVOICE 0x13 |
1072 #define AIM_COOKIETYPE_OFTIMAGE 0x14 | 1093 #define AIM_COOKIETYPE_OFTIMAGE 0x14 |
1073 #define AIM_COOKIETYPE_OFTICON 0x15 | 1094 #define AIM_COOKIETYPE_OFTICON 0x15 |
1074 | 1095 |
1075 faim_export aim_userinfo_t *aim_locate_finduserinfo(aim_session_t *sess, const char *sn); | 1096 faim_export aim_userinfo_t *aim_locate_finduserinfo(OscarSession *sess, const char *sn); |
1076 faim_export void aim_locate_dorequest(aim_session_t *sess); | 1097 faim_export void aim_locate_dorequest(OscarSession *sess); |
1077 | 1098 |
1078 /* 0x0002 */ faim_export int aim_locate_reqrights(aim_session_t *sess); | 1099 /* 0x0002 */ faim_export int aim_locate_reqrights(OscarSession *sess); |
1079 /* 0x0004 */ faim_export int aim_locate_setcaps(aim_session_t *sess, guint32 caps); | 1100 /* 0x0004 */ faim_export int aim_locate_setcaps(OscarSession *sess, guint32 caps); |
1080 /* 0x0004 */ faim_export int aim_locate_setprofile(aim_session_t *sess, const char *profile_encoding, const gchar *profile, const int profile_len, const char *awaymsg_encoding, const gchar *awaymsg, const int awaymsg_len); | 1101 /* 0x0004 */ faim_export int aim_locate_setprofile(OscarSession *sess, const char *profile_encoding, const gchar *profile, const int profile_len, const char *awaymsg_encoding, const gchar *awaymsg, const int awaymsg_len); |
1081 /* 0x0005 */ faim_export int aim_locate_getinfo(aim_session_t *sess, const char *, guint16); | 1102 /* 0x0005 */ faim_export int aim_locate_getinfo(OscarSession *sess, const char *, guint16); |
1082 /* 0x0009 */ faim_export int aim_locate_setdirinfo(aim_session_t *sess, const char *first, const char *middle, const char *last, const char *maiden, const char *nickname, const char *street, const char *city, const char *state, const char *zip, int country, guint16 privacy); | 1103 /* 0x0009 */ faim_export int aim_locate_setdirinfo(OscarSession *sess, const char *first, const char *middle, const char *last, const char *maiden, const char *nickname, const char *street, const char *city, const char *state, const char *zip, int country, guint16 privacy); |
1083 /* 0x000b */ faim_export int aim_locate_000b(aim_session_t *sess, const char *sn); | 1104 /* 0x000b */ faim_export int aim_locate_000b(OscarSession *sess, const char *sn); |
1084 /* 0x000f */ faim_export int aim_locate_setinterests(aim_session_t *sess, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, guint16 privacy); | 1105 /* 0x000f */ faim_export int aim_locate_setinterests(OscarSession *sess, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, guint16 privacy); |
1085 /* 0x0015 */ faim_export int aim_locate_getinfoshort(aim_session_t *sess, const char *sn, guint32 flags); | 1106 /* 0x0015 */ faim_export int aim_locate_getinfoshort(OscarSession *sess, const char *sn, guint32 flags); |
1086 | 1107 |
1087 | 1108 |
1088 | 1109 |
1089 /* 0x0003 - buddylist.c */ | 1110 /* 0x0003 - family_buddy.c */ |
1090 /* 0x0002 */ faim_export int aim_buddylist_reqrights(aim_session_t *, aim_conn_t *); | 1111 /* 0x0002 */ faim_export int aim_buddylist_reqrights(OscarSession *, OscarConnection *); |
1091 /* 0x0004 */ faim_export int aim_buddylist_set(aim_session_t *, aim_conn_t *, const char *); | 1112 /* 0x0004 */ faim_export int aim_buddylist_set(OscarSession *, OscarConnection *, const char *); |
1092 /* 0x0004 */ faim_export int aim_buddylist_addbuddy(aim_session_t *, aim_conn_t *, const char *); | 1113 /* 0x0004 */ faim_export int aim_buddylist_addbuddy(OscarSession *, OscarConnection *, const char *); |
1093 /* 0x0005 */ faim_export int aim_buddylist_removebuddy(aim_session_t *, aim_conn_t *, const char *); | 1114 /* 0x0005 */ faim_export int aim_buddylist_removebuddy(OscarSession *, OscarConnection *, const char *); |
1094 /* 0x000b */ faim_export int aim_buddylist_oncoming(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *info); | 1115 /* 0x000b */ faim_export int aim_buddylist_oncoming(OscarSession *sess, OscarConnection *conn, aim_userinfo_t *info); |
1095 /* 0x000c */ faim_export int aim_buddylist_offgoing(aim_session_t *sess, aim_conn_t *conn, const char *sn); | 1116 /* 0x000c */ faim_export int aim_buddylist_offgoing(OscarSession *sess, OscarConnection *conn, const char *sn); |
1096 | 1117 |
1097 | 1118 |
1098 | 1119 |
1099 /* 0x000a - search.c */ | 1120 /* 0x000a - family_userlookup.c */ |
1100 faim_export int aim_search_address(aim_session_t *, aim_conn_t *, const char *); | 1121 faim_export int aim_search_address(OscarSession *, OscarConnection *, const char *); |
1101 | 1122 |
1102 | 1123 |
1103 | 1124 |
1104 /* 0x000d - chatnav.c */ | 1125 /* 0x000d - family_chatnav.c */ |
1105 /* 0x000e - chat.c */ | 1126 /* 0x000e - family_chat.c */ |
1106 /* These apply to exchanges as well. */ | 1127 /* These apply to exchanges as well. */ |
1107 #define AIM_CHATROOM_FLAG_EVILABLE 0x0001 | 1128 #define AIM_CHATROOM_FLAG_EVILABLE 0x0001 |
1108 #define AIM_CHATROOM_FLAG_NAV_ONLY 0x0002 | 1129 #define AIM_CHATROOM_FLAG_NAV_ONLY 0x0002 |
1109 #define AIM_CHATROOM_FLAG_INSTANCING_ALLOWED 0x0004 | 1130 #define AIM_CHATROOM_FLAG_INSTANCING_ALLOWED 0x0004 |
1110 #define AIM_CHATROOM_FLAG_OCCUPANT_PEEK_ALLOWED 0x0008 | 1131 #define AIM_CHATROOM_FLAG_OCCUPANT_PEEK_ALLOWED 0x0008 |
1111 | 1132 |
1112 struct aim_chat_exchangeinfo { | 1133 struct aim_chat_exchangeinfo |
1134 { | |
1113 guint16 number; | 1135 guint16 number; |
1114 guint16 flags; | 1136 guint16 flags; |
1115 char *name; | 1137 char *name; |
1116 char *charset1; | 1138 char *charset1; |
1117 char *lang1; | 1139 char *lang1; |
1119 char *lang2; | 1141 char *lang2; |
1120 }; | 1142 }; |
1121 | 1143 |
1122 #define AIM_CHATFLAGS_NOREFLECT 0x0001 | 1144 #define AIM_CHATFLAGS_NOREFLECT 0x0001 |
1123 #define AIM_CHATFLAGS_AWAY 0x0002 | 1145 #define AIM_CHATFLAGS_AWAY 0x0002 |
1124 faim_export int aim_chat_send_im(aim_session_t *sess, aim_conn_t *conn, guint16 flags, const gchar *msg, int msglen, const char *encoding, const char *language); | 1146 faim_export int aim_chat_send_im(OscarSession *sess, OscarConnection *conn, guint16 flags, const gchar *msg, int msglen, const char *encoding, const char *language); |
1125 faim_export int aim_chat_join(aim_session_t *sess, aim_conn_t *conn, guint16 exchange, const char *roomname, guint16 instance); | 1147 faim_export int aim_chat_join(OscarSession *sess, OscarConnection *conn, guint16 exchange, const char *roomname, guint16 instance); |
1126 faim_export int aim_chat_attachname(aim_conn_t *conn, guint16 exchange, const char *roomname, guint16 instance); | 1148 faim_export int aim_chat_attachname(OscarConnection *conn, guint16 exchange, const char *roomname, guint16 instance); |
1127 faim_export char *aim_chat_getname(aim_conn_t *conn); | 1149 faim_export char *aim_chat_getname(OscarConnection *conn); |
1128 faim_export aim_conn_t *aim_chat_getconn(aim_session_t *, const char *name); | 1150 faim_export OscarConnection *aim_chat_getconn(OscarSession *, const char *name); |
1129 | 1151 |
1130 faim_export int aim_chatnav_reqrights(aim_session_t *sess, aim_conn_t *conn); | 1152 faim_export int aim_chatnav_reqrights(OscarSession *sess, OscarConnection *conn); |
1131 | 1153 |
1132 faim_export int aim_chatnav_createroom(aim_session_t *sess, aim_conn_t *conn, const char *name, guint16 exchange); | 1154 faim_export int aim_chatnav_createroom(OscarSession *sess, OscarConnection *conn, const char *name, guint16 exchange); |
1133 faim_export int aim_chat_leaveroom(aim_session_t *sess, const char *name); | 1155 faim_export int aim_chat_leaveroom(OscarSession *sess, const char *name); |
1134 | 1156 |
1135 | 1157 |
1136 | 1158 |
1137 /* 0x000f - odir.c */ | 1159 /* 0x000f - family_odir.c */ |
1138 struct aim_odir { | 1160 struct aim_odir |
1161 { | |
1139 char *first; | 1162 char *first; |
1140 char *last; | 1163 char *last; |
1141 char *middle; | 1164 char *middle; |
1142 char *maiden; | 1165 char *maiden; |
1143 char *email; | 1166 char *email; |
1151 char *region; | 1174 char *region; |
1152 char *address; | 1175 char *address; |
1153 struct aim_odir *next; | 1176 struct aim_odir *next; |
1154 }; | 1177 }; |
1155 | 1178 |
1156 faim_export int aim_odir_email(aim_session_t *, const char *, const char *); | 1179 faim_export int aim_odir_email(OscarSession *, const char *, const char *); |
1157 faim_export int aim_odir_name(aim_session_t *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *); | 1180 faim_export int aim_odir_name(OscarSession *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *); |
1158 faim_export int aim_odir_interest(aim_session_t *, const char *, const char *); | 1181 faim_export int aim_odir_interest(OscarSession *, const char *, const char *); |
1159 | 1182 |
1160 | 1183 |
1161 | 1184 |
1162 /* 0x0010 - icon.c */ | 1185 /* 0x0010 - family_bart.c */ |
1163 faim_export int aim_bart_upload(aim_session_t *sess, const guint8 *icon, guint16 iconlen); | 1186 faim_export int aim_bart_upload(OscarSession *sess, const guint8 *icon, guint16 iconlen); |
1164 faim_export int aim_bart_request(aim_session_t *sess, const char *sn, guint8 iconcsumtype, const guint8 *iconstr, guint16 iconstrlen); | 1187 faim_export int aim_bart_request(OscarSession *sess, const char *sn, guint8 iconcsumtype, const guint8 *iconstr, guint16 iconstrlen); |
1165 | 1188 |
1166 | 1189 |
1167 | 1190 |
1168 /* 0x0013 - ssi.c */ | 1191 /* 0x0013 - family_feedbag.c */ |
1169 #define AIM_SSI_TYPE_BUDDY 0x0000 | 1192 #define AIM_SSI_TYPE_BUDDY 0x0000 |
1170 #define AIM_SSI_TYPE_GROUP 0x0001 | 1193 #define AIM_SSI_TYPE_GROUP 0x0001 |
1171 #define AIM_SSI_TYPE_PERMIT 0x0002 | 1194 #define AIM_SSI_TYPE_PERMIT 0x0002 |
1172 #define AIM_SSI_TYPE_DENY 0x0003 | 1195 #define AIM_SSI_TYPE_DENY 0x0003 |
1173 #define AIM_SSI_TYPE_PDINFO 0x0004 | 1196 #define AIM_SSI_TYPE_PDINFO 0x0004 |
1183 | 1206 |
1184 /* These flags are set in the 0x00c9 TLV of SSI teyp 0x0005 */ | 1207 /* These flags are set in the 0x00c9 TLV of SSI teyp 0x0005 */ |
1185 #define AIM_SSI_PRESENCE_FLAG_SHOWIDLE 0x00000400 | 1208 #define AIM_SSI_PRESENCE_FLAG_SHOWIDLE 0x00000400 |
1186 #define AIM_SSI_PRESENCE_FLAG_NORECENTBUDDIES 0x00020000 | 1209 #define AIM_SSI_PRESENCE_FLAG_NORECENTBUDDIES 0x00020000 |
1187 | 1210 |
1188 struct aim_ssi_item { | 1211 struct aim_ssi_item |
1212 { | |
1189 char *name; | 1213 char *name; |
1190 guint16 gid; | 1214 guint16 gid; |
1191 guint16 bid; | 1215 guint16 bid; |
1192 guint16 type; | 1216 guint16 type; |
1193 struct aim_tlvlist_s *data; | 1217 struct aim_tlvlist_s *data; |
1194 struct aim_ssi_item *next; | 1218 struct aim_ssi_item *next; |
1195 }; | 1219 }; |
1196 | 1220 |
1197 struct aim_ssi_tmp { | 1221 struct aim_ssi_tmp |
1222 { | |
1198 guint16 action; | 1223 guint16 action; |
1199 guint16 ack; | 1224 guint16 ack; |
1200 char *name; | 1225 char *name; |
1201 struct aim_ssi_item *item; | 1226 struct aim_ssi_item *item; |
1202 struct aim_ssi_tmp *next; | 1227 struct aim_ssi_tmp *next; |
1203 }; | 1228 }; |
1204 | 1229 |
1205 /* These build the actual SNACs and queue them to be sent */ | 1230 /* These build the actual SNACs and queue them to be sent */ |
1206 /* 0x0002 */ faim_export int aim_ssi_reqrights(aim_session_t *sess); | 1231 /* 0x0002 */ faim_export int aim_ssi_reqrights(OscarSession *sess); |
1207 /* 0x0004 */ faim_export int aim_ssi_reqdata(aim_session_t *sess); | 1232 /* 0x0004 */ faim_export int aim_ssi_reqdata(OscarSession *sess); |
1208 /* 0x0005 */ faim_export int aim_ssi_reqifchanged(aim_session_t *sess, time_t localstamp, guint16 localrev); | 1233 /* 0x0005 */ faim_export int aim_ssi_reqifchanged(OscarSession *sess, time_t localstamp, guint16 localrev); |
1209 /* 0x0007 */ faim_export int aim_ssi_enable(aim_session_t *sess); | 1234 /* 0x0007 */ faim_export int aim_ssi_enable(OscarSession *sess); |
1210 /* 0x0008 */ faim_export int aim_ssi_addmoddel(aim_session_t *sess); | 1235 /* 0x0008 */ faim_export int aim_ssi_addmoddel(OscarSession *sess); |
1211 /* 0x0011 */ faim_export int aim_ssi_modbegin(aim_session_t *sess); | 1236 /* 0x0011 */ faim_export int aim_ssi_modbegin(OscarSession *sess); |
1212 /* 0x0012 */ faim_export int aim_ssi_modend(aim_session_t *sess); | 1237 /* 0x0012 */ faim_export int aim_ssi_modend(OscarSession *sess); |
1213 /* 0x0014 */ faim_export int aim_ssi_sendauth(aim_session_t *sess, char *sn, char *msg); | 1238 /* 0x0014 */ faim_export int aim_ssi_sendauth(OscarSession *sess, char *sn, char *msg); |
1214 /* 0x0018 */ faim_export int aim_ssi_sendauthrequest(aim_session_t *sess, char *sn, const char *msg); | 1239 /* 0x0018 */ faim_export int aim_ssi_sendauthrequest(OscarSession *sess, char *sn, const char *msg); |
1215 /* 0x001a */ faim_export int aim_ssi_sendauthreply(aim_session_t *sess, char *sn, guint8 reply, const char *msg); | 1240 /* 0x001a */ faim_export int aim_ssi_sendauthreply(OscarSession *sess, char *sn, guint8 reply, const char *msg); |
1216 | 1241 |
1217 /* Client functions for retrieving SSI data */ | 1242 /* Client functions for retrieving SSI data */ |
1218 faim_export struct aim_ssi_item *aim_ssi_itemlist_find(struct aim_ssi_item *list, guint16 gid, guint16 bid); | 1243 faim_export struct aim_ssi_item *aim_ssi_itemlist_find(struct aim_ssi_item *list, guint16 gid, guint16 bid); |
1219 faim_export struct aim_ssi_item *aim_ssi_itemlist_finditem(struct aim_ssi_item *list, const char *gn, const char *sn, guint16 type); | 1244 faim_export struct aim_ssi_item *aim_ssi_itemlist_finditem(struct aim_ssi_item *list, const char *gn, const char *sn, guint16 type); |
1220 faim_export struct aim_ssi_item *aim_ssi_itemlist_exists(struct aim_ssi_item *list, const char *sn); | 1245 faim_export struct aim_ssi_item *aim_ssi_itemlist_exists(struct aim_ssi_item *list, const char *sn); |
1224 faim_export char *aim_ssi_getalias(struct aim_ssi_item *list, const char *gn, const char *sn); | 1249 faim_export char *aim_ssi_getalias(struct aim_ssi_item *list, const char *gn, const char *sn); |
1225 faim_export char *aim_ssi_getcomment(struct aim_ssi_item *list, const char *gn, const char *sn); | 1250 faim_export char *aim_ssi_getcomment(struct aim_ssi_item *list, const char *gn, const char *sn); |
1226 faim_export int aim_ssi_waitingforauth(struct aim_ssi_item *list, const char *gn, const char *sn); | 1251 faim_export int aim_ssi_waitingforauth(struct aim_ssi_item *list, const char *gn, const char *sn); |
1227 | 1252 |
1228 /* Client functions for changing SSI data */ | 1253 /* Client functions for changing SSI data */ |
1229 faim_export int aim_ssi_addbuddy(aim_session_t *sess, const char *name, const char *group, const char *alias, const char *comment, const char *smsnum, int needauth); | 1254 faim_export int aim_ssi_addbuddy(OscarSession *sess, const char *name, const char *group, const char *alias, const char *comment, const char *smsnum, int needauth); |
1230 faim_export int aim_ssi_addpermit(aim_session_t *sess, const char *name); | 1255 faim_export int aim_ssi_addpermit(OscarSession *sess, const char *name); |
1231 faim_export int aim_ssi_adddeny(aim_session_t *sess, const char *name); | 1256 faim_export int aim_ssi_adddeny(OscarSession *sess, const char *name); |
1232 faim_export int aim_ssi_delbuddy(aim_session_t *sess, const char *name, const char *group); | 1257 faim_export int aim_ssi_delbuddy(OscarSession *sess, const char *name, const char *group); |
1233 faim_export int aim_ssi_delpermit(aim_session_t *sess, const char *name); | 1258 faim_export int aim_ssi_delpermit(OscarSession *sess, const char *name); |
1234 faim_export int aim_ssi_deldeny(aim_session_t *sess, const char *name); | 1259 faim_export int aim_ssi_deldeny(OscarSession *sess, const char *name); |
1235 faim_export int aim_ssi_movebuddy(aim_session_t *sess, const char *oldgn, const char *newgn, const char *sn); | 1260 faim_export int aim_ssi_movebuddy(OscarSession *sess, const char *oldgn, const char *newgn, const char *sn); |
1236 faim_export int aim_ssi_aliasbuddy(aim_session_t *sess, const char *gn, const char *sn, const char *alias); | 1261 faim_export int aim_ssi_aliasbuddy(OscarSession *sess, const char *gn, const char *sn, const char *alias); |
1237 faim_export int aim_ssi_editcomment(aim_session_t *sess, const char *gn, const char *sn, const char *alias); | 1262 faim_export int aim_ssi_editcomment(OscarSession *sess, const char *gn, const char *sn, const char *alias); |
1238 faim_export int aim_ssi_rename_group(aim_session_t *sess, const char *oldgn, const char *newgn); | 1263 faim_export int aim_ssi_rename_group(OscarSession *sess, const char *oldgn, const char *newgn); |
1239 faim_export int aim_ssi_cleanlist(aim_session_t *sess); | 1264 faim_export int aim_ssi_cleanlist(OscarSession *sess); |
1240 faim_export int aim_ssi_deletelist(aim_session_t *sess); | 1265 faim_export int aim_ssi_deletelist(OscarSession *sess); |
1241 faim_export int aim_ssi_setpermdeny(aim_session_t *sess, guint8 permdeny, guint32 vismask); | 1266 faim_export int aim_ssi_setpermdeny(OscarSession *sess, guint8 permdeny, guint32 vismask); |
1242 faim_export int aim_ssi_setpresence(aim_session_t *sess, guint32 presence); | 1267 faim_export int aim_ssi_setpresence(OscarSession *sess, guint32 presence); |
1243 faim_export int aim_ssi_seticon(aim_session_t *sess, guint8 *iconsum, guint16 iconsumlen); | 1268 faim_export int aim_ssi_seticon(OscarSession *sess, guint8 *iconsum, guint16 iconsumlen); |
1244 faim_export int aim_ssi_delicon(aim_session_t *sess); | 1269 faim_export int aim_ssi_delicon(OscarSession *sess); |
1245 | 1270 |
1246 | 1271 |
1247 | 1272 |
1248 /* 0x0015 - icq.c */ | 1273 /* 0x0015 - family_icq.c */ |
1249 #define AIM_ICQ_INFO_SIMPLE 0x001 | 1274 #define AIM_ICQ_INFO_SIMPLE 0x001 |
1250 #define AIM_ICQ_INFO_SUMMARY 0x002 | 1275 #define AIM_ICQ_INFO_SUMMARY 0x002 |
1251 #define AIM_ICQ_INFO_EMAIL 0x004 | 1276 #define AIM_ICQ_INFO_EMAIL 0x004 |
1252 #define AIM_ICQ_INFO_PERSONAL 0x008 | 1277 #define AIM_ICQ_INFO_PERSONAL 0x008 |
1253 #define AIM_ICQ_INFO_ADDITIONAL 0x010 | 1278 #define AIM_ICQ_INFO_ADDITIONAL 0x010 |
1255 #define AIM_ICQ_INFO_INTERESTS 0x040 | 1280 #define AIM_ICQ_INFO_INTERESTS 0x040 |
1256 #define AIM_ICQ_INFO_ORGS 0x080 | 1281 #define AIM_ICQ_INFO_ORGS 0x080 |
1257 #define AIM_ICQ_INFO_UNKNOWN 0x100 | 1282 #define AIM_ICQ_INFO_UNKNOWN 0x100 |
1258 #define AIM_ICQ_INFO_HAVEALL 0x1ff | 1283 #define AIM_ICQ_INFO_HAVEALL 0x1ff |
1259 | 1284 |
1260 struct aim_icq_offlinemsg { | 1285 struct aim_icq_offlinemsg |
1286 { | |
1261 guint32 sender; | 1287 guint32 sender; |
1262 guint16 year; | 1288 guint16 year; |
1263 guint8 month, day, hour, minute; | 1289 guint8 month, day, hour, minute; |
1264 guint8 type; | 1290 guint8 type; |
1265 guint8 flags; | 1291 guint8 flags; |
1266 char *msg; | 1292 char *msg; |
1267 int msglen; | 1293 int msglen; |
1268 }; | 1294 }; |
1269 | 1295 |
1270 struct aim_icq_info { | 1296 struct aim_icq_info |
1297 { | |
1271 guint16 reqid; | 1298 guint16 reqid; |
1272 | 1299 |
1273 /* simple */ | 1300 /* simple */ |
1274 guint32 uin; | 1301 guint32 uin; |
1275 | 1302 |
1323 | 1350 |
1324 /* we keep track of these in a linked list because we're 1337 */ | 1351 /* we keep track of these in a linked list because we're 1337 */ |
1325 struct aim_icq_info *next; | 1352 struct aim_icq_info *next; |
1326 }; | 1353 }; |
1327 | 1354 |
1328 faim_export int aim_icq_reqofflinemsgs(aim_session_t *sess); | 1355 faim_export int aim_icq_reqofflinemsgs(OscarSession *sess); |
1329 faim_export int aim_icq_ackofflinemsgs(aim_session_t *sess); | 1356 faim_export int aim_icq_ackofflinemsgs(OscarSession *sess); |
1330 faim_export int aim_icq_setsecurity(aim_session_t *sess, gboolean auth_required, gboolean webaware); | 1357 faim_export int aim_icq_setsecurity(OscarSession *sess, gboolean auth_required, gboolean webaware); |
1331 faim_export int aim_icq_changepasswd(aim_session_t *sess, const char *passwd); | 1358 faim_export int aim_icq_changepasswd(OscarSession *sess, const char *passwd); |
1332 faim_export int aim_icq_getsimpleinfo(aim_session_t *sess, const char *uin); | 1359 faim_export int aim_icq_getsimpleinfo(OscarSession *sess, const char *uin); |
1333 faim_export int aim_icq_getalias(aim_session_t *sess, const char *uin); | 1360 faim_export int aim_icq_getalias(OscarSession *sess, const char *uin); |
1334 faim_export int aim_icq_getallinfo(aim_session_t *sess, const char *uin); | 1361 faim_export int aim_icq_getallinfo(OscarSession *sess, const char *uin); |
1335 | 1362 |
1336 | 1363 |
1337 | 1364 |
1338 /* 0x0017 - auth.c */ | 1365 /* 0x0017 - family_auth.c */ |
1339 faim_export int aim_sendcookie(aim_session_t *, aim_conn_t *, const guint16 length, const guint8 *); | 1366 faim_export int aim_sendcookie(OscarSession *, OscarConnection *, const guint16 length, const guint8 *); |
1340 faim_export int aim_admin_changepasswd(aim_session_t *, aim_conn_t *, const char *newpw, const char *curpw); | 1367 faim_export int aim_admin_changepasswd(OscarSession *, OscarConnection *, const char *newpw, const char *curpw); |
1341 faim_export int aim_admin_reqconfirm(aim_session_t *sess, aim_conn_t *conn); | 1368 faim_export int aim_admin_reqconfirm(OscarSession *sess, OscarConnection *conn); |
1342 faim_export int aim_admin_getinfo(aim_session_t *sess, aim_conn_t *conn, guint16 info); | 1369 faim_export int aim_admin_getinfo(OscarSession *sess, OscarConnection *conn, guint16 info); |
1343 faim_export int aim_admin_setemail(aim_session_t *sess, aim_conn_t *conn, const char *newemail); | 1370 faim_export int aim_admin_setemail(OscarSession *sess, OscarConnection *conn, const char *newemail); |
1344 faim_export int aim_admin_setnick(aim_session_t *sess, aim_conn_t *conn, const char *newnick); | 1371 faim_export int aim_admin_setnick(OscarSession *sess, OscarConnection *conn, const char *newnick); |
1345 | 1372 |
1346 | 1373 |
1347 | 1374 |
1348 /* 0x0018 - email.c */ | 1375 /* 0x0018 - family_alert.c */ |
1349 struct aim_emailinfo { | 1376 struct aim_emailinfo |
1377 { | |
1350 guint8 *cookie16; | 1378 guint8 *cookie16; |
1351 guint8 *cookie8; | 1379 guint8 *cookie8; |
1352 char *url; | 1380 char *url; |
1353 guint16 nummsgs; | 1381 guint16 nummsgs; |
1354 guint8 unread; | 1382 guint8 unread; |
1355 char *domain; | 1383 char *domain; |
1356 guint16 flag; | 1384 guint16 flag; |
1357 struct aim_emailinfo *next; | 1385 struct aim_emailinfo *next; |
1358 }; | 1386 }; |
1359 | 1387 |
1360 faim_export int aim_email_sendcookies(aim_session_t *sess); | 1388 faim_export int aim_email_sendcookies(OscarSession *sess); |
1361 faim_export int aim_email_activate(aim_session_t *sess); | 1389 faim_export int aim_email_activate(OscarSession *sess); |
1362 | 1390 |
1363 | 1391 |
1364 | 1392 |
1365 /* tlv.c - TLV handling */ | 1393 /* tlv.c - TLV handling */ |
1366 | 1394 |
1367 /* TLV structure */ | 1395 /* TLV structure */ |
1368 typedef struct aim_tlv_s { | 1396 typedef struct aim_tlv_s |
1397 { | |
1369 guint16 type; | 1398 guint16 type; |
1370 guint16 length; | 1399 guint16 length; |
1371 guint8 *value; | 1400 guint8 *value; |
1372 } aim_tlv_t; | 1401 } aim_tlv_t; |
1373 | 1402 |
1374 /* TLV List structure */ | 1403 /* TLV List structure */ |
1375 typedef struct aim_tlvlist_s { | 1404 typedef struct aim_tlvlist_s |
1405 { | |
1376 aim_tlv_t *tlv; | 1406 aim_tlv_t *tlv; |
1377 struct aim_tlvlist_s *next; | 1407 struct aim_tlvlist_s *next; |
1378 } aim_tlvlist_t; | 1408 } aim_tlvlist_t; |
1379 | 1409 |
1380 /* TLV handling functions */ | 1410 /* TLV handling functions */ |
1384 faim_internal guint8 aim_tlv_get8(aim_tlvlist_t *list, const guint16 type, const int nth); | 1414 faim_internal guint8 aim_tlv_get8(aim_tlvlist_t *list, const guint16 type, const int nth); |
1385 faim_internal guint16 aim_tlv_get16(aim_tlvlist_t *list, const guint16 type, const int nth); | 1415 faim_internal guint16 aim_tlv_get16(aim_tlvlist_t *list, const guint16 type, const int nth); |
1386 faim_internal guint32 aim_tlv_get32(aim_tlvlist_t *list, const guint16 type, const int nth); | 1416 faim_internal guint32 aim_tlv_get32(aim_tlvlist_t *list, const guint16 type, const int nth); |
1387 | 1417 |
1388 /* TLV list handling functions */ | 1418 /* TLV list handling functions */ |
1389 faim_internal aim_tlvlist_t *aim_tlvlist_read(aim_bstream_t *bs); | 1419 faim_internal aim_tlvlist_t *aim_tlvlist_read(ByteStream *bs); |
1390 faim_internal aim_tlvlist_t *aim_tlvlist_readnum(aim_bstream_t *bs, guint16 num); | 1420 faim_internal aim_tlvlist_t *aim_tlvlist_readnum(ByteStream *bs, guint16 num); |
1391 faim_internal aim_tlvlist_t *aim_tlvlist_readlen(aim_bstream_t *bs, guint16 len); | 1421 faim_internal aim_tlvlist_t *aim_tlvlist_readlen(ByteStream *bs, guint16 len); |
1392 faim_internal aim_tlvlist_t *aim_tlvlist_copy(aim_tlvlist_t *orig); | 1422 faim_internal aim_tlvlist_t *aim_tlvlist_copy(aim_tlvlist_t *orig); |
1393 | 1423 |
1394 faim_internal int aim_tlvlist_count(aim_tlvlist_t **list); | 1424 faim_internal int aim_tlvlist_count(aim_tlvlist_t **list); |
1395 faim_internal int aim_tlvlist_size(aim_tlvlist_t **list); | 1425 faim_internal int aim_tlvlist_size(aim_tlvlist_t **list); |
1396 faim_internal int aim_tlvlist_cmp(aim_tlvlist_t *one, aim_tlvlist_t *two); | 1426 faim_internal int aim_tlvlist_cmp(aim_tlvlist_t *one, aim_tlvlist_t *two); |
1397 faim_internal int aim_tlvlist_write(aim_bstream_t *bs, aim_tlvlist_t **list); | 1427 faim_internal int aim_tlvlist_write(ByteStream *bs, aim_tlvlist_t **list); |
1398 faim_internal void aim_tlvlist_free(aim_tlvlist_t **list); | 1428 faim_internal void aim_tlvlist_free(aim_tlvlist_t **list); |
1399 | 1429 |
1400 faim_internal int aim_tlvlist_add_raw(aim_tlvlist_t **list, const guint16 type, const guint16 length, const guint8 *value); | 1430 faim_internal int aim_tlvlist_add_raw(aim_tlvlist_t **list, const guint16 type, const guint16 length, const guint8 *value); |
1401 faim_internal int aim_tlvlist_add_noval(aim_tlvlist_t **list, const guint16 type); | 1431 faim_internal int aim_tlvlist_add_noval(aim_tlvlist_t **list, const guint16 type); |
1402 faim_internal int aim_tlvlist_add_8(aim_tlvlist_t **list, const guint16 type, const guint8 value); | 1432 faim_internal int aim_tlvlist_add_8(aim_tlvlist_t **list, const guint16 type, const guint8 value); |
1470 (((*((buf)+0)) << 0) & 0x000000ff) + \ | 1500 (((*((buf)+0)) << 0) & 0x000000ff) + \ |
1471 (((*((buf)+1)) << 8) & 0x0000ff00) + \ | 1501 (((*((buf)+1)) << 8) & 0x0000ff00) + \ |
1472 (((*((buf)+2)) << 16) & 0x00ff0000) + \ | 1502 (((*((buf)+2)) << 16) & 0x00ff0000) + \ |
1473 (((*((buf)+3)) << 24) & 0xff000000)) | 1503 (((*((buf)+3)) << 24) & 0xff000000)) |
1474 | 1504 |
1475 | |
1476 faim_export int aimutil_putstr(char *, const char *, int); | |
1477 faim_export guint16 aimutil_iconsum(const guint8 *buf, int buflen); | 1505 faim_export guint16 aimutil_iconsum(const guint8 *buf, int buflen); |
1478 faim_export int aimutil_tokslen(char *toSearch, int theindex, char dl); | 1506 faim_export int aimutil_tokslen(char *toSearch, int theindex, char dl); |
1479 faim_export int aimutil_itemcnt(char *toSearch, char dl); | 1507 faim_export int aimutil_itemcnt(char *toSearch, char dl); |
1480 faim_export char *aimutil_itemindex(char *toSearch, int theindex, char dl); | 1508 faim_export char *aimutil_itemindex(char *toSearch, int theindex, char dl); |
1481 | 1509 |