comparison src/protocols/oscar/aim.h @ 2866:6d62d4520460

[gaim-migrate @ 2879] try that committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 10 Dec 2001 00:48:27 +0000
parents 9467e4ee81be
children 9b029055cfba
comparison
equal deleted inserted replaced
2865:88dc3623a2ae 2866:6d62d4520460
358 #define AIM_SESS_FLAGS_XORLOGIN 0x00000002 358 #define AIM_SESS_FLAGS_XORLOGIN 0x00000002
359 #define AIM_SESS_FLAGS_NONBLOCKCONNECT 0x00000004 359 #define AIM_SESS_FLAGS_NONBLOCKCONNECT 0x00000004
360 #define AIM_SESS_FLAGS_DONTTIMEOUTONICBM 0x00000008 360 #define AIM_SESS_FLAGS_DONTTIMEOUTONICBM 0x00000008
361 361
362 /* Valid for calling aim_icq_setstatus() and for aim_userinfo_t->icqinfo.status */ 362 /* Valid for calling aim_icq_setstatus() and for aim_userinfo_t->icqinfo.status */
363 #define AIM_ICQ_STATE_ONLINE 0x0000 363 #define AIM_ICQ_STATE_NORMAL 0x00000000
364 #define AIM_ICQ_STATE_AWAY 0x0001 364 #define AIM_ICQ_STATE_AWAY 0x00000001
365 #define AIM_ICQ_STATE_DND 0x0002 365 #define AIM_ICQ_STATE_DND 0x00000002
366 #define AIM_ICQ_STATE_NA 0x0004 366 #define AIM_ICQ_STATE_OUT 0x00000004
367 #define AIM_ICQ_STATE_OCCUPIED 0x0010 367 #define AIM_ICQ_STATE_BUSY 0x00000010
368 #define AIM_ICQ_STATE_CHAT 0x0020 368 #define AIM_ICQ_STATE_CHAT 0x00000020
369 #define AIM_ICQ_STATE_INVISIBLE 0x0100 369 #define AIM_ICQ_STATE_INVISIBLE 0x00000100
370 #define AIM_ICQ_STATE_WEBAWARE 0x00010000
370 371
371 /* 372 /*
372 * AIM User Info, Standard Form. 373 * AIM User Info, Standard Form.
373 */ 374 */
374 typedef struct { 375 typedef struct {
378 fu16_t flags; 379 fu16_t flags;
379 fu32_t membersince; 380 fu32_t membersince;
380 fu32_t onlinesince; 381 fu32_t onlinesince;
381 fu32_t sessionlen; 382 fu32_t sessionlen;
382 int capspresent; 383 int capspresent;
383 fu16_t capabilities; 384 fu32_t capabilities;
384 struct { 385 struct {
385 fu16_t status; 386 fu32_t status;
386 fu32_t ipaddr; 387 fu32_t ipaddr;
387 fu8_t crap[0x25]; /* until we figure it out... */ 388 fu8_t crap[0x25]; /* until we figure it out... */
388 } icqinfo; 389 } icqinfo;
389 } aim_userinfo_t; 390 } aim_userinfo_t;
390 391
393 faim_export fu16_t aim_userinfo_idle(aim_userinfo_t *ui); 394 faim_export fu16_t aim_userinfo_idle(aim_userinfo_t *ui);
394 faim_export float aim_userinfo_warnlevel(aim_userinfo_t *ui); 395 faim_export float aim_userinfo_warnlevel(aim_userinfo_t *ui);
395 faim_export time_t aim_userinfo_membersince(aim_userinfo_t *ui); 396 faim_export time_t aim_userinfo_membersince(aim_userinfo_t *ui);
396 faim_export time_t aim_userinfo_onlinesince(aim_userinfo_t *ui); 397 faim_export time_t aim_userinfo_onlinesince(aim_userinfo_t *ui);
397 faim_export fu32_t aim_userinfo_sessionlen(aim_userinfo_t *ui); 398 faim_export fu32_t aim_userinfo_sessionlen(aim_userinfo_t *ui);
398 faim_export int aim_userinfo_hascap(aim_userinfo_t *ui, fu16_t cap); 399 faim_export int aim_userinfo_hascap(aim_userinfo_t *ui, fu32_t cap);
399 400
400 #define AIM_FLAG_UNCONFIRMED 0x0001 /* "damned transients" */ 401 #define AIM_FLAG_UNCONFIRMED 0x0001 /* "damned transients" */
401 #define AIM_FLAG_ADMINISTRATOR 0x0002 402 #define AIM_FLAG_ADMINISTRATOR 0x0002
402 #define AIM_FLAG_AOL 0x0004 403 #define AIM_FLAG_AOL 0x0004
403 #define AIM_FLAG_OSCAR_PAY 0x0008 404 #define AIM_FLAG_OSCAR_PAY 0x0008
453 faim_internal int aim_writetlvchain(aim_bstream_t *bs, aim_tlvlist_t **list); 454 faim_internal int aim_writetlvchain(aim_bstream_t *bs, aim_tlvlist_t **list);
454 faim_internal int aim_addtlvtochain8(aim_tlvlist_t **list, const fu16_t t, const fu8_t v); 455 faim_internal int aim_addtlvtochain8(aim_tlvlist_t **list, const fu16_t t, const fu8_t v);
455 faim_internal int aim_addtlvtochain16(aim_tlvlist_t **list, const fu16_t t, const fu16_t v); 456 faim_internal int aim_addtlvtochain16(aim_tlvlist_t **list, const fu16_t t, const fu16_t v);
456 faim_internal int aim_addtlvtochain32(aim_tlvlist_t **list, const fu16_t type, const fu32_t v); 457 faim_internal int aim_addtlvtochain32(aim_tlvlist_t **list, const fu16_t type, const fu32_t v);
457 faim_internal int aim_addtlvtochain_raw(aim_tlvlist_t **list, const fu16_t t, const fu16_t l, const fu8_t *v); 458 faim_internal int aim_addtlvtochain_raw(aim_tlvlist_t **list, const fu16_t t, const fu16_t l, const fu8_t *v);
458 faim_internal int aim_addtlvtochain_caps(aim_tlvlist_t **list, const fu16_t t, const fu16_t caps); 459 faim_internal int aim_addtlvtochain_caps(aim_tlvlist_t **list, const fu16_t t, const fu32_t caps);
459 faim_internal int aim_addtlvtochain_noval(aim_tlvlist_t **list, const fu16_t type); 460 faim_internal int aim_addtlvtochain_noval(aim_tlvlist_t **list, const fu16_t type);
460 faim_internal int aim_addtlvtochain_userinfo(aim_tlvlist_t **list, fu16_t type, aim_userinfo_t *ui); 461 faim_internal int aim_addtlvtochain_userinfo(aim_tlvlist_t **list, fu16_t type, aim_userinfo_t *ui);
461 faim_internal int aim_addtlvtochain_frozentlvlist(aim_tlvlist_t **list, fu16_t type, aim_tlvlist_t **tl); 462 faim_internal int aim_addtlvtochain_frozentlvlist(aim_tlvlist_t **list, fu16_t type, aim_tlvlist_t **tl);
462 faim_internal int aim_counttlvchain(aim_tlvlist_t **list); 463 faim_internal int aim_counttlvchain(aim_tlvlist_t **list);
463 faim_internal int aim_sizetlvchain(aim_tlvlist_t **list); 464 faim_internal int aim_sizetlvchain(aim_tlvlist_t **list);
576 faim_export int aim_nop(aim_session_t *, aim_conn_t *); 577 faim_export int aim_nop(aim_session_t *, aim_conn_t *);
577 faim_export int aim_flap_nop(aim_session_t *sess, aim_conn_t *conn); 578 faim_export int aim_flap_nop(aim_session_t *sess, aim_conn_t *conn);
578 faim_export int aim_bos_setidle(aim_session_t *, aim_conn_t *, fu32_t); 579 faim_export int aim_bos_setidle(aim_session_t *, aim_conn_t *, fu32_t);
579 faim_export int aim_bos_changevisibility(aim_session_t *, aim_conn_t *, int, const char *); 580 faim_export int aim_bos_changevisibility(aim_session_t *, aim_conn_t *, int, const char *);
580 faim_export int aim_bos_setbuddylist(aim_session_t *, aim_conn_t *, const char *); 581 faim_export int aim_bos_setbuddylist(aim_session_t *, aim_conn_t *, const char *);
581 faim_export int aim_bos_setprofile(aim_session_t *sess, aim_conn_t *conn, const char *profile, const char *awaymsg, fu16_t caps); 582 faim_export int aim_bos_setprofile(aim_session_t *sess, aim_conn_t *conn, const char *profile, const char *awaymsg, fu32_t caps);
582 faim_export int aim_bos_setgroupperm(aim_session_t *, aim_conn_t *, fu32_t mask); 583 faim_export int aim_bos_setgroupperm(aim_session_t *, aim_conn_t *, fu32_t mask);
583 faim_export int aim_bos_setprivacyflags(aim_session_t *, aim_conn_t *, fu32_t); 584 faim_export int aim_bos_setprivacyflags(aim_session_t *, aim_conn_t *, fu32_t);
584 faim_export int aim_reqpersonalinfo(aim_session_t *, aim_conn_t *); 585 faim_export int aim_reqpersonalinfo(aim_session_t *, aim_conn_t *);
585 faim_export int aim_reqservice(aim_session_t *, aim_conn_t *, fu16_t); 586 faim_export int aim_reqservice(aim_session_t *, aim_conn_t *, fu16_t);
586 faim_export int aim_bos_reqrights(aim_session_t *, aim_conn_t *); 587 faim_export int aim_bos_reqrights(aim_session_t *, aim_conn_t *);
587 faim_export int aim_bos_reqbuddyrights(aim_session_t *, aim_conn_t *); 588 faim_export int aim_bos_reqbuddyrights(aim_session_t *, aim_conn_t *);
588 faim_export int aim_bos_reqlocaterights(aim_session_t *, aim_conn_t *); 589 faim_export int aim_bos_reqlocaterights(aim_session_t *, aim_conn_t *);
589 faim_export int aim_setdirectoryinfo(aim_session_t *sess, aim_conn_t *conn, 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, fu16_t privacy); 590 faim_export int aim_setdirectoryinfo(aim_session_t *sess, aim_conn_t *conn, 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, fu16_t privacy);
590 faim_export int aim_setuserinterests(aim_session_t *sess, aim_conn_t *conn, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, fu16_t privacy); 591 faim_export int aim_setuserinterests(aim_session_t *sess, aim_conn_t *conn, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, fu16_t privacy);
591 faim_export int aim_setextstatus(aim_session_t *sess, aim_conn_t *conn, fu16_t status); 592 faim_export int aim_setextstatus(aim_session_t *sess, aim_conn_t *conn, fu32_t status);
592 593
593 faim_export struct aim_fileheader_t *aim_getlisting(aim_session_t *sess, FILE *); 594 faim_export struct aim_fileheader_t *aim_getlisting(aim_session_t *sess, FILE *);
594 595
595 #define AIM_CLIENTTYPE_UNKNOWN 0x0000 596 #define AIM_CLIENTTYPE_UNKNOWN 0x0000
596 #define AIM_CLIENTTYPE_MC 0x0001 597 #define AIM_CLIENTTYPE_MC 0x0001
723 fu16_t charset; 724 fu16_t charset;
724 fu16_t charsubset; 725 fu16_t charsubset;
725 }; 726 };
726 727
727 /* 728 /*
729 * Arguments to aim_send_rtfmsg().
730 */
731 struct aim_sendrtfmsg_args {
732 const char *destsn;
733 fu32_t fgcolor;
734 fu32_t bgcolor;
735 const char *rtfmsg; /* must be in RTF */
736 };
737
738 /*
728 * This information is provided in the Incoming ICBM callback for 739 * This information is provided in the Incoming ICBM callback for
729 * Channel 1 ICBM's. 740 * Channel 1 ICBM's.
730 * 741 *
731 * Note that although CUSTOMFEATURES and CUSTOMCHARSET say they 742 * Note that although CUSTOMFEATURES and CUSTOMCHARSET say they
732 * are optional, both are always set by the current libfaim code. 743 * are optional, both are always set by the current libfaim code.
775 fu32_t length; 786 fu32_t length;
776 time_t timestamp; 787 time_t timestamp;
777 fu8_t *icon; 788 fu8_t *icon;
778 } icon; 789 } icon;
779 struct { 790 struct {
780 fu8_t junk; 791 fu32_t implementme;
781 } voice; 792 } voice;
782 struct { 793 struct {
783 fu8_t ip[22]; /* xxx.xxx.xxx.xxx:xxxxx\0 */ 794 fu8_t ip[22]; /* xxx.xxx.xxx.xxx:xxxxx\0 */
784 } imimage; 795 } imimage;
785 struct { 796 struct {
791 struct { 802 struct {
792 char *ip; 803 char *ip;
793 unsigned char *cookie; 804 unsigned char *cookie;
794 } getfile; 805 } getfile;
795 struct { 806 struct {
796 fu8_t junk; 807 fu32_t implementme;
797 } sendfile; 808 } sendfile;
809 struct {
810 fu32_t fgcolor;
811 fu32_t bgcolor;
812 const char *rtfmsg;
813 } rtfmsg;
798 } info; 814 } info;
799 }; 815 };
800 816
817 faim_export int aim_send_rtfmsg(aim_session_t *sess, struct aim_sendrtfmsg_args *args);
801 faim_export int aim_send_im_ext(aim_session_t *sess, struct aim_sendimext_args *args); 818 faim_export int aim_send_im_ext(aim_session_t *sess, struct aim_sendimext_args *args);
802 faim_export int aim_send_im(aim_session_t *, const char *destsn, unsigned short flags, const char *msg); 819 faim_export int aim_send_im(aim_session_t *, const char *destsn, unsigned short flags, const char *msg);
803 faim_export int aim_send_icon(aim_session_t *sess, const char *sn, const fu8_t *icon, int iconlen, time_t stamp, fu16_t iconsum); 820 faim_export int aim_send_icon(aim_session_t *sess, const char *sn, const fu8_t *icon, int iconlen, time_t stamp, fu16_t iconsum);
804 faim_export fu16_t aim_iconsum(const fu8_t *buf, int buflen); 821 faim_export fu16_t aim_iconsum(const fu8_t *buf, int buflen);
805 faim_export int aim_send_im_direct(aim_session_t *, aim_conn_t *, const char *msg); 822 faim_export int aim_send_im_direct(aim_session_t *, aim_conn_t *, const char *msg);
813 faim_export int aim_oft_getfile_request(aim_session_t *sess, aim_conn_t *conn, const char *name, int size); 830 faim_export int aim_oft_getfile_request(aim_session_t *sess, aim_conn_t *conn, const char *name, int size);
814 faim_export int aim_oft_getfile_ack(aim_session_t *sess, aim_conn_t *conn); 831 faim_export int aim_oft_getfile_ack(aim_session_t *sess, aim_conn_t *conn);
815 faim_export int aim_oft_getfile_end(aim_session_t *sess, aim_conn_t *conn); 832 faim_export int aim_oft_getfile_end(aim_session_t *sess, aim_conn_t *conn);
816 833
817 /* aim_info.c */ 834 /* aim_info.c */
818 #define AIM_CAPS_BUDDYICON 0x0001 835 #define AIM_CAPS_BUDDYICON 0x00000001
819 #define AIM_CAPS_VOICE 0x0002 836 #define AIM_CAPS_VOICE 0x00000002
820 #define AIM_CAPS_IMIMAGE 0x0004 837 #define AIM_CAPS_IMIMAGE 0x00000004
821 #define AIM_CAPS_CHAT 0x0008 838 #define AIM_CAPS_CHAT 0x00000008
822 #define AIM_CAPS_GETFILE 0x0010 839 #define AIM_CAPS_GETFILE 0x00000010
823 #define AIM_CAPS_SENDFILE 0x0020 840 #define AIM_CAPS_SENDFILE 0x00000020
824 #define AIM_CAPS_GAMES 0x0040 841 #define AIM_CAPS_GAMES 0x00000040
825 #define AIM_CAPS_SAVESTOCKS 0x0080 842 #define AIM_CAPS_SAVESTOCKS 0x00000080
826 #define AIM_CAPS_SENDBUDDYLIST 0x0100 843 #define AIM_CAPS_SENDBUDDYLIST 0x00000100
827 #define AIM_CAPS_GAMES2 0x0200 844 #define AIM_CAPS_GAMES2 0x00000200
828 #define AIM_CAPS_ICQ 0x0400 845 #define AIM_CAPS_ICQ 0x00000400
829 #define AIM_CAPS_ABINTERNAL 0x0800 846 #define AIM_CAPS_ABINTERNAL 0x00000800
830 #define AIM_CAPS_LAST 0x8000 847 #define AIM_CAPS_ICQRTF 0x00001000
848 #define AIM_CAPS_EMPTY 0x00002000
849 #define AIM_CAPS_ICQSERVERRELAY 0x00004000
850 #define AIM_CAPS_ICQUNKNOWN 0x00008000
851 #define AIM_CAPS_LAST 0x00010000
831 852
832 faim_export int aim_0002_000b(aim_session_t *sess, aim_conn_t *conn, const char *sn); 853 faim_export int aim_0002_000b(aim_session_t *sess, aim_conn_t *conn, const char *sn);
833 854
834 #define AIM_SENDMEMBLOCK_FLAG_ISREQUEST 0 855 #define AIM_SENDMEMBLOCK_FLAG_ISREQUEST 0
835 #define AIM_SENDMEMBLOCK_FLAG_ISHASH 1 856 #define AIM_SENDMEMBLOCK_FLAG_ISHASH 1