X-Git-Url: http://andersk.mit.edu/gitweb/libfaim.git/blobdiff_plain/00ef5271216e3bea9b233ce26a3c0f21fbca931f..6c05e18352e0aaceba28eccac7f8d07dd5557257:/include/aim.h diff --git a/include/aim.h b/include/aim.h index 6a78c77..244e4b3 100644 --- a/include/aim.h +++ b/include/aim.h @@ -169,7 +169,7 @@ struct client_info_s { long unknown; }; -#define AIM_CLIENTINFO_KNOWNGOOD { \ +#define AIM_CLIENTINFO_KNOWNGOOD_3_5_1670 { \ "AOL Instant Messenger (SM), version 3.5.1670/WIN32", \ 0x0003, \ 0x0005, \ @@ -181,6 +181,28 @@ struct client_info_s { 0x0000002a, \ } +#define AIM_CLIENTINFO_KNOWNGOOD_4_1_2010 { \ + "AOL Instant Messenger (SM), version 4.1.2010/WIN32", \ + 0x0004, \ + 0x0001, \ + 0x07da, \ + "us", \ + "en", \ + 0x0004, \ + 0x0000, \ + 0x0000004b, \ +} + +/* + * I would make 4.1.2010 the default, but they seem to have found + * an alternate way of breaking that one. + * + * 3.5.1670 should work fine, however, you will be subjected to the + * memory test, which may require you to have a WinAIM binary laying + * around. (see login.c::memrequest()) + */ +#define AIM_CLIENTINFO_KNOWNGOOD AIM_CLIENTINFO_KNOWNGOOD_3_5_1670 + #ifndef TRUE #define TRUE 1 #define FALSE 0 @@ -452,7 +474,7 @@ faim_export int aim_logoff(struct aim_session_t *); faim_export void aim_conn_kill(struct aim_session_t *sess, struct aim_conn_t **deadconn); #endif /* ndef FAIM_INTERNAL */ -typedef int (*rxcallback_t)(struct aim_session_t *, struct command_rx_struct *, ...); +typedef int (*aim_rxcallback_t)(struct aim_session_t *, struct command_rx_struct *, ...); /* aim_login.c */ faim_export int aim_sendconnack(struct aim_session_t *sess, struct aim_conn_t *conn); @@ -476,14 +498,14 @@ faim_export void aim_tx_purgequeue(struct aim_session_t *); struct aim_rxcblist_t { u_short family; u_short type; - rxcallback_t handler; + aim_rxcallback_t handler; u_short flags; struct aim_rxcblist_t *next; }; faim_export int aim_conn_setlatency(struct aim_conn_t *conn, int newval); -faim_export int aim_conn_addhandler(struct aim_session_t *, struct aim_conn_t *conn, u_short family, u_short type, rxcallback_t newhandler, u_short flags); +faim_export int aim_conn_addhandler(struct aim_session_t *, struct aim_conn_t *conn, u_short family, u_short type, aim_rxcallback_t newhandler, u_short flags); faim_export int aim_clearhandlers(struct aim_conn_t *conn); faim_export void aim_conn_close(struct aim_conn_t *deadconn); @@ -615,7 +637,7 @@ struct aim_filetransfer_priv { #define AIM_IMFLAGS_AWAY 0x01 /* mark as an autoreply */ #define AIM_IMFLAGS_ACK 0x02 /* request a receipt notice */ -faim_export unsigned long aim_send_im(struct aim_session_t *, struct aim_conn_t *, char *, u_int, char *); +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); faim_export int aim_send_im_direct(struct aim_session_t *, struct aim_conn_t *, char *); faim_export struct aim_conn_t * aim_directim_initiate(struct aim_session_t *, struct aim_conn_t *, struct aim_directim_priv *, char *destsn); faim_export struct aim_conn_t *aim_directim_connect(struct aim_session_t *, struct aim_conn_t *, struct aim_directim_priv *); @@ -627,14 +649,24 @@ faim_export int aim_oft_getfile_ack(struct aim_session_t *sess, struct aim_conn_ faim_export int aim_oft_getfile_end(struct aim_session_t *sess, struct aim_conn_t *conn); /* aim_info.c */ -#define AIM_CAPS_BUDDYICON 0x01 -#define AIM_CAPS_VOICE 0x02 -#define AIM_CAPS_IMIMAGE 0x04 -#define AIM_CAPS_CHAT 0x08 -#define AIM_CAPS_GETFILE 0x10 -#define AIM_CAPS_SENDFILE 0x20 -#define AIM_CAPS_GAMES 0x40 -#define AIM_CAPS_SAVESTOCKS 0x80 +#define AIM_CAPS_BUDDYICON 0x0001 +#define AIM_CAPS_VOICE 0x0002 +#define AIM_CAPS_IMIMAGE 0x0004 +#define AIM_CAPS_CHAT 0x0008 +#define AIM_CAPS_GETFILE 0x0010 +#define AIM_CAPS_SENDFILE 0x0020 +#define AIM_CAPS_GAMES 0x0040 +#define AIM_CAPS_SAVESTOCKS 0x0080 +#define AIM_CAPS_SENDBUDDYLIST 0x0100 +#define AIM_CAPS_GAMES2 0x0200 +#define AIM_CAPS_LAST 0x8000 + +faim_export int aim_0002_000b(struct aim_session_t *sess, struct aim_conn_t *conn, const char *sn); + +#define AIM_SENDMEMBLOCK_FLAG_ISREQUEST 0 +#define AIM_SENDMEMBLOCK_FLAG_ISHASH 1 + +faim_export int aim_sendmemblock(struct aim_session_t *sess, struct aim_conn_t *conn, unsigned long offset, unsigned long len, const unsigned char *buf, unsigned char flag); #define AIM_GETINFO_GENERALINFO 0x00001 #define AIM_GETINFO_AWAYMESSAGE 0x00003 @@ -711,7 +743,9 @@ struct aim_chat_exchangeinfo { char *lang2; }; -faim_export unsigned long aim_chat_send_im(struct aim_session_t *sess, struct aim_conn_t *conn, char *msg); +#define AIM_CHATFLAGS_NOREFLECT 0x0001 +#define AIM_CHATFLAGS_AWAY 0x0002 +faim_export unsigned long aim_chat_send_im(struct aim_session_t *sess, struct aim_conn_t *conn, unsigned short flags, const char *msg, int msglen); faim_export unsigned long aim_chat_join(struct aim_session_t *sess, struct aim_conn_t *conn, u_short exchange, const char *roomname); faim_export unsigned long aim_chat_clientready(struct aim_session_t *sess, struct aim_conn_t *conn); faim_export int aim_chat_attachname(struct aim_conn_t *conn, char *roomname);