X-Git-Url: http://andersk.mit.edu/gitweb/libfaim.git/blobdiff_plain/b13c9e1382d31677b7b7e58b1bcbfc123228c792..98c88242811131668c416faa1e8775b1ff386a88:/faim/aim.h diff --git a/faim/aim.h b/faim/aim.h index 66b1ca0..6f5165e 100644 --- a/faim/aim.h +++ b/faim/aim.h @@ -53,7 +53,7 @@ * But they get it to compile. */ #define faim_mutex_t char -#define faim_mutex_init(x, y) *x = 0 +#define faim_mutex_init(x) *x = 0 #define faim_mutex_lock(x) *x = 1; #define faim_mutex_unlock(x) *x = 0; #define faim_mutex_destroy(x) *x = 0; @@ -94,6 +94,8 @@ * for WinAIM clients (up through the latest (4.0.1957)) to * send any more than 1kb. Amaze all your windows friends * with utterly oversized instant messages! + * + * XXX: the real limit is the total SNAC size at 8192. Fix this. * */ #define MAXMSGLEN 7987 @@ -113,6 +115,8 @@ */ #define AIM_COOKIELEN 0x100 +#define AIM_MD5_STRING "AOL Instant Messenger (SM)" + #if debug > 0 #define faimdprintf(l, x...) {if (l >= debug) printf(x); } #else @@ -329,15 +333,17 @@ struct aim_userinfo_s { u_short capabilities; }; -#define AIM_CLASS_TRIAL 0x0001 -#define AIM_CLASS_UNKNOWN2 0x0002 +#define AIM_CLASS_TRIAL 0x0001 /* "damned transients" */ +#define AIM_CLASS_ADMINISTRATOR 0x0002 #define AIM_CLASS_AOL 0x0004 -#define AIM_CLASS_UNKNOWN4 0x0008 +#define AIM_CLASS_OSCAR_PAY 0x0008 #define AIM_CLASS_FREE 0x0010 #define AIM_CLASS_AWAY 0x0020 #define AIM_CLASS_UNKNOWN40 0x0040 #define AIM_CLASS_UNKNOWN80 0x0080 +#define AIM_CLASS_ALLUSERS 0x001f + /* * TLV handling */ @@ -399,9 +405,7 @@ struct aim_fileheader_t *aim_oft_getfh(char *hdr); /* aim_login.c */ int aim_sendconnack(struct aim_session_t *sess, struct aim_conn_t *conn); int aim_request_login (struct aim_session_t *sess, struct aim_conn_t *conn, char *sn); -int aim_send_login (struct aim_session_t *, struct aim_conn_t *, char *, char *, struct client_info_s *); -int aim_encode_password(const char *, u_char *); -int aimicq_encode_password(const char *password, u_char *encoded); +int aim_send_login (struct aim_session_t *, struct aim_conn_t *, char *, char *, struct client_info_s *, char *key); unsigned long aim_sendauthresp(struct aim_session_t *sess, struct aim_conn_t *conn, char *sn, char *bosip, @@ -409,6 +413,7 @@ unsigned long aim_sendauthresp(struct aim_session_t *sess, int regstatus); int aim_gencookie(unsigned char *buf); int aim_sendserverready(struct aim_session_t *sess, struct aim_conn_t *conn); +int aim_authkeyparse(struct aim_session_t *sess, struct command_rx_struct *command); unsigned long aim_sendredirect(struct aim_session_t *sess, struct aim_conn_t *conn, unsigned short servid, @@ -483,6 +488,12 @@ void aim_session_init(struct aim_session_t *); #define AIM_VISIBILITYCHANGE_DENYADD 0x07 #define AIM_VISIBILITYCHANGE_DENYREMOVE 0x08 +#define AIM_PRIVFLAGS_ALLOWIDLE 0x01 +#define AIM_PRIVFLAGS_ALLOWMEMBERSINCE 0x02 + +#define AIM_WARN_ANON 0x01 + +int aim_send_warning(struct aim_session_t *sess, struct aim_conn_t *conn, char *destsn, int anon); u_long aim_bos_nop(struct aim_session_t *, struct aim_conn_t *); u_long aim_bos_setidle(struct aim_session_t *, struct aim_conn_t *, u_long); u_long aim_bos_changevisibility(struct aim_session_t *, struct aim_conn_t *, int, char *); @@ -513,6 +524,7 @@ int aim_parse_last_bad(struct aim_session_t *, struct command_rx_struct *, ...); int aim_parse_generalerrs(struct aim_session_t *, struct command_rx_struct *command, ...); int aim_parsemotd_middle(struct aim_session_t *sess, struct command_rx_struct *command, ...); int aim_parse_ratechange_middle(struct aim_session_t *sess, struct command_rx_struct *command); +int aim_parse_evilnotify_middle(struct aim_session_t *sess, struct command_rx_struct *command); int aim_parse_msgack_middle(struct aim_session_t *sess, struct command_rx_struct *command); /* aim_im.c */ @@ -532,7 +544,7 @@ u_long aim_seticbmparam(struct aim_session_t *, struct aim_conn_t *conn); int aim_parse_msgerror_middle(struct aim_session_t *, struct command_rx_struct *); int aim_negchan_middle(struct aim_session_t *sess, struct command_rx_struct *command); -struct aim_conn_t * aim_directim_intiate(struct aim_session_t *, struct aim_conn_t *, struct aim_directim_priv *, char *); +struct aim_conn_t * aim_directim_initiate(struct aim_session_t *, struct aim_conn_t *, struct aim_directim_priv *, char *); int aim_send_im_direct(struct aim_session_t *, struct aim_conn_t *, char *); struct aim_conn_t *aim_directim_connect(struct aim_session_t *, struct aim_conn_t *, struct aim_directim_priv *);