Mercurial > pidgin
comparison src/protocols/oscar/aim.h @ 2167:edf8c5a70e5b
[gaim-migrate @ 2177]
limiting chat message lengths
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sun, 26 Aug 2001 20:21:45 +0000 |
parents | c99c781e5931 |
children | 016c5307f26b |
comparison
equal
deleted
inserted
replaced
2166:dbd74f49dabb | 2167:edf8c5a70e5b |
---|---|
482 #endif | 482 #endif |
483 | 483 |
484 typedef int (*aim_rxcallback_t)(struct aim_session_t *, struct command_rx_struct *, ...); | 484 typedef int (*aim_rxcallback_t)(struct aim_session_t *, struct command_rx_struct *, ...); |
485 | 485 |
486 /* aim_login.c */ | 486 /* aim_login.c */ |
487 faim_export int aim_sendconnack(struct aim_session_t *sess, struct aim_conn_t *conn); | 487 faim_export int aim_sendflapver(struct aim_session_t *sess, struct aim_conn_t *conn); |
488 faim_export int aim_request_login (struct aim_session_t *sess, struct aim_conn_t *conn, char *sn); | 488 faim_export int aim_request_login (struct aim_session_t *sess, struct aim_conn_t *conn, const char *sn); |
489 faim_export int aim_send_login (struct aim_session_t *, struct aim_conn_t *, char *, char *, struct client_info_s *, char *key); | 489 faim_export int aim_send_login (struct aim_session_t *, struct aim_conn_t *, char *, char *, struct client_info_s *, char *key); |
490 faim_export int aim_encode_password_md5(const char *password, const char *key, unsigned char *digest); | 490 faim_export int aim_encode_password_md5(const char *password, const char *key, unsigned char *digest); |
491 faim_export unsigned long aim_sendauthresp(struct aim_session_t *sess, struct aim_conn_t *conn, char *sn, int errorcode, char *errorurl, char *bosip, char *cookie, char *email, int regstatus); | 491 faim_export unsigned long aim_sendauthresp(struct aim_session_t *sess, struct aim_conn_t *conn, char *sn, int errorcode, char *errorurl, char *bosip, char *cookie, char *email, int regstatus); |
492 faim_export int aim_gencookie(unsigned char *buf); | 492 faim_export int aim_gencookie(unsigned char *buf); |
493 faim_export int aim_sendserverready(struct aim_session_t *sess, struct aim_conn_t *conn); | 493 faim_export int aim_sendserverready(struct aim_session_t *sess, struct aim_conn_t *conn); |
561 faim_export unsigned long aim_bos_reqpersonalinfo(struct aim_session_t *, struct aim_conn_t *); | 561 faim_export unsigned long aim_bos_reqpersonalinfo(struct aim_session_t *, struct aim_conn_t *); |
562 faim_export unsigned long aim_bos_reqservice(struct aim_session_t *, struct aim_conn_t *, u_short); | 562 faim_export unsigned long aim_bos_reqservice(struct aim_session_t *, struct aim_conn_t *, u_short); |
563 faim_export unsigned long aim_bos_reqrights(struct aim_session_t *, struct aim_conn_t *); | 563 faim_export unsigned long aim_bos_reqrights(struct aim_session_t *, struct aim_conn_t *); |
564 faim_export unsigned long aim_bos_reqbuddyrights(struct aim_session_t *, struct aim_conn_t *); | 564 faim_export unsigned long aim_bos_reqbuddyrights(struct aim_session_t *, struct aim_conn_t *); |
565 faim_export unsigned long aim_bos_reqlocaterights(struct aim_session_t *, struct aim_conn_t *); | 565 faim_export unsigned long aim_bos_reqlocaterights(struct aim_session_t *, struct aim_conn_t *); |
566 faim_export unsigned long aim_bos_reqicbmparaminfo(struct aim_session_t *, struct aim_conn_t *); | |
567 faim_export unsigned long aim_addicbmparam(struct aim_session_t *sess,struct aim_conn_t *conn); | |
568 faim_export unsigned long aim_setversions(struct aim_session_t *sess, struct aim_conn_t *conn); | 566 faim_export unsigned long aim_setversions(struct aim_session_t *sess, struct aim_conn_t *conn); |
569 faim_export unsigned long aim_auth_setversions(struct aim_session_t *sess, struct aim_conn_t *conn); | 567 faim_export unsigned long aim_auth_setversions(struct aim_session_t *sess, struct aim_conn_t *conn); |
570 faim_export unsigned long aim_auth_reqconfirm(struct aim_session_t *sess, struct aim_conn_t *conn); | 568 faim_export unsigned long aim_auth_reqconfirm(struct aim_session_t *sess, struct aim_conn_t *conn); |
571 faim_export unsigned long aim_auth_getinfo(struct aim_session_t *sess, struct aim_conn_t *conn, unsigned short info); | 569 faim_export unsigned long aim_auth_getinfo(struct aim_session_t *sess, struct aim_conn_t *conn, unsigned short info); |
572 faim_export unsigned long aim_auth_setemail(struct aim_session_t *sess, struct aim_conn_t *conn, char *newemail); | 570 faim_export unsigned long aim_auth_setemail(struct aim_session_t *sess, struct aim_conn_t *conn, char *newemail); |
634 char name[64]; /* 192 */ | 632 char name[64]; /* 192 */ |
635 /* 256 */ | 633 /* 256 */ |
636 }; | 634 }; |
637 | 635 |
638 struct aim_filetransfer_priv { | 636 struct aim_filetransfer_priv { |
639 char sn[MAXSNLEN]; | 637 char sn[MAXSNLEN]; |
640 char cookie[8]; | 638 char cookie[8]; |
641 char ip[30]; | 639 char ip[30]; |
642 int state; | 640 int state; |
643 struct aim_fileheader_t fh; | 641 struct aim_fileheader_t fh; |
644 }; | 642 }; |
645 | 643 |
646 struct aim_chat_roominfo { | 644 struct aim_chat_roominfo { |
647 u_short exchange; | 645 unsigned short exchange; |
648 char *name; | 646 char *name; |
649 u_short instance; | 647 unsigned short instance; |
650 }; | 648 }; |
651 | 649 |
652 #define AIM_IMFLAGS_AWAY 0x01 /* mark as an autoreply */ | 650 #define AIM_IMFLAGS_AWAY 0x01 /* mark as an autoreply */ |
653 #define AIM_IMFLAGS_ACK 0x02 /* request a receipt notice */ | 651 #define AIM_IMFLAGS_ACK 0x02 /* request a receipt notice */ |
654 #define AIM_IMFLAGS_UNICODE 0x04 | 652 #define AIM_IMFLAGS_UNICODE 0x04 |
655 #define AIM_IMFLAGS_ISO_8859_1 0x08 | 653 #define AIM_IMFLAGS_ISO_8859_1 0x08 |
656 #define AIM_IMFLAGS_BUDDYREQ 0x10 /* buddy icon requested */ | 654 #define AIM_IMFLAGS_BUDDYREQ 0x10 /* buddy icon requested */ |
657 #define AIM_IMFLAGS_HASICON 0x20 /* already has icon (timestamp included) */ | 655 #define AIM_IMFLAGS_HASICON 0x20 /* already has icon (timestamp included) */ |
656 #define AIM_IMFLAGS_SUBENC_MACINTOSH 0x40 /* damn that Steve Jobs! */ | |
658 | 657 |
659 struct aim_sendimext_args { | 658 struct aim_sendimext_args { |
660 const char *destsn; | 659 const char *destsn; |
661 unsigned short flags; | 660 unsigned short flags; |
662 const char *msg; | 661 const char *msg; |
663 int msglen; | 662 int msglen; |
664 int iconlen; | 663 int iconlen; |
665 time_t iconstamp; | 664 time_t iconstamp; |
666 unsigned short iconsum; | 665 unsigned short iconsum; |
667 }; | 666 }; |
668 | 667 |
669 struct aim_incomingim_ch1_args { | 668 struct aim_incomingim_ch1_args { |
670 char *msg; | 669 char *msg; |
671 int msglen; | 670 int msglen; |
672 unsigned long icbmflags; | 671 unsigned long icbmflags; |
673 unsigned short flag1; | 672 unsigned short flag1; |
674 unsigned short flag2; | 673 unsigned short flag2; |
675 int finlen; | 674 int finlen; |
676 unsigned char fingerprint[10]; | 675 unsigned char fingerprint[10]; |
677 time_t iconstamp; | 676 time_t iconstamp; |
677 int extdatalen; | |
678 unsigned char *extdata; | |
678 }; | 679 }; |
679 | 680 |
680 struct aim_incomingim_ch2_args { | 681 struct aim_incomingim_ch2_args { |
681 unsigned short reqclass; | 682 unsigned short reqclass; |
682 unsigned short status; | 683 unsigned short status; |
683 union { | 684 union { |
684 struct { | 685 struct { |
685 unsigned int length; | 686 unsigned int length; |
686 time_t timestamp; | 687 time_t timestamp; |
687 unsigned char *icon; | 688 unsigned char *icon; |
688 } icon; | 689 } icon; |
689 struct { | 690 struct { |
690 } voice; | 691 } voice; |
691 struct aim_directim_priv *directim; | 692 struct aim_directim_priv *directim; |
692 struct { | 693 struct { |
693 char *msg; | 694 char *msg; |
694 char *encoding; | 695 char *encoding; |
695 char *lang; | 696 char *lang; |
696 struct aim_chat_roominfo roominfo; | 697 struct aim_chat_roominfo roominfo; |
697 } chat; | 698 } chat; |
698 struct { | 699 struct { |
699 char *ip; | 700 char *ip; |
700 unsigned char *cookie; | 701 unsigned char *cookie; |
701 } getfile; | 702 } getfile; |
702 struct { | 703 struct { |
703 } sendfile; | 704 } sendfile; |
704 } info; | 705 } info; |
705 }; | 706 }; |
706 | 707 |
707 faim_export int aim_send_im_ext(struct aim_session_t *sess, struct aim_conn_t *conn, struct aim_sendimext_args *args); | 708 faim_export int aim_send_im_ext(struct aim_session_t *sess, struct aim_conn_t *conn, struct aim_sendimext_args *args); |
708 faim_export int aim_send_im(struct aim_session_t *, struct aim_conn_t *, const char *destsn, unsigned short flags, const char *msg); | 709 faim_export int aim_send_im(struct aim_session_t *, struct aim_conn_t *, const char *destsn, unsigned short flags, const char *msg); |
709 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); | 710 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); |
710 faim_export unsigned short aim_iconsum(const unsigned char *buf, int buflen); | 711 faim_export unsigned short aim_iconsum(const unsigned char *buf, int buflen); |
711 faim_export int aim_send_im_direct(struct aim_session_t *, struct aim_conn_t *, char *); | 712 faim_export int aim_send_im_direct(struct aim_session_t *, struct aim_conn_t *, char *); |
712 faim_export struct aim_conn_t * aim_directim_initiate(struct aim_session_t *, struct aim_conn_t *, struct aim_directim_priv *, char *destsn); | 713 faim_export struct aim_conn_t * aim_directim_initiate(struct aim_session_t *, struct aim_conn_t *, struct aim_directim_priv *, char *destsn); |
713 faim_export struct aim_conn_t *aim_directim_connect(struct aim_session_t *, struct aim_conn_t *, struct aim_directim_priv *); | 714 faim_export struct aim_conn_t *aim_directim_connect(struct aim_session_t *, struct aim_conn_t *, struct aim_directim_priv *); |
714 faim_export unsigned long aim_seticbmparam(struct aim_session_t *, struct aim_conn_t *conn); | |
715 | 715 |
716 faim_export struct aim_conn_t *aim_getfile_initiate(struct aim_session_t *sess, struct aim_conn_t *conn, char *destsn); | 716 faim_export struct aim_conn_t *aim_getfile_initiate(struct aim_session_t *sess, struct aim_conn_t *conn, char *destsn); |
717 faim_export int aim_oft_getfile_request(struct aim_session_t *sess, struct aim_conn_t *conn, const unsigned char *name, const int size); | 717 faim_export int aim_oft_getfile_request(struct aim_session_t *sess, struct aim_conn_t *conn, const unsigned char *name, const int size); |
718 faim_export int aim_oft_getfile_ack(struct aim_session_t *sess, struct aim_conn_t *conn); | 718 faim_export int aim_oft_getfile_ack(struct aim_session_t *sess, struct aim_conn_t *conn); |
719 faim_export int aim_oft_getfile_end(struct aim_session_t *sess, struct aim_conn_t *conn); | 719 faim_export int aim_oft_getfile_end(struct aim_session_t *sess, struct aim_conn_t *conn); |
776 faim_export int aim_handlerendconnect(struct aim_session_t *sess, struct aim_conn_t *cur); | 776 faim_export int aim_handlerendconnect(struct aim_session_t *sess, struct aim_conn_t *cur); |
777 | 777 |
778 #define AIM_TRANSFER_DENY_NOTSUPPORTED 0x0000 | 778 #define AIM_TRANSFER_DENY_NOTSUPPORTED 0x0000 |
779 #define AIM_TRANSFER_DENY_DECLINE 0x0001 | 779 #define AIM_TRANSFER_DENY_DECLINE 0x0001 |
780 #define AIM_TRANSFER_DENY_NOTACCEPTING 0x0002 | 780 #define AIM_TRANSFER_DENY_NOTACCEPTING 0x0002 |
781 faim_export unsigned long aim_denytransfer(struct aim_session_t *sess, struct aim_conn_t *conn, char *sender, char *cookie, unsigned short code); | 781 faim_export int aim_denytransfer(struct aim_session_t *sess, struct aim_conn_t *conn, const char *sender, const char *cookie, unsigned short code); |
782 faim_export struct aim_conn_t *aim_accepttransfer(struct aim_session_t *sess, struct aim_conn_t *conn, char *sn, char *cookie, char *ip, unsigned short listingfiles, unsigned short listingtotsize, unsigned short listingsize, unsigned int listingchecksum, unsigned short rendid); | 782 faim_export struct aim_conn_t *aim_accepttransfer(struct aim_session_t *sess, struct aim_conn_t *conn, char *sn, char *cookie, char *ip, unsigned short listingfiles, unsigned short listingtotsize, unsigned short listingsize, unsigned int listingchecksum, unsigned short rendid); |
783 | 783 |
784 faim_export int aim_getinfo(struct aim_session_t *, struct aim_conn_t *, const char *, unsigned short); | 784 faim_export int aim_getinfo(struct aim_session_t *, struct aim_conn_t *, const char *, unsigned short); |
785 faim_export int aim_sendbuddyoncoming(struct aim_session_t *sess, struct aim_conn_t *conn, struct aim_userinfo_s *info); | 785 faim_export int aim_sendbuddyoncoming(struct aim_session_t *sess, struct aim_conn_t *conn, struct aim_userinfo_s *info); |
786 faim_export int aim_sendbuddyoffgoing(struct aim_session_t *sess, struct aim_conn_t *conn, char *sn); | 786 faim_export int aim_sendbuddyoffgoing(struct aim_session_t *sess, struct aim_conn_t *conn, char *sn); |
787 | |
788 #define AIM_IMPARAM_FLAG_CHANMSGS_ALLOWED 0x00000001 | |
789 #define AIM_IMPARAM_FLAG_MISSEDCALLS_ENABLED 0x00000002 | |
790 | |
791 /* This is what the server will give you if you don't set them yourself. */ | |
792 #define AIM_IMPARAM_DEFAULTS { \ | |
793 0, \ | |
794 AIM_IMPARAM_FLAG_CHANMSGS_ALLOWED | AIM_IMPARAM_FLAG_MISSEDCALLS_ENABLED, \ | |
795 512, /* !! Note how small this is. */ \ | |
796 (99.9)*10, (99.9)*10, \ | |
797 1000 \ | |
798 } | |
799 | |
800 /* This is what most AIM versions use. */ | |
801 #define AIM_IMPARAM_REASONABLE { \ | |
802 0, \ | |
803 AIM_IMPARAM_FLAG_CHANMSGS_ALLOWED | AIM_IMPARAM_FLAG_MISSEDCALLS_ENABLED, \ | |
804 8000, \ | |
805 (99.9)*10, (99.9)*10, \ | |
806 0 \ | |
807 } | |
808 | |
809 | |
810 struct aim_icbmparameters { | |
811 unsigned short maxchan; | |
812 unsigned long flags; /* AIM_IMPARAM_FLAG_ */ | |
813 unsigned short maxmsglen; /* message size that you will accept */ | |
814 unsigned short maxsenderwarn; /* this and below are *10 (999=99.9%) */ | |
815 unsigned short maxrecverwarn; | |
816 unsigned long minmsginterval; /* in milliseconds? */ | |
817 }; | |
818 | |
819 faim_export unsigned long aim_reqicbmparams(struct aim_session_t *sess, struct aim_conn_t *conn); | |
820 faim_export unsigned long aim_seticbmparam(struct aim_session_t *sess, struct aim_conn_t *conn, struct aim_icbmparameters *params); | |
787 | 821 |
788 | 822 |
789 /* aim_auth.c */ | 823 /* aim_auth.c */ |
790 faim_export int aim_auth_sendcookie(struct aim_session_t *, struct aim_conn_t *, u_char *); | 824 faim_export int aim_auth_sendcookie(struct aim_session_t *, struct aim_conn_t *, u_char *); |
791 faim_export u_long aim_auth_clientready(struct aim_session_t *, struct aim_conn_t *); | 825 faim_export u_long aim_auth_clientready(struct aim_session_t *, struct aim_conn_t *); |