Mercurial > pidgin.yaz
comparison libfaim/aim.h @ 1899:a2624692260b
[gaim-migrate @ 1909]
this is part two of three
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Mon, 28 May 2001 03:53:23 +0000 |
parents | 109cacf1ff97 |
children | 4bf0163563ca |
comparison
equal
deleted
inserted
replaced
1898:73d73939f698 | 1899:a2624692260b |
---|---|
128 * | 128 * |
129 * XXX: the real limit is the total SNAC size at 8192. Fix this. | 129 * XXX: the real limit is the total SNAC size at 8192. Fix this. |
130 * | 130 * |
131 */ | 131 */ |
132 #define MAXMSGLEN 7987 | 132 #define MAXMSGLEN 7987 |
133 | |
134 /* | |
135 * Maximum size of a Buddy Icon. | |
136 */ | |
137 #define MAXICONLEN 7168 | |
138 #define AIM_ICONIDENT "AVT1picture.id" | |
133 | 139 |
134 /* | 140 /* |
135 * Current Maximum Length for Chat Room Messages | 141 * Current Maximum Length for Chat Room Messages |
136 * | 142 * |
137 * This is actually defined by the protocol to be | 143 * This is actually defined by the protocol to be |
467 | 473 |
468 faim_export unsigned long aim_debugconn_sendconnect(struct aim_session_t *sess, struct aim_conn_t *conn); | 474 faim_export unsigned long aim_debugconn_sendconnect(struct aim_session_t *sess, struct aim_conn_t *conn); |
469 | 475 |
470 faim_export int aim_logoff(struct aim_session_t *); | 476 faim_export int aim_logoff(struct aim_session_t *); |
471 | 477 |
472 #ifndef FAIM_INTERNAL | 478 #if !defined(FAIM_INTERNAL) || defined(FAIM_INTERNAL_INSANE) |
473 /* the library should never call aim_conn_kill */ | 479 /* the library should never call aim_conn_kill */ |
474 faim_export void aim_conn_kill(struct aim_session_t *sess, struct aim_conn_t **deadconn); | 480 faim_export void aim_conn_kill(struct aim_session_t *sess, struct aim_conn_t **deadconn); |
475 #endif /* ndef FAIM_INTERNAL */ | 481 #endif |
476 | 482 |
477 typedef int (*aim_rxcallback_t)(struct aim_session_t *, struct command_rx_struct *, ...); | 483 typedef int (*aim_rxcallback_t)(struct aim_session_t *, struct command_rx_struct *, ...); |
478 | 484 |
479 /* aim_login.c */ | 485 /* aim_login.c */ |
480 faim_export int aim_sendconnack(struct aim_session_t *sess, struct aim_conn_t *conn); | 486 faim_export int aim_sendconnack(struct aim_session_t *sess, struct aim_conn_t *conn); |
631 char ip[30]; | 637 char ip[30]; |
632 int state; | 638 int state; |
633 struct aim_fileheader_t fh; | 639 struct aim_fileheader_t fh; |
634 }; | 640 }; |
635 | 641 |
642 struct aim_chat_roominfo { | |
643 u_short exchange; | |
644 char *name; | |
645 u_short instance; | |
646 }; | |
636 | 647 |
637 #define AIM_IMFLAGS_AWAY 0x01 /* mark as an autoreply */ | 648 #define AIM_IMFLAGS_AWAY 0x01 /* mark as an autoreply */ |
638 #define AIM_IMFLAGS_ACK 0x02 /* request a receipt notice */ | 649 #define AIM_IMFLAGS_ACK 0x02 /* request a receipt notice */ |
639 | 650 #define AIM_IMFLAGS_UNICODE 0x04 |
640 faim_export unsigned long aim_send_im(struct aim_session_t *, struct aim_conn_t *, const char *destsn, unsigned short flags, const char *msg, int msglen); | 651 #define AIM_IMFLAGS_ISO_8859_1 0x08 |
652 #define AIM_IMFLAGS_BUDDYREQ 0x10 /* buddy icon requested */ | |
653 #define AIM_IMFLAGS_HASICON 0x20 /* already has icon (timestamp included) */ | |
654 | |
655 struct aim_sendimext_args { | |
656 const char *destsn; | |
657 unsigned short flags; | |
658 const char *msg; | |
659 int msglen; | |
660 int iconlen; | |
661 time_t iconstamp; | |
662 unsigned short iconsum; | |
663 }; | |
664 | |
665 struct aim_incomingim_ch1_args { | |
666 char *msg; | |
667 int msglen; | |
668 unsigned long icbmflags; | |
669 unsigned short flag1; | |
670 unsigned short flag2; | |
671 int finlen; | |
672 unsigned char fingerprint[10]; | |
673 time_t iconstamp; | |
674 }; | |
675 | |
676 struct aim_incomingim_ch2_args { | |
677 unsigned short reqclass; | |
678 unsigned short status; | |
679 union { | |
680 struct { | |
681 unsigned int length; | |
682 time_t timestamp; | |
683 unsigned char *icon; | |
684 } icon; | |
685 struct { | |
686 } voice; | |
687 struct aim_directim_priv *directim; | |
688 struct { | |
689 char *msg; | |
690 char *encoding; | |
691 char *lang; | |
692 struct aim_chat_roominfo roominfo; | |
693 } chat; | |
694 struct { | |
695 char *ip; | |
696 unsigned char *cookie; | |
697 } getfile; | |
698 struct { | |
699 } sendfile; | |
700 } info; | |
701 }; | |
702 | |
703 faim_export unsigned long aim_send_im_ext(struct aim_session_t *sess, struct aim_conn_t *conn, struct aim_sendimext_args *args); | |
704 faim_export unsigned long aim_send_im(struct aim_session_t *, struct aim_conn_t *, const char *destsn, unsigned short flags, const char *msg); | |
705 faim_export int aim_send_icon(struct aim_session_t *sess, struct aim_conn_t *conn, const char *sn, const unsigned char *icon, int iconlen, time_t stamp, unsigned short iconsum); | |
706 faim_export unsigned short aim_iconsum(const unsigned char *buf, int buflen); | |
641 faim_export int aim_send_im_direct(struct aim_session_t *, struct aim_conn_t *, char *); | 707 faim_export int aim_send_im_direct(struct aim_session_t *, struct aim_conn_t *, char *); |
642 faim_export struct aim_conn_t * aim_directim_initiate(struct aim_session_t *, struct aim_conn_t *, struct aim_directim_priv *, char *destsn); | 708 faim_export struct aim_conn_t * aim_directim_initiate(struct aim_session_t *, struct aim_conn_t *, struct aim_directim_priv *, char *destsn); |
643 faim_export struct aim_conn_t *aim_directim_connect(struct aim_session_t *, struct aim_conn_t *, struct aim_directim_priv *); | 709 faim_export struct aim_conn_t *aim_directim_connect(struct aim_session_t *, struct aim_conn_t *, struct aim_directim_priv *); |
644 faim_export unsigned long aim_seticbmparam(struct aim_session_t *, struct aim_conn_t *conn); | 710 faim_export unsigned long aim_seticbmparam(struct aim_session_t *, struct aim_conn_t *conn); |
645 | 711 |
725 faim_export unsigned long aim_add_buddy(struct aim_session_t *, struct aim_conn_t *, char *); | 791 faim_export unsigned long aim_add_buddy(struct aim_session_t *, struct aim_conn_t *, char *); |
726 faim_export unsigned long aim_remove_buddy(struct aim_session_t *, struct aim_conn_t *, char *); | 792 faim_export unsigned long aim_remove_buddy(struct aim_session_t *, struct aim_conn_t *, char *); |
727 | 793 |
728 /* aim_search.c */ | 794 /* aim_search.c */ |
729 faim_export u_long aim_usersearch_address(struct aim_session_t *, struct aim_conn_t *, char *); | 795 faim_export u_long aim_usersearch_address(struct aim_session_t *, struct aim_conn_t *, char *); |
730 | |
731 struct aim_chat_roominfo { | |
732 u_short exchange; | |
733 char *name; | |
734 u_short instance; | |
735 }; | |
736 | 796 |
737 struct aim_chat_exchangeinfo { | 797 struct aim_chat_exchangeinfo { |
738 u_short number; | 798 u_short number; |
739 char *name; | 799 char *name; |
740 char *charset1; | 800 char *charset1; |