No release numbers
------------------
+ - Sun Oct 14 19:45:54 PDT 2001
+ - Fix aim_icq_setstatus
+ - Minor touchups
+ - Parse 1/f (selfinfo)
+ - Add ICQ status defines
+
- Wed Oct 3 11:07:22 PDT 2001
- Fix awful bug in ft listenestablish.
- struct aim_userinfo_s becomes aim_userinfo_t.
#define AIM_SESS_FLAGS_XORLOGIN 0x00000002
#define AIM_SESS_FLAGS_NONBLOCKCONNECT 0x00000004
+/* Valid for calling aim_icq_setstatus() and for aim_userinfo_t->icqinfo.status */
+#define AIM_ICQ_STATE_ONLINE 0x0000
+#define AIM_ICQ_STATE_AWAY 0x0001
+#define AIM_ICQ_STATE_DND 0x0002
+#define AIM_ICQ_STATE_NA 0x0004
+#define AIM_ICQ_STATE_OCCUPIED 0x0010
+#define AIM_ICQ_STATE_CHAT 0x0020
+#define AIM_ICQ_STATE_INVISIBLE 0x0100
+
/*
* AIM User Info, Standard Form.
*/
faim_export int aim_setversions(aim_session_t *sess, aim_conn_t *conn);
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);
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);
-faim_export int aim_icq_setstatus(aim_session_t *sess, aim_conn_t *conn, fu32_t status);
+faim_export int aim_icq_setstatus(aim_session_t *sess, aim_conn_t *conn, fu16_t status);
faim_export struct aim_fileheader_t *aim_getlisting(aim_session_t *sess, FILE *);
*/
channel = aimbs_get16(bs);
- /*
- * Technically Channel 3 in chat could be done here too.
- */
- if ((channel != 0x01) && (channel != 0x02)) {
- faimdprintf(sess, 0, "icbm: ICBM received on an unsupported channel. Ignoring.\n (chan = %04x)", channel);
- return 0;
- }
-
/*
* Extract the standard user info block.
*
* Free up the TLV chain.
*/
aim_freetlvchain(&tlvlist);
+ } else {
+ faimdprintf(sess, 0, "icbm: ICBM received on an unsupported channel. Ignoring.\n (chan = %04x)", channel);
+ return 0;
}
return ret;
return 0;
}
-/* XXX parse this */
static int selfinfo(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
{
aim_rxcallback_t userfunc;
+ aim_userinfo_t userinfo;
+
+ aim_extractuserinfo(sess, bs, &userinfo);
if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
- return userfunc(sess, rx);
+ return userfunc(sess, rx, &userinfo);
return 0;
}
return 0;
}
-faim_export int aim_icq_setstatus(aim_session_t *sess, aim_conn_t *conn, fu32_t status)
+faim_export int aim_icq_setstatus(aim_session_t *sess, aim_conn_t *conn, fu16_t status)
{
aim_frame_t *fr;
aim_snacid_t snacid;
data = 0x00030000 | status; /* yay for error checking ;^) */
- if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 4)))
+ if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 8)))
return -ENOMEM;
snacid = aim_cachesnac(sess, 0x0001, 0x001e, 0x0000, NULL, 0);