/* * Subtype 0x0015 - Request the info of a user using the short method. This is * what iChat uses. It normally is VERY leniently rate limited. * * @param bn The buddy name whose info you wish to request. * @param flags The bitmask which specifies the type of info you wish to request. * 0x00000001 - Info/profile. * 0x00000002 - Away message. * 0x00000004 - Capabilities. * 0x00000008 - Certification. * @return Return 0 if no errors, otherwise return the error number. */ int aim_locate_getinfoshort(OscarData *od, const char *bn, guint32 flags) { FlapConnection *conn; ByteStream bs; aim_snacid_t snacid; if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_LOCATE)) || !bn) return -EINVAL; byte_stream_new(&bs, 4 + 1 + strlen(bn)); byte_stream_put32(&bs, flags); byte_stream_put8(&bs, strlen(bn)); byte_stream_putstr(&bs, bn); snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x0015, 0x0000, bn, strlen(bn)+1); flap_connection_send_snac_with_priority(od, conn, SNAC_FAMILY_LOCATE, 0x0015, 0x0000, snacid, &bs, FALSE); byte_stream_destroy(&bs); return 0; }
void flap_connection_send_snac(OscarData *od, FlapConnection *conn, guint16 family, const guint16 subtype, aim_snacid_t snacid, ByteStream *data) { flap_connection_send_snac_with_priority(od, conn, family, subtype, snacid, data, TRUE); }