comparison src/protocols/oscar/aim.h @ 11399:48244c196228

[gaim-migrate @ 13634] Fix some warnings? Get rid of some whitespace. My usual mucking about committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 01 Sep 2005 02:09:56 +0000
parents ab0fa7cd61cc
children 69b0378c79e0
comparison
equal deleted inserted replaced
11398:90290f579926 11399:48244c196228
53 * defined (it's included in a client app), the symbols 53 * defined (it's included in a client app), the symbols
54 * will be imported instead of exported. 54 * will be imported instead of exported.
55 */ 55 */
56 #ifdef WIN32_INDLL 56 #ifdef WIN32_INDLL
57 #define faim_export __declspec(dllexport) 57 #define faim_export __declspec(dllexport)
58 #else 58 #else
59 #define faim_export __declspec(dllimport) 59 #define faim_export __declspec(dllimport)
60 #endif /* WIN32_INDLL */ 60 #endif /* WIN32_INDLL */
61 #define faim_internal 61 #define faim_internal
62 #else 62 #else
63 /* 63 /*
96 * for WinAIM clients (up through the latest (4.0.1957)) to 96 * for WinAIM clients (up through the latest (4.0.1957)) to
97 * send any more than 1kb. Amaze all your windows friends 97 * send any more than 1kb. Amaze all your windows friends
98 * with utterly oversized instant messages! 98 * with utterly oversized instant messages!
99 * 99 *
100 * XXX: the real limit is the total SNAC size at 8192. Fix this. 100 * XXX: the real limit is the total SNAC size at 8192. Fix this.
101 * 101 *
102 */ 102 */
103 #define MAXMSGLEN 7987 103 #define MAXMSGLEN 7987
104 104
105 /* 105 /*
106 * Maximum size of a Buddy Icon. 106 * Maximum size of a Buddy Icon.
416 fu8_t handled; /* 0 = new, !0 = been handled */ 416 fu8_t handled; /* 0 = new, !0 = been handled */
417 struct aim_frame_s *next; 417 struct aim_frame_s *next;
418 } aim_frame_t; 418 } aim_frame_t;
419 419
420 typedef struct aim_msgcookie_s { 420 typedef struct aim_msgcookie_s {
421 fu8_t cookie[8]; 421 guchar cookie[8];
422 int type; 422 int type;
423 void *data; 423 void *data;
424 time_t addtime; 424 time_t addtime;
425 struct aim_msgcookie_s *next; 425 struct aim_msgcookie_s *next;
426 } aim_msgcookie_t; 426 } aim_msgcookie_t;
427 427
428 /* 428 /*
429 * AIM Session: The main client-data interface. 429 * AIM Session: The main client-data interface.
430 * 430 *
431 */ 431 */
432 typedef struct aim_session_s { 432 typedef struct aim_session_s {
433 433
434 /* ---- Client Accessible ------------------------ */ 434 /* ---- Client Accessible ------------------------ */
845 #define AIM_RENDEZVOUS_CANCEL 0x0001 845 #define AIM_RENDEZVOUS_CANCEL 0x0001
846 #define AIM_RENDEZVOUS_ACCEPT 0x0002 846 #define AIM_RENDEZVOUS_ACCEPT 0x0002
847 847
848 struct aim_incomingim_ch2_args { 848 struct aim_incomingim_ch2_args {
849 fu16_t status; 849 fu16_t status;
850 fu8_t cookie[8]; 850 guchar cookie[8];
851 int reqclass; 851 int reqclass;
852 const char *proxyip; 852 const char *proxyip;
853 const char *clientip; 853 const char *clientip;
854 const char *verifiedip; 854 const char *verifiedip;
855 fu16_t port; 855 fu16_t port;
906 /* 0x0006 */ faim_export int aim_im_sendch1_ext(aim_session_t *sess, struct aim_sendimext_args *args); 906 /* 0x0006 */ faim_export int aim_im_sendch1_ext(aim_session_t *sess, struct aim_sendimext_args *args);
907 /* 0x0006 */ faim_export int aim_im_sendch1(aim_session_t *, const char *destsn, fu16_t flags, const char *msg); 907 /* 0x0006 */ faim_export int aim_im_sendch1(aim_session_t *, const char *destsn, fu16_t flags, const char *msg);
908 /* 0x0006 */ faim_export int aim_im_sendch2_chatinvite(aim_session_t *sess, const char *sn, const char *msg, fu16_t exchange, const char *roomname, fu16_t instance); 908 /* 0x0006 */ faim_export int aim_im_sendch2_chatinvite(aim_session_t *sess, const char *sn, const char *msg, fu16_t exchange, const char *roomname, fu16_t instance);
909 /* 0x0006 */ faim_export int aim_im_sendch2_icon(aim_session_t *sess, const char *sn, const fu8_t *icon, int iconlen, time_t stamp, fu16_t iconsum); 909 /* 0x0006 */ faim_export int aim_im_sendch2_icon(aim_session_t *sess, const char *sn, const fu8_t *icon, int iconlen, time_t stamp, fu16_t iconsum);
910 /* 0x0006 */ faim_export int aim_im_sendch2_rtfmsg(aim_session_t *sess, struct aim_sendrtfmsg_args *args); 910 /* 0x0006 */ faim_export int aim_im_sendch2_rtfmsg(aim_session_t *sess, struct aim_sendrtfmsg_args *args);
911 /* 0x0006 */ faim_export int aim_im_sendch2_odcrequest(aim_session_t *sess, fu8_t *cookie, fu8_t usecookie, const char *sn, const fu8_t *ip, fu16_t port); 911 /* 0x0006 */ faim_export int aim_im_sendch2_odcrequest(aim_session_t *sess, guchar *cookie, gboolean usecookie, const char *sn, const fu8_t *ip, fu16_t port);
912 /* 0x0006 */ faim_export int aim_im_sendch2_sendfile_ask(aim_session_t *sess, struct aim_oft_info *oft_info); 912 /* 0x0006 */ faim_export int aim_im_sendch2_sendfile_ask(aim_session_t *sess, struct aim_oft_info *oft_info);
913 /* 0x0006 */ faim_export int aim_im_sendch2_sendfile_accept(aim_session_t *sess, struct aim_oft_info *info); 913 /* 0x0006 */ faim_export int aim_im_sendch2_sendfile_accept(aim_session_t *sess, struct aim_oft_info *info);
914 /* 0x0006 */ faim_export int aim_im_sendch2_sendfile_cancel(aim_session_t *sess, struct aim_oft_info *oft_info); 914 /* 0x0006 */ faim_export int aim_im_sendch2_sendfile_cancel(aim_session_t *sess, struct aim_oft_info *oft_info);
915 /* 0x0006 */ faim_export int aim_im_sendch2_geticqaway(aim_session_t *sess, const char *sn, int type); 915 /* 0x0006 */ faim_export int aim_im_sendch2_geticqaway(aim_session_t *sess, const char *sn, int type);
916 /* 0x0006 */ faim_export int aim_im_sendch4(aim_session_t *sess, const char *sn, fu16_t type, const char *message); 916 /* 0x0006 */ faim_export int aim_im_sendch4(aim_session_t *sess, const char *sn, fu16_t type, const char *message);
917 /* 0x0008 */ faim_export int aim_im_warn(aim_session_t *sess, aim_conn_t *conn, const char *destsn, fu32_t flags); 917 /* 0x0008 */ faim_export int aim_im_warn(aim_session_t *sess, aim_conn_t *conn, const char *destsn, fu32_t flags);
918 /* 0x000b */ faim_export int aim_im_denytransfer(aim_session_t *sess, const char *sender, const fu8_t *cookie, fu16_t code); 918 /* 0x000b */ faim_export int aim_im_denytransfer(aim_session_t *sess, const char *sender, const guchar *cookie, fu16_t code);
919 /* 0x0014 */ faim_export int aim_im_sendmtn(aim_session_t *sess, fu16_t type1, const char *sn, fu16_t type2); 919 /* 0x0014 */ faim_export int aim_im_sendmtn(aim_session_t *sess, fu16_t type1, const char *sn, fu16_t type2);
920 faim_export void aim_im_makecookie(char* cookie); 920 faim_export void aim_im_makecookie(guchar* cookie);
921 921
922 922
923 /* ft.c */ 923 /* ft.c */
924 struct aim_fileheader_t { 924 struct aim_fileheader_t {
925 #if 0 925 #if 0
926 char magic[4]; /* 0 */ 926 char magic[4]; /* 0 */
927 fu16_t hdrlen; /* 4 */ 927 fu16_t hdrlen; /* 4 */
928 fu16_t hdrtype; /* 6 */ 928 fu16_t hdrtype; /* 6 */
929 #endif 929 #endif
930 char bcookie[8]; /* 8 */ 930 guchar bcookie[8]; /* 8 */
931 fu16_t encrypt; /* 16 */ 931 fu16_t encrypt; /* 16 */
932 fu16_t compress; /* 18 */ 932 fu16_t compress; /* 18 */
933 fu16_t totfiles; /* 20 */ 933 fu16_t totfiles; /* 20 */
934 fu16_t filesleft; /* 22 */ 934 fu16_t filesleft; /* 22 */
935 fu16_t totparts; /* 24 */ 935 fu16_t totparts; /* 24 */
942 fu32_t rfsize; /* 48 */ 942 fu32_t rfsize; /* 48 */
943 fu32_t cretime; /* 52 */ 943 fu32_t cretime; /* 52 */
944 fu32_t rfcsum; /* 56 */ 944 fu32_t rfcsum; /* 56 */
945 fu32_t nrecvd; /* 60 */ 945 fu32_t nrecvd; /* 60 */
946 fu32_t recvcsum; /* 64 */ 946 fu32_t recvcsum; /* 64 */
947 fu8_t idstring[32]; /* 68 */ 947 char idstring[32]; /* 68 */
948 fu8_t flags; /* 100 */ 948 fu8_t flags; /* 100 */
949 fu8_t lnameoffset; /* 101 */ 949 fu8_t lnameoffset; /* 101 */
950 fu8_t lsizeoffset; /* 102 */ 950 fu8_t lsizeoffset; /* 102 */
951 char dummy[69]; /* 103 */ 951 char dummy[69]; /* 103 */
952 char macfileinfo[16]; /* 172 */ 952 char macfileinfo[16]; /* 172 */
960 fu16_t packet_ver; 960 fu16_t packet_ver;
961 fu16_t cmd_type; 961 fu16_t cmd_type;
962 fu16_t flags; 962 fu16_t flags;
963 char* ip; /* IP address sent along with this packet */ 963 char* ip; /* IP address sent along with this packet */
964 fu16_t port; /* This is NOT the port we should use to connect. Always connect to 5190 */ 964 fu16_t port; /* This is NOT the port we should use to connect. Always connect to 5190 */
965 fu8_t cookie[8]; 965 guchar cookie[8];
966 fu32_t unknownA; 966 fu32_t unknownA;
967 fu16_t err_code; /* Valid only for cmd_type of AIM_RV_PROXY_ERROR */ 967 fu16_t err_code; /* Valid only for cmd_type of AIM_RV_PROXY_ERROR */
968 aim_conn_t *conn; 968 aim_conn_t *conn;
969 aim_session_t *sess; 969 aim_session_t *sess;
970 }; 970 };
971 971
972 struct aim_oft_info { 972 struct aim_oft_info {
973 fu8_t cookie[8]; 973 guchar cookie[8];
974 char *sn; 974 char *sn;
975 char *proxyip; 975 char *proxyip;
976 char *clientip; 976 char *clientip;
977 char *verifiedip; 977 char *verifiedip;
978 fu16_t port; 978 fu16_t port;
979 979
980 int send_or_recv; /* Send or receive */ 980 int send_or_recv; /* Send or receive */
981 int method; /* What method is being used to transfer this file? DIRECT, REDIR, or PROXY */ 981 int method; /* What method is being used to transfer this file? DIRECT, REDIR, or PROXY */
982 int stage; /* At what stage was a proxy requested? NONE, STG1, STG2*/ 982 int stage; /* At what stage was a proxy requested? NONE, STG1, STG2*/
983 int xfer_reffed; /* There are many timers, but we should only ref the xfer once */ 983 int xfer_reffed; /* There are many timers, but we should only ref the xfer once */
984 fu32_t res_bytes; /* The bytes already received for resuming a transfer */ 984 fu32_t res_bytes; /* The bytes already received for resuming a transfer */
985 985
986 aim_conn_t *conn; 986 aim_conn_t *conn;
987 aim_session_t *sess; 987 aim_session_t *sess;
988 int success; /* Was the connection successful? Used for timing out the transfer. */ 988 int success; /* Was the connection successful? Used for timing out the transfer. */
989 struct aim_fileheader_t fh; 989 struct aim_fileheader_t fh;
990 struct aim_oft_info *next; 990 struct aim_oft_info *next;
998 faim_export int aim_odc_send_im(aim_session_t *sess, aim_conn_t *conn, const char *msg, int len, int encoding, int isawaymsg); 998 faim_export int aim_odc_send_im(aim_session_t *sess, aim_conn_t *conn, const char *msg, int len, int encoding, int isawaymsg);
999 faim_export const char *aim_odc_getsn(aim_conn_t *conn); 999 faim_export const char *aim_odc_getsn(aim_conn_t *conn);
1000 faim_export const guchar *aim_odc_getcookie(aim_conn_t *conn); 1000 faim_export const guchar *aim_odc_getcookie(aim_conn_t *conn);
1001 faim_export aim_conn_t *aim_odc_getconn(aim_session_t *sess, const char *sn); 1001 faim_export aim_conn_t *aim_odc_getconn(aim_session_t *sess, const char *sn);
1002 faim_export aim_conn_t *aim_odc_initiate(aim_session_t *sess, const char *sn, int listenfd, 1002 faim_export aim_conn_t *aim_odc_initiate(aim_session_t *sess, const char *sn, int listenfd,
1003 const fu8_t *localip, fu16_t port, const fu8_t *mycookie); 1003 const fu8_t *localip, fu16_t port, const guchar *mycookie);
1004 faim_export aim_conn_t *aim_odc_connect(aim_session_t *sess, const char *sn, const char *addr, const fu8_t *cookie); 1004 faim_export aim_conn_t *aim_odc_connect(aim_session_t *sess, const char *sn, const char *addr, const guchar *cookie);
1005 1005
1006 faim_export struct aim_oft_info *aim_oft_createinfo(aim_session_t *sess, const fu8_t *cookie, const char *sn, 1006 faim_export struct aim_oft_info *aim_oft_createinfo(aim_session_t *sess, const guchar *cookie, const char *sn,
1007 const char *ip, fu16_t port, fu32_t size, fu32_t modtime, char *filename, int send_or_recv, 1007 const char *ip, fu16_t port, fu32_t size, fu32_t modtime, char *filename, int send_or_recv,
1008 int method, int stage); 1008 int method, int stage);
1009 faim_export int aim_oft_destroyinfo(struct aim_oft_info *oft_info); 1009 faim_export int aim_oft_destroyinfo(struct aim_oft_info *oft_info);
1010 faim_export struct aim_rv_proxy_info *aim_rv_proxy_createinfo(aim_session_t *sess, const fu8_t *cookie, fu16_t port); 1010 faim_export struct aim_rv_proxy_info *aim_rv_proxy_createinfo(aim_session_t *sess, const guchar *cookie, fu16_t port);
1011 faim_export int aim_sendfile_listen(aim_session_t *sess, struct aim_oft_info *oft_info, int listenfd); 1011 faim_export int aim_sendfile_listen(aim_session_t *sess, struct aim_oft_info *oft_info, int listenfd);
1012 faim_export int aim_oft_sendheader(aim_session_t *sess, fu16_t type, struct aim_oft_info *oft_info); 1012 faim_export int aim_oft_sendheader(aim_session_t *sess, fu16_t type, struct aim_oft_info *oft_info);
1013 1013
1014 faim_export int aim_rv_proxy_init_recv(struct aim_rv_proxy_info *proxy_info); 1014 faim_export int aim_rv_proxy_init_recv(struct aim_rv_proxy_info *proxy_info);
1015 faim_export int aim_rv_proxy_init_send(struct aim_rv_proxy_info *proxy_info); 1015 faim_export int aim_rv_proxy_init_send(struct aim_rv_proxy_info *proxy_info);