pidgin: bd9708fe: Replaced family_*'s magic numbers of FLA...

evands at pidgin.im evands at pidgin.im
Sat Jun 7 14:45:59 EDT 2008


-----------------------------------------------------------------
Revision: bd9708fed922d9c7c3c4e54e4f20713b6844778d
Ancestor: 5bf6b899439a3fed0cd0b638d9afc41fc67e0675
Author: evands at pidgin.im
Date: 2008-06-07T18:42:48
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/bd9708fed922d9c7c3c4e54e4f20713b6844778d

Modified files:
        libpurple/protocols/oscar/family_admin.c
        libpurple/protocols/oscar/family_advert.c
        libpurple/protocols/oscar/family_alert.c
        libpurple/protocols/oscar/family_auth.c
        libpurple/protocols/oscar/family_bart.c
        libpurple/protocols/oscar/family_bos.c
        libpurple/protocols/oscar/family_buddy.c
        libpurple/protocols/oscar/family_chat.c
        libpurple/protocols/oscar/family_chatnav.c
        libpurple/protocols/oscar/family_icbm.c
        libpurple/protocols/oscar/family_icq.c
        libpurple/protocols/oscar/family_invite.c
        libpurple/protocols/oscar/family_locate.c
        libpurple/protocols/oscar/family_odir.c
        libpurple/protocols/oscar/family_oservice.c
        libpurple/protocols/oscar/family_popup.c
        libpurple/protocols/oscar/family_stats.c
        libpurple/protocols/oscar/family_translate.c
        libpurple/protocols/oscar/family_userlookup.c

ChangeLog: 

Replaced family_*'s magic numbers of FLAP families with the constants
defined in snactypes.h

-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/family_admin.c	89a01fc431a04b4125097547a90c7b6471ff97af
+++ libpurple/protocols/oscar/family_admin.c	9542b730b690c9c1ad7757890960c5f648ea5711
@@ -47,8 +47,8 @@ aim_admin_getinfo(OscarData *od, FlapCon
 	byte_stream_put16(&bs, info);
 	byte_stream_put16(&bs, 0x0000);
 
-	snacid = aim_cachesnac(od, 0x0007, 0x0002, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0007, 0x0002, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ADMIN, 0x0002, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ADMIN, 0x0002, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 }
@@ -127,8 +127,8 @@ aim_admin_setnick(OscarData *od, FlapCon
 	aim_tlvlist_write(&bs, &tlvlist);
 	aim_tlvlist_free(tlvlist);
 
-	snacid = aim_cachesnac(od, 0x0007, 0x0004, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0007, 0x0004, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ADMIN, 0x0004, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ADMIN, 0x0004, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 }
@@ -154,8 +154,8 @@ aim_admin_changepasswd(OscarData *od, Fl
 	aim_tlvlist_write(&bs, &tlvlist);
 	aim_tlvlist_free(tlvlist);
 
-	snacid = aim_cachesnac(od, 0x0007, 0x0004, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0007, 0x0004, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ADMIN, 0x0004, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ADMIN, 0x0004, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 }
@@ -177,8 +177,8 @@ aim_admin_setemail(OscarData *od, FlapCo
 	aim_tlvlist_write(&bs, &tlvlist);
 	aim_tlvlist_free(tlvlist);
 
-	snacid = aim_cachesnac(od, 0x0007, 0x0004, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0007, 0x0004, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ADMIN, 0x0004, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ADMIN, 0x0004, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 }
@@ -194,11 +194,11 @@ aim_admin_reqconfirm(OscarData *od, Flap
 void
 aim_admin_reqconfirm(OscarData *od, FlapConnection *conn)
 {
-	aim_genericreq_n(od, conn, 0x0007, 0x0006);
+	aim_genericreq_n(od, conn, SNAC_FAMILY_ADMIN, 0x0006);
 }
 
 /**
- * Subtype 0x0007 - Account confirmation request acknowledgement.
+ * Subtype SNAC_FAMILY_ADMIN - Account confirmation request acknowledgement.
  */
 static int
 accountconfirm(OscarData *od, FlapConnection *conn, aim_module_t *mod, FlapFrame *frame, aim_modsnac_t *snac, ByteStream *bs)
@@ -227,7 +227,7 @@ snachandler(OscarData *od, FlapConnectio
 	if ((snac->subtype == 0x0003) || (snac->subtype == 0x0005)) {
 		infochange(od, conn, mod, frame, snac, bs);
 		return 1;
-	} else if (snac->subtype == 0x0007)
+	} else if (snac->subtype == SNAC_FAMILY_ADMIN)
 		return accountconfirm(od, conn, mod, frame, snac, bs);
 
 	return 0;
@@ -235,7 +235,7 @@ int admin_modfirst(OscarData *od, aim_mo
 
 int admin_modfirst(OscarData *od, aim_module_t *mod)
 {
-	mod->family = 0x0007;
+	mod->family = SNAC_FAMILY_ADMIN;
 	mod->version = 0x0001;
 	mod->toolid = 0x0010;
 	mod->toolversion = 0x0629;
============================================================
--- libpurple/protocols/oscar/family_advert.c	a20189af9562b909c0cabd80da96c6bc7e4c5526
+++ libpurple/protocols/oscar/family_advert.c	ad746188e8dd1a9af1e7f77e0ce55bdaa9b2448e
@@ -28,7 +28,7 @@ aim_ads_requestads(OscarData *od, FlapCo
 void
 aim_ads_requestads(OscarData *od, FlapConnection *conn)
 {
-	aim_genericreq_n(od, conn, 0x0005, 0x0002);
+	aim_genericreq_n(od, conn, SNAC_FAMILY_ADVERT, 0x0002);
 }
 
 static int snachandler(OscarData *od, FlapConnection *conn, aim_module_t *mod, FlapFrame *rx, aim_modsnac_t *snac, ByteStream *bs)
@@ -39,7 +39,7 @@ int adverts_modfirst(OscarData *od, aim_
 int adverts_modfirst(OscarData *od, aim_module_t *mod)
 {
 
-	mod->family = 0x0005;
+	mod->family = SNAC_FAMILY_ADVERT;
 	mod->version = 0x0001;
 	mod->toolid = 0x0001;
 	mod->toolversion = 0x0001;
============================================================
--- libpurple/protocols/oscar/family_alert.c	e4a2cc635673788e9b6b7d6c477172b06e1048ec
+++ libpurple/protocols/oscar/family_alert.c	0203463e122a14c26d17a0086244501f674a12ed
@@ -72,8 +72,8 @@ aim_email_sendcookies(OscarData *od)
 	byte_stream_put16(&bs, 0xb0ee);
 	byte_stream_put16(&bs, 0x0631);
 
-	snacid = aim_cachesnac(od, 0x0018, 0x0006, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0018, 0x0006, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ALERT, 0x0006, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ALERT, 0x0006, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -188,8 +188,8 @@ aim_email_activate(OscarData *od)
 	byte_stream_put32(&bs, 0x04000000);
 	byte_stream_put32(&bs, 0x00000000);
 
-	snacid = aim_cachesnac(od, 0x0018, 0x0016, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0018, 0x0006, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ALERT, 0x0016, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ALERT, 0x0006, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -225,7 +225,7 @@ email_modfirst(OscarData *od, aim_module
 int
 email_modfirst(OscarData *od, aim_module_t *mod)
 {
-	mod->family = 0x0018;
+	mod->family = SNAC_FAMILY_ALERT;
 	mod->version = 0x0001;
 	mod->toolid = 0x0010;
 	mod->toolversion = 0x0629;
============================================================
--- libpurple/protocols/oscar/family_auth.c	3b8f087e8165345ecc68af0d427ad1ce6c11f2fb
+++ libpurple/protocols/oscar/family_auth.c	fd3854f0dae6663c87cc8614243c6e00dd6a7870
@@ -225,8 +225,8 @@ aim_send_login(OscarData *od, FlapConnec
 
 	frame = flap_frame_new(od, 0x02, 1152);
 
-	snacid = aim_cachesnac(od, 0x0017, 0x0002, 0x0000, NULL, 0);
-	aim_putsnac(&frame->data, 0x0017, 0x0002, 0x0000, snacid);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_AUTH, 0x0002, 0x0000, NULL, 0);
+	aim_putsnac(&frame->data, SNAC_FAMILY_AUTH, 0x0002, 0x0000, snacid);
 
 	aim_tlvlist_add_str(&tlvlist, 0x0001, sn);
 
@@ -407,7 +407,7 @@ parse(OscarData *od, FlapConnection *con
 
 	od->authinfo = info;
 
-	if ((userfunc = aim_callhandler(od, snac ? snac->family : 0x0017, snac ? snac->subtype : 0x0003)))
+	if ((userfunc = aim_callhandler(od, snac ? snac->family : SNAC_FAMILY_AUTH, snac ? snac->subtype : 0x0003)))
 		ret = userfunc(od, conn, frame, info);
 
 	aim_tlvlist_free(tlvlist);
@@ -453,7 +453,7 @@ goddamnicq(OscarData *od, FlapConnection
 	FlapFrame frame;
 	aim_rxcallback_t userfunc;
 
-	if ((userfunc = aim_callhandler(od, 0x0017, 0x0007)))
+	if ((userfunc = aim_callhandler(od, SNAC_FAMILY_AUTH, 0x0007)))
 		userfunc(od, conn, &frame, "");
 
 	return 0;
@@ -487,8 +487,8 @@ aim_request_login(OscarData *od, FlapCon
 
 	frame = flap_frame_new(od, 0x02, 10+2+2+strlen(sn)+8);
 
-	snacid = aim_cachesnac(od, 0x0017, 0x0006, 0x0000, NULL, 0);
-	aim_putsnac(&frame->data, 0x0017, 0x0006, 0x0000, snacid);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_AUTH, 0x0006, 0x0000, NULL, 0);
+	aim_putsnac(&frame->data, SNAC_FAMILY_AUTH, 0x0006, 0x0000, snacid);
 
 	aim_tlvlist_add_str(&tlvlist, 0x0001, sn);
 
@@ -632,7 +632,7 @@ auth_modfirst(OscarData *od, aim_module_
 int
 auth_modfirst(OscarData *od, aim_module_t *mod)
 {
-	mod->family = 0x0017;
+	mod->family = SNAC_FAMILY_AUTH;
 	mod->version = 0x0000;
 	mod->flags = 0;
 	strncpy(mod->name, "auth", sizeof(mod->name));
============================================================
--- libpurple/protocols/oscar/family_bart.c	cb5cc9d9af48ff07263507cc2104be85b6909dd2
+++ libpurple/protocols/oscar/family_bart.c	ebbba3a44c178330e50662cf9e3e418d43a6abba
@@ -43,7 +43,7 @@ aim_bart_upload(OscarData *od, const gui
 	ByteStream bs;
 	aim_snacid_t snacid;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0010)) || !icon || !iconlen)
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_BART)) || !icon || !iconlen)
 		return -EINVAL;
 
 	byte_stream_new(&bs, 2 + 2 + iconlen);
@@ -55,8 +55,8 @@ aim_bart_upload(OscarData *od, const gui
 	byte_stream_put16(&bs, iconlen);
 	byte_stream_putraw(&bs, icon, iconlen);
 
-	snacid = aim_cachesnac(od, 0x0010, 0x0002, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0010, 0x0002, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_BART, 0x0002, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_BART, 0x0002, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -102,7 +102,7 @@ aim_bart_request(OscarData *od, const ch
 	ByteStream bs;
 	aim_snacid_t snacid;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0010)) || !sn || !strlen(sn) || !iconcsum || !iconcsumlen)
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_BART)) || !sn || !strlen(sn) || !iconcsum || !iconcsumlen)
 		return -EINVAL;
 
 	byte_stream_new(&bs, 1+strlen(sn) + 4 + 1+iconcsumlen);
@@ -120,8 +120,8 @@ aim_bart_request(OscarData *od, const ch
 	byte_stream_put8(&bs, iconcsumlen);
 	byte_stream_putraw(&bs, iconcsum, iconcsumlen);
 
-	snacid = aim_cachesnac(od, 0x0010, 0x0004, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0010, 0x0004, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_BART, 0x0004, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_BART, 0x0004, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -174,7 +174,7 @@ bart_modfirst(OscarData *od, aim_module_
 int
 bart_modfirst(OscarData *od, aim_module_t *mod)
 {
-	mod->family = 0x0010;
+	mod->family = SNAC_FAMILY_BART;
 	mod->version = 0x0001;
 	mod->toolid = 0x0010;
 	mod->toolversion = 0x0629;
============================================================
--- libpurple/protocols/oscar/family_bos.c	c19e9497e777dbcba750b82a01e13d58d1c3756a
+++ libpurple/protocols/oscar/family_bos.c	5c0e0cee7c92d6381bd6806f5eff5ee10318d165
@@ -32,7 +32,7 @@ aim_bos_reqrights(OscarData *od, FlapCon
 void
 aim_bos_reqrights(OscarData *od, FlapConnection *conn)
 {
-	aim_genericreq_n_snacid(od, conn, 0x0009, 0x0002);
+	aim_genericreq_n_snacid(od, conn, SNAC_FAMILY_BOS, 0x0002);
 }
 
 /* Subtype 0x0003 - BOS Rights. */
@@ -81,7 +81,7 @@ aim_bos_setgroupperm(OscarData *od, Flap
 void
 aim_bos_setgroupperm(OscarData *od, FlapConnection *conn, guint32 mask)
 {
-	aim_genericreq_l(od, conn, 0x0009, 0x0004, &mask);
+	aim_genericreq_l(od, conn, SNAC_FAMILY_BOS, 0x0004, &mask);
 }
 
 /*
@@ -153,8 +153,8 @@ int aim_bos_changevisibility(OscarData *
 	}
 	g_free(localcpy);
 
-	snacid = aim_cachesnac(od, 0x0009, subtype, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0009, subtype, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_BOS, subtype, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_BOS, subtype, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -173,7 +173,7 @@ bos_modfirst(OscarData *od, aim_module_t
 int
 bos_modfirst(OscarData *od, aim_module_t *mod)
 {
-	mod->family = 0x0009;
+	mod->family = SNAC_FAMILY_BOS;
 	mod->version = 0x0001;
 	mod->toolid = 0x0110;
 	mod->toolversion = 0x0629;
============================================================
--- libpurple/protocols/oscar/family_buddy.c	cab8c698b9de21da9fcf9f6a6fc6076cdbd6b6cd
+++ libpurple/protocols/oscar/family_buddy.c	ea016d2eed0651a6b6622bdfcba4da957534a082
@@ -108,8 +108,8 @@ aim_buddylist_addbuddy(OscarData *od, Fl
 	byte_stream_put8(&bs, strlen(sn));
 	byte_stream_putstr(&bs, sn);
 
-	snacid = aim_cachesnac(od, 0x0003, 0x0004, 0x0000, sn, strlen(sn)+1);
-	flap_connection_send_snac(od, conn, 0x0003, 0x0004, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_BUDDY, 0x0004, 0x0000, sn, strlen(sn)+1);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_BUDDY, 0x0004, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -159,8 +159,8 @@ aim_buddylist_set(OscarData *od, FlapCon
 		tmpptr = strtok(NULL, "&");
 	}
 
-	snacid = aim_cachesnac(od, 0x0003, 0x0004, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0003, 0x0004, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_BUDDY, 0x0004, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_BUDDY, 0x0004, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -190,8 +190,8 @@ aim_buddylist_removebuddy(OscarData *od,
 	byte_stream_put8(&bs, strlen(sn));
 	byte_stream_putstr(&bs, sn);
 
-	snacid = aim_cachesnac(od, 0x0003, 0x0005, 0x0000, sn, strlen(sn)+1);
-	flap_connection_send_snac(od, conn, 0x0003, 0x0005, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_BUDDY, 0x0005, 0x0000, sn, strlen(sn)+1);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_BUDDY, 0x0005, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -243,7 +243,7 @@ buddylist_modfirst(OscarData *od, aim_mo
 int
 buddylist_modfirst(OscarData *od, aim_module_t *mod)
 {
-	mod->family = 0x0003;
+	mod->family = SNAC_FAMILY_BUDDY;
 	mod->version = 0x0001;
 	mod->toolid = 0x0110;
 	mod->toolversion = 0x0629;
============================================================
--- libpurple/protocols/oscar/family_chat.c	3942a5426342e2708443347d6d8f9e4173c9cd4d
+++ libpurple/protocols/oscar/family_chat.c	867a0df9b217ce2a7766466cccc3a6ac78dc2038
@@ -364,7 +364,7 @@ aim_chat_send_im(OscarData *od, FlapConn
 
 	byte_stream_new(&bs, 1142);
 
-	snacid = aim_cachesnac(od, 0x000e, 0x0005, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_CHAT, 0x0005, 0x0000, NULL, 0);
 
 	/*
 	 * Cookie
@@ -432,7 +432,7 @@ aim_chat_send_im(OscarData *od, FlapConn
 	aim_tlvlist_free(inner_tlvlist);
 	aim_tlvlist_free(tlvlist);
 
-	flap_connection_send_snac(od, conn, 0x000e, 0x0005, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_CHAT, 0x0005, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -594,7 +594,7 @@ chat_modfirst(OscarData *od, aim_module_
 int
 chat_modfirst(OscarData *od, aim_module_t *mod)
 {
-	mod->family = 0x000e;
+	mod->family = SNAC_FAMILY_CHAT;
 	mod->version = 0x0001;
 	mod->toolid = 0x0010;
 	mod->toolversion = 0x0629;
============================================================
--- libpurple/protocols/oscar/family_chatnav.c	e8a1c4e5709be724e14508b66a238bf5b927881a
+++ libpurple/protocols/oscar/family_chatnav.c	64051463283c3fa0d3fdbecdd667c0f0cb8bab45
@@ -42,7 +42,7 @@ error(OscarData *od, FlapConnection *con
 		return 0;
 	}
 
-	if (snac2->family != 0x000d) {
+	if (snac2->family != SNAC_FAMILY_CHATNAV) {
 		purple_debug_warning("oscar", "chatnav error: received response that maps to corrupt request (fam=%04x)\n", snac2->family);
 		return 0;
 	}
@@ -80,7 +80,7 @@ void aim_chatnav_reqrights(OscarData *od
  */
 void aim_chatnav_reqrights(OscarData *od, FlapConnection *conn)
 {
-	aim_genericreq_n_snacid(od, conn, 0x000d, 0x0002);
+	aim_genericreq_n_snacid(od, conn, SNAC_FAMILY_CHATNAV, 0x0002);
 }
 
 /*
@@ -97,7 +97,7 @@ int aim_chatnav_createroom(OscarData *od
 
 	byte_stream_new(&bs, 1142);
 
-	snacid = aim_cachesnac(od, 0x000d, 0x0008, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_CHATNAV, 0x0008, 0x0000, NULL, 0);
 
 	/* exchange */
 	byte_stream_put16(&bs, exchange);
@@ -137,7 +137,7 @@ int aim_chatnav_createroom(OscarData *od
 
 	aim_tlvlist_free(tlvlist);
 
-	flap_connection_send_snac(od, conn, 0x000d, 0x0008, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_CHATNAV, 0x0008, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -460,7 +460,7 @@ parseinfo(OscarData *od, FlapConnection 
 		return 0;
 	}
 
-	if (snac2->family != 0x000d) {
+	if (snac2->family != SNAC_FAMILY_CHATNAV) {
 		purple_debug_misc("oscar", "faim: chatnav_parse_info: received response that maps to corrupt request! (fam=%04x)\n", snac2->family);
 		return 0;
 	}
@@ -506,7 +506,7 @@ chatnav_modfirst(OscarData *od, aim_modu
 int
 chatnav_modfirst(OscarData *od, aim_module_t *mod)
 {
-	mod->family = 0x000d;
+	mod->family = SNAC_FAMILY_CHATNAV;
 	mod->version = 0x0001;
 	mod->toolid = 0x0010;
 	mod->toolversion = 0x0629;
============================================================
--- libpurple/protocols/oscar/family_icbm.c	d5f74e00f7181340ec90ee2313f6b8171f6b9bb5
+++ libpurple/protocols/oscar/family_icbm.c	ffadc235ea5229783fcc3cf7f92b5abd8e26dd6d
@@ -164,7 +164,7 @@ int aim_im_setparams(OscarData *od, stru
 	ByteStream bs;
 	aim_snacid_t snacid;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0004)))
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM)))
 		return -EINVAL;
 
 	if (!params)
@@ -182,8 +182,8 @@ int aim_im_setparams(OscarData *od, stru
 	byte_stream_put16(&bs, params->maxrecverwarn);
 	byte_stream_put32(&bs, params->minmsginterval);
 
-	snacid = aim_cachesnac(od, 0x0004, 0x0002, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0004, 0x0002, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICBM, 0x0002, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICBM, 0x0002, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -198,10 +198,10 @@ int aim_im_reqparams(OscarData *od)
 {
 	FlapConnection *conn;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0004)))
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM)))
 		return -EINVAL;
 
-	aim_genericreq_n_snacid(od, conn, 0x0004, 0x0004);
+	aim_genericreq_n_snacid(od, conn, SNAC_FAMILY_ICBM, 0x0004);
 
 	return 0;
 }
@@ -237,7 +237,7 @@ static int aim_im_paraminfo(OscarData *o
  * Possible flags:
  *   AIM_IMFLAGS_AWAY  -- Marks the message as an autoresponse
  *   AIM_IMFLAGS_ACK   -- Requests that the server send an ack
- *                        when the message is received (of type 0x0004/0x000c)
+ *                        when the message is received (of type SNAC_FAMILY_ICBM/0x000c)
  *   AIM_IMFLAGS_OFFLINE--If destination is offline, store it until they are
  *                        online (probably ICQ only).
  *
@@ -280,7 +280,7 @@ int aim_im_sendch1_ext(OscarData *od, st
 	int msgtlvlen;
 	static const guint8 deffeatures[] = { 0x01, 0x01, 0x01, 0x02 };
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0004)))
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM)))
 		return -EINVAL;
 
 	if (!args)
@@ -410,9 +410,9 @@ int aim_im_sendch1_ext(OscarData *od, st
 	}
 
 	/* XXX - should be optional */
-	snacid = aim_cachesnac(od, 0x0004, 0x0006, 0x0000, args->destsn, strlen(args->destsn)+1);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICBM, 0x0006, 0x0000, args->destsn, strlen(args->destsn)+1);
 
-	flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &data);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICBM, 0x0006, 0x0000, snacid, &data);
 	byte_stream_destroy(&data);
 
 	/* clean out SNACs over 60sec old */
@@ -462,7 +462,7 @@ int aim_im_sendch2_chatinvite(OscarData 
 	GSList *outer_tlvlist = NULL, *inner_tlvlist = NULL;
 	ByteStream hdrbs;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0004)))
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM)))
 		return -EINVAL;
 
 	if (!sn || !msg || !roomname)
@@ -472,7 +472,7 @@ int aim_im_sendch2_chatinvite(OscarData 
 
 	byte_stream_new(&bs, 1142+strlen(sn)+strlen(roomname)+strlen(msg));
 
-	snacid = aim_cachesnac(od, 0x0004, 0x0006, 0x0000, sn, strlen(sn)+1);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICBM, 0x0006, 0x0000, sn, strlen(sn)+1);
 
 	/* XXX should be uncached by an unwritten 'invite accept' handler */
 	priv = g_malloc(sizeof(struct aim_invite_priv));
@@ -519,7 +519,7 @@ int aim_im_sendch2_chatinvite(OscarData 
 	aim_tlvlist_free(inner_tlvlist);
 	aim_tlvlist_free(outer_tlvlist);
 
-	flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICBM, 0x0006, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -539,7 +539,7 @@ int aim_im_sendch2_icon(OscarData *od, c
 	aim_snacid_t snacid;
 	guchar cookie[8];
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0004)))
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM)))
 		return -EINVAL;
 
 	if (!sn || !icon || (iconlen <= 0) || (iconlen >= MAXICONLEN))
@@ -549,7 +549,7 @@ int aim_im_sendch2_icon(OscarData *od, c
 
 	byte_stream_new(&bs, 8+2+1+strlen(sn)+2+2+2+8+16+2+2+2+2+2+2+2+4+4+4+iconlen+strlen(AIM_ICONIDENT)+2+2);
 
-	snacid = aim_cachesnac(od, 0x0004, 0x0006, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICBM, 0x0006, 0x0000, NULL, 0);
 
 	/* ICBM header */
 	aim_im_puticbm(&bs, cookie, 0x0002, sn);
@@ -589,7 +589,7 @@ int aim_im_sendch2_icon(OscarData *od, c
 	byte_stream_put16(&bs, 0x0003);
 	byte_stream_put16(&bs, 0x0000);
 
-	flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICBM, 0x0006, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -620,7 +620,7 @@ int aim_im_sendch2_rtfmsg(OscarData *od,
 	const char rtfcap[] = {"{97B12751-243C-4334-AD22-D6ABF73F1492}"}; /* OSCAR_CAPABILITY_ICQRTF capability in string form */
 	int servdatalen;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0004)))
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM)))
 		return -EINVAL;
 
 	if (!args || !args->destsn || !args->rtfmsg)
@@ -632,7 +632,7 @@ int aim_im_sendch2_rtfmsg(OscarData *od,
 
 	byte_stream_new(&bs, 128+servdatalen);
 
-	snacid = aim_cachesnac(od, 0x0004, 0x0006, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICBM, 0x0006, 0x0000, NULL, 0);
 
 	/* ICBM header */
 	aim_im_puticbm(&bs, cookie, 0x0002, args->destsn);
@@ -682,7 +682,7 @@ int aim_im_sendch2_rtfmsg(OscarData *od,
 	byte_stream_putle32(&bs, strlen(rtfcap)+1);
 	byte_stream_putraw(&bs, (const guint8 *)rtfcap, strlen(rtfcap)+1);
 
-	flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICBM, 0x0006, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -704,13 +704,13 @@ aim_im_sendch2_cancel(PeerConnection *pe
 	ByteStream hdrbs;
 
 	od = peer_conn->od;
-	conn = flap_connection_findbygroup(od, 0x0004);
+	conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM);
 	if (conn == NULL)
 		return;
 
 	byte_stream_new(&bs, 118+strlen(peer_conn->sn));
 
-	snacid = aim_cachesnac(od, 0x0004, 0x0006, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICBM, 0x0006, 0x0000, NULL, 0);
 
 	/* ICBM header */
 	aim_im_puticbm(&bs, peer_conn->cookie, 0x0002, peer_conn->sn);
@@ -735,7 +735,7 @@ aim_im_sendch2_cancel(PeerConnection *pe
 	aim_tlvlist_free(inner_tlvlist);
 	aim_tlvlist_free(outer_tlvlist);
 
-	flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICBM, 0x0006, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 }
@@ -753,13 +753,13 @@ aim_im_sendch2_connected(PeerConnection 
 	aim_snacid_t snacid;
 
 	od = peer_conn->od;
-	conn = flap_connection_findbygroup(od, 0x0004);
+	conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM);
 	if (conn == NULL)
 		return;
 
 	byte_stream_new(&bs, 11+strlen(peer_conn->sn) + 4+2+8+16);
 
-	snacid = aim_cachesnac(od, 0x0004, 0x0006, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICBM, 0x0006, 0x0000, NULL, 0);
 
 	/* ICBM header */
 	aim_im_puticbm(&bs, peer_conn->cookie, 0x0002, peer_conn->sn);
@@ -770,7 +770,7 @@ aim_im_sendch2_connected(PeerConnection 
 	byte_stream_putraw(&bs, peer_conn->cookie, 8);
 	byte_stream_putcaps(&bs, peer_conn->type);
 
-	flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICBM, 0x0006, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 }
@@ -791,13 +791,13 @@ aim_im_sendch2_odc_requestdirect(OscarDa
 	GSList *outer_tlvlist = NULL, *inner_tlvlist = NULL;
 	ByteStream hdrbs;
 
-	conn = flap_connection_findbygroup(od, 0x0004);
+	conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM);
 	if (conn == NULL)
 		return;
 
 	byte_stream_new(&bs, 246+strlen(sn));
 
-	snacid = aim_cachesnac(od, 0x0004, 0x0006, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICBM, 0x0006, 0x0000, NULL, 0);
 
 	/* ICBM header */
 	aim_im_puticbm(&bs, cookie, 0x0002, sn);
@@ -825,7 +825,7 @@ aim_im_sendch2_odc_requestdirect(OscarDa
 	aim_tlvlist_free(inner_tlvlist);
 	aim_tlvlist_free(outer_tlvlist);
 
-	flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICBM, 0x0006, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 }
@@ -844,13 +844,13 @@ aim_im_sendch2_odc_requestproxy(OscarDat
 	ByteStream hdrbs;
 	guint8 ip_comp[4];
 
-	conn = flap_connection_findbygroup(od, 0x0004);
+	conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM);
 	if (conn == NULL)
 		return;
 
 	byte_stream_new(&bs, 246+strlen(sn));
 
-	snacid = aim_cachesnac(od, 0x0004, 0x0006, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICBM, 0x0006, 0x0000, NULL, 0);
 
 	/* ICBM header */
 	aim_im_puticbm(&bs, cookie, 0x0002, sn);
@@ -888,7 +888,7 @@ aim_im_sendch2_odc_requestproxy(OscarDat
 	aim_tlvlist_free(inner_tlvlist);
 	aim_tlvlist_free(outer_tlvlist);
 
-	flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICBM, 0x0006, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 }
@@ -906,13 +906,13 @@ aim_im_sendch2_sendfile_requestdirect(Os
 	GSList *outer_tlvlist = NULL, *inner_tlvlist = NULL;
 	ByteStream hdrbs;
 
-	conn = flap_connection_findbygroup(od, 0x0004);
+	conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM);
 	if (conn == NULL)
 		return;
 
 	byte_stream_new(&bs, 1014);
 
-	snacid = aim_cachesnac(od, 0x0004, 0x0006, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICBM, 0x0006, 0x0000, NULL, 0);
 
 	/* ICBM header */
 	aim_im_puticbm(&bs, cookie, 0x0002, sn);
@@ -971,7 +971,7 @@ aim_im_sendch2_sendfile_requestdirect(Os
 	aim_tlvlist_free(inner_tlvlist);
 	aim_tlvlist_free(outer_tlvlist);
 
-	flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICBM, 0x0006, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 }
@@ -990,13 +990,13 @@ aim_im_sendch2_sendfile_requestproxy(Osc
 	ByteStream hdrbs;
 	guint8 ip_comp[4];
 
-	conn = flap_connection_findbygroup(od, 0x0004);
+	conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM);
 	if (conn == NULL)
 		return;
 
 	byte_stream_new(&bs, 1014);
 
-	snacid = aim_cachesnac(od, 0x0004, 0x0006, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICBM, 0x0006, 0x0000, NULL, 0);
 
 	/* ICBM header */
 	aim_im_puticbm(&bs, cookie, 0x0002, sn);
@@ -1064,7 +1064,7 @@ aim_im_sendch2_sendfile_requestproxy(Osc
 	aim_tlvlist_free(inner_tlvlist);
 	aim_tlvlist_free(outer_tlvlist);
 
-	flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICBM, 0x0006, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 }
@@ -1085,14 +1085,14 @@ int aim_im_sendch2_geticqaway(OscarData 
 	aim_snacid_t snacid;
 	guchar cookie[8];
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0004)) || !sn)
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM)) || !sn)
 		return -EINVAL;
 
 	aim_icbm_makecookie(cookie);
 
 	byte_stream_new(&bs, 8+2+1+strlen(sn) + 4+0x5e + 4);
 
-	snacid = aim_cachesnac(od, 0x0004, 0x0006, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICBM, 0x0006, 0x0000, NULL, 0);
 
 	/* ICBM header */
 	aim_im_puticbm(&bs, cookie, 0x0002, sn);
@@ -1160,7 +1160,7 @@ int aim_im_sendch2_geticqaway(OscarData 
 	byte_stream_put16(&bs, 0x0003);
 	byte_stream_put16(&bs, 0x0000);
 
-	flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICBM, 0x0006, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -1196,7 +1196,7 @@ int aim_im_sendch4(OscarData *od, const 
 
 	byte_stream_new(&bs, 8+3+strlen(sn)+12+strlen(message)+1+4);
 
-	snacid = aim_cachesnac(od, 0x0004, 0x0006, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICBM, 0x0006, 0x0000, NULL, 0);
 
 	aim_icbm_makecookie(cookie);
 
@@ -1229,7 +1229,7 @@ int aim_im_sendch4(OscarData *od, const 
 	byte_stream_put16(&bs, 0x0006);
 	byte_stream_put16(&bs, 0x0000);
 
-	flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICBM, 0x0006, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -2268,13 +2268,13 @@ int aim_im_warn(OscarData *od, FlapConne
 
 	byte_stream_new(&bs, strlen(sn)+3);
 
-	snacid = aim_cachesnac(od, 0x0004, 0x0008, 0x0000, sn, strlen(sn)+1);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICBM, 0x0008, 0x0000, sn, strlen(sn)+1);
 
 	byte_stream_put16(&bs, (flags & AIM_WARN_ANON) ? 0x0001 : 0x0000);
 	byte_stream_put8(&bs, strlen(sn));
 	byte_stream_putstr(&bs, sn);
 
-	flap_connection_send_snac(od, conn, 0x0004, 0x0008, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICBM, 0x0008, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -2321,12 +2321,12 @@ int aim_im_denytransfer(OscarData *od, c
 	aim_snacid_t snacid;
 	GSList *tlvlist = NULL;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0004)))
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM)))
 		return -EINVAL;
 
 	byte_stream_new(&bs, 8+2+1+strlen(sn)+6);
 
-	snacid = aim_cachesnac(od, 0x0004, 0x000b, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICBM, 0x000b, 0x0000, NULL, 0);
 
 	byte_stream_putraw(&bs, cookie, 8);
 
@@ -2338,7 +2338,7 @@ int aim_im_denytransfer(OscarData *od, c
 	aim_tlvlist_write(&bs, &tlvlist);
 	aim_tlvlist_free(tlvlist);
 
-	flap_connection_send_snac(od, conn, 0x0004, 0x000b, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICBM, 0x000b, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -2660,7 +2660,7 @@ int aim_im_reqofflinemsgs(OscarData *od)
 	if (!od || !(conn = flap_connection_findbygroup(od, 0x0002)))
 		return -EINVAL;
 
-	aim_genericreq_n(od, conn, 0x0004, 0x0010);
+	aim_genericreq_n(od, conn, SNAC_FAMILY_ICBM, 0x0010);
 
 	return 0;
 }
@@ -2686,7 +2686,7 @@ int aim_im_sendmtn(OscarData *od, guint1
 
 	byte_stream_new(&bs, 11+strlen(sn)+2);
 
-	snacid = aim_cachesnac(od, 0x0004, 0x0014, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICBM, 0x0014, 0x0000, NULL, 0);
 
 	/*
 	 * 8 days of light
@@ -2713,7 +2713,7 @@ int aim_im_sendmtn(OscarData *od, guint1
 	 */
 	byte_stream_put16(&bs, type2);
 
-	flap_connection_send_snac(od, conn, 0x0004, 0x0014, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICBM, 0x0014, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -2773,7 +2773,7 @@ msg_modfirst(OscarData *od, aim_module_t
 int
 msg_modfirst(OscarData *od, aim_module_t *mod)
 {
-	mod->family = 0x0004;
+	mod->family = SNAC_FAMILY_ICBM;
 	mod->version = 0x0001;
 	mod->toolid = 0x0110;
 	mod->toolversion = 0x0629;
============================================================
--- libpurple/protocols/oscar/family_icq.c	71dcf9f9388f3658e6e85bd50e5ed288509b63d1
+++ libpurple/protocols/oscar/family_icq.c	d25ef53ec879d278dd495ca0f367a552f0f8cd44
@@ -33,14 +33,14 @@ int aim_icq_reqofflinemsgs(OscarData *od
 	aim_snacid_t snacid;
 	int bslen;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0015)))
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICQ)))
 		return -EINVAL;
 
 	bslen = 2 + 4 + 2 + 2;
 
 	byte_stream_new(&bs, 4 + bslen);
 
-	snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICQ, 0x0002, 0x0000, NULL, 0);
 
 	/* For simplicity, don't bother using a tlvlist */
 	byte_stream_put16(&bs, 0x0001);
@@ -51,7 +51,7 @@ int aim_icq_reqofflinemsgs(OscarData *od
 	byte_stream_putle16(&bs, 0x003c); /* I command thee. */
 	byte_stream_putle16(&bs, snacid); /* eh. */
 
-	flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -65,14 +65,14 @@ int aim_icq_ackofflinemsgs(OscarData *od
 	aim_snacid_t snacid;
 	int bslen;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0015)))
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICQ)))
 		return -EINVAL;
 
 	bslen = 2 + 4 + 2 + 2;
 
 	byte_stream_new(&bs, 4 + bslen);
 
-	snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICQ, 0x0002, 0x0000, NULL, 0);
 
 	/* For simplicity, don't bother using a tlvlist */
 	byte_stream_put16(&bs, 0x0001);
@@ -83,7 +83,7 @@ int aim_icq_ackofflinemsgs(OscarData *od
 	byte_stream_putle16(&bs, 0x003e); /* I command thee. */
 	byte_stream_putle16(&bs, snacid); /* eh. */
 
-	flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -99,14 +99,14 @@ aim_icq_setsecurity(OscarData *od, gbool
 	aim_snacid_t snacid;
 	int bslen;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0015)))
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICQ)))
 		return -EINVAL;
 
 	bslen = 2+4+2+2+2+2+2+1+1+1+1+1+1;
 
 	byte_stream_new(&bs, 4 + bslen);
 
-	snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICQ, 0x0002, 0x0000, NULL, 0);
 
 	/* For simplicity, don't bother using a tlvlist */
 	byte_stream_put16(&bs, 0x0001);
@@ -126,7 +126,7 @@ aim_icq_setsecurity(OscarData *od, gbool
 	byte_stream_putle8(&bs, 0x00);
 	byte_stream_putle8(&bs, !auth_required);
 
-	flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -151,7 +151,7 @@ int aim_icq_changepasswd(OscarData *od, 
 	if (!passwd)
 		return -EINVAL;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0015)))
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICQ)))
 		return -EINVAL;
 
 	passwdlen = strlen(passwd);
@@ -161,7 +161,7 @@ int aim_icq_changepasswd(OscarData *od, 
 
 	byte_stream_new(&bs, 4 + bslen);
 
-	snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICQ, 0x0002, 0x0000, NULL, 0);
 
 	/* For simplicity, don't bother using a tlvlist */
 	byte_stream_put16(&bs, 0x0001);
@@ -176,7 +176,7 @@ int aim_icq_changepasswd(OscarData *od, 
 	byte_stream_putstr(&bs, passwd);
 	byte_stream_putle8(&bs, '\0');
 
-	flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -194,14 +194,14 @@ int aim_icq_getallinfo(OscarData *od, co
 	if (!uin || uin[0] < '0' || uin[0] > '9')
 		return -EINVAL;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0015)))
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICQ)))
 		return -EINVAL;
 
 	bslen = 2 + 4 + 2 + 2 + 2 + 4;
 
 	byte_stream_new(&bs, 4 + bslen);
 
-	snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICQ, 0x0002, 0x0000, NULL, 0);
 
 	/* For simplicity, don't bother using a tlvlist */
 	byte_stream_put16(&bs, 0x0001);
@@ -214,7 +214,7 @@ int aim_icq_getallinfo(OscarData *od, co
 	byte_stream_putle16(&bs, 0x04b2); /* shrug. */
 	byte_stream_putle32(&bs, atoi(uin));
 
-	flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -239,14 +239,14 @@ int aim_icq_getalias(OscarData *od, cons
 	if (!uin || uin[0] < '0' || uin[0] > '9')
 		return -EINVAL;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0015)))
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICQ)))
 		return -EINVAL;
 
 	bslen = 2 + 4 + 2 + 2 + 2 + 4;
 
 	byte_stream_new(&bs, 4 + bslen);
 
-	snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICQ, 0x0002, 0x0000, NULL, 0);
 
 	/* For simplicity, don't bother using a tlvlist */
 	byte_stream_put16(&bs, 0x0001);
@@ -259,7 +259,7 @@ int aim_icq_getalias(OscarData *od, cons
 	byte_stream_putle16(&bs, 0x04ba); /* shrug. */
 	byte_stream_putle32(&bs, atoi(uin));
 
-	flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -283,14 +283,14 @@ int aim_icq_getsimpleinfo(OscarData *od,
 	if (!uin || uin[0] < '0' || uin[0] > '9')
 		return -EINVAL;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0015)))
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICQ)))
 		return -EINVAL;
 
 	bslen = 2 + 4 + 2 + 2 + 2 + 4;
 
 	byte_stream_new(&bs, 4 + bslen);
 
-	snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICQ, 0x0002, 0x0000, NULL, 0);
 
 	/* For simplicity, don't bother using a tlvlist */
 	byte_stream_put16(&bs, 0x0001);
@@ -303,7 +303,7 @@ int aim_icq_getsimpleinfo(OscarData *od,
 	byte_stream_putle16(&bs, 0x051f); /* shrug. */
 	byte_stream_putle32(&bs, atoi(uin));
 
-	flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -321,14 +321,14 @@ int aim_icq_sendxmlreq(OscarData *od, co
 	if (!xml || !strlen(xml))
 		return -EINVAL;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0015)))
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICQ)))
 		return -EINVAL;
 
 	bslen = 2 + 10 + 2 + strlen(xml) + 1;
 
 	byte_stream_new(&bs, 4 + bslen);
 
-	snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICQ, 0x0002, 0x0000, NULL, 0);
 
 	/* For simplicity, don't bother using a tlvlist */
 	byte_stream_put16(&bs, 0x0001);
@@ -342,7 +342,7 @@ int aim_icq_sendxmlreq(OscarData *od, co
 	byte_stream_putle16(&bs, strlen(xml) + 1);
 	byte_stream_putraw(&bs, (guint8 *)xml, strlen(xml) + 1);
 
-	flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -380,7 +380,7 @@ int aim_icq_sendsms(OscarData *od, const
 	struct tm *tm;
 	gchar *stripped;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0015)))
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICQ)))
 		return -EINVAL;
 
 	if (!name || !msg || !alias)
@@ -411,7 +411,7 @@ int aim_icq_sendsms(OscarData *od, const
 
 	byte_stream_new(&bs, 4 + bslen);
 
-	snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICQ, 0x0002, 0x0000, NULL, 0);
 
 	/* For simplicity, don't bother using a tlvlist */
 	byte_stream_put16(&bs, 0x0001);
@@ -436,7 +436,7 @@ int aim_icq_sendsms(OscarData *od, const
 	byte_stream_putstr(&bs, xml);
 	byte_stream_put8(&bs, 0x00);
 
-	flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -460,7 +460,7 @@ int aim_icq_getstatusnote(OscarData *od,
 
 	purple_debug_misc("oscar", "aim_icq_getstatusnote: requesting status note for %s.\n", uin);
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x0015)))
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICQ)))
 	{
 		purple_debug_misc("oscar", "aim_icq_getstatusnote: no connection.\n");
 		return -EINVAL;
@@ -469,7 +469,7 @@ int aim_icq_getstatusnote(OscarData *od,
 	bslen = 2 + 4 + 2 + 2 + 2 + 2 + 58 + strlen(uin);
 	byte_stream_new(&bs, 4 + bslen);
 
-	snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ICQ, 0x0002, 0x0000, NULL, 0);
 
 	byte_stream_put16(&bs, 0x0001);
 	byte_stream_put16(&bs, bslen);
@@ -497,7 +497,7 @@ int aim_icq_getstatusnote(OscarData *od,
 	byte_stream_put16(&bs, strlen(uin));
 	byte_stream_putstr(&bs, uin);
 
-	flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -541,7 +541,7 @@ static void aim_icq_freeinfo(struct aim_
 }
 
 /**
- * Subtype 0x0003 - Response to 0x0015/0x002, contains an ICQesque packet.
+ * Subtype 0x0003 - Response to SNAC_FAMILY_ICQ/0x002, contains an ICQesque packet.
  */
 static int
 icqresponse(OscarData *od, FlapConnection *conn, aim_module_t *mod, FlapFrame *frame, aim_modsnac_t *snac, ByteStream *bs)
@@ -940,7 +940,7 @@ icq_modfirst(OscarData *od, aim_module_t
 int
 icq_modfirst(OscarData *od, aim_module_t *mod)
 {
-	mod->family = 0x0015;
+	mod->family = SNAC_FAMILY_ICQ;
 	mod->version = 0x0001;
 	mod->toolid = 0x0110;
 	mod->toolversion = 0x047c;
============================================================
--- libpurple/protocols/oscar/family_invite.c	f349999597282136e7dba8a39d6b90aef5d8c558
+++ libpurple/protocols/oscar/family_invite.c	3cf741d4259a0656347395efbe3676c0d21920bd
@@ -41,7 +41,7 @@ int invite_modfirst(OscarData *od, aim_m
 int invite_modfirst(OscarData *od, aim_module_t *mod)
 {
 
-	mod->family = 0x0006;
+	mod->family = SNAC_FAMILY_INVITE;
 	mod->version = 0x0001;
 	mod->toolid = 0x0110;
 	mod->toolversion = 0x0629;
============================================================
--- libpurple/protocols/oscar/family_locate.c	0c30e6b2355895465c5bfb851c703a59e6211ddd
+++ libpurple/protocols/oscar/family_locate.c	88a8d35baa43384fde9f7079838291ef397c7274
@@ -943,7 +943,7 @@ error(OscarData *od, FlapConnection *con
 		return 0;
 	}
 
-	if ((snac2->family != 0x0002) && (snac2->type != 0x0015)) {
+	if ((snac2->family != SNAC_FAMILY_LOCATE) && (snac2->type != 0x0015)) {
 		purple_debug_misc("oscar", "faim: locate.c, error(): received response from invalid request! %d\n", snac2->family);
 		return 0;
 	}
@@ -1094,12 +1094,12 @@ aim_locate_setprofile(OscarData *od,
 
 	byte_stream_new(&bs, aim_tlvlist_size(tlvlist));
 
-	snacid = aim_cachesnac(od, 0x0002, 0x0004, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x0004, 0x0000, NULL, 0);
 
 	aim_tlvlist_write(&bs, &tlvlist);
 	aim_tlvlist_free(tlvlist);
 
-	flap_connection_send_snac(od, conn, 0x0002, 0x0004, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x0004, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -1124,12 +1124,12 @@ aim_locate_setcaps(OscarData *od, guint3
 
 	byte_stream_new(&bs, aim_tlvlist_size(tlvlist));
 
-	snacid = aim_cachesnac(od, 0x0002, 0x0004, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x0004, 0x0000, NULL, 0);
 
 	aim_tlvlist_write(&bs, &tlvlist);
 	aim_tlvlist_free(tlvlist);
 
-	flap_connection_send_snac(od, conn, 0x0002, 0x0004, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x0004, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -1157,13 +1157,13 @@ aim_locate_getinfo(OscarData *od, const 
 
 	byte_stream_new(&bs, 2+1+strlen(sn));
 
-	snacid = aim_cachesnac(od, 0x0002, 0x0005, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x0005, 0x0000, NULL, 0);
 
 	byte_stream_put16(&bs, infotype);
 	byte_stream_put8(&bs, strlen(sn));
 	byte_stream_putstr(&bs, sn);
 
-	flap_connection_send_snac(od, conn, 0x0002, 0x0005, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x0005, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -1274,12 +1274,12 @@ int aim_locate_setdirinfo(OscarData *od,
 
 	byte_stream_new(&bs, aim_tlvlist_size(tlvlist));
 
-	snacid = aim_cachesnac(od, 0x0002, 0x0009, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x0009, 0x0000, NULL, 0);
 
 	aim_tlvlist_write(&bs, &tlvlist);
 	aim_tlvlist_free(tlvlist);
 
-	flap_connection_send_snac(od, conn, 0x0002, 0x0009, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x0009, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -1302,12 +1302,12 @@ int aim_locate_000b(OscarData *od, const
 
 	byte_stream_new(&bs, 1+strlen(sn));
 
-	snacid = aim_cachesnac(od, 0x0002, 0x000b, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x000b, 0x0000, NULL, 0);
 
 	byte_stream_put8(&bs, strlen(sn));
 	byte_stream_putstr(&bs, sn);
 
-	flap_connection_send_snac(od, conn, 0x0002, 0x000b, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x000b, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -1347,12 +1347,12 @@ aim_locate_setinterests(OscarData *od, c
 
 	byte_stream_new(&bs, aim_tlvlist_size(tlvlist));
 
-	snacid = aim_cachesnac(od, 0x0002, 0x000f, 0x0000, NULL, 0);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x000f, 0x0000, NULL, 0);
 
 	aim_tlvlist_write(&bs, &tlvlist);
 	aim_tlvlist_free(tlvlist);
 
-	flap_connection_send_snac(od, conn, 0x0002, 0x000f, 0x0000, snacid, &bs);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x000f, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 	return 0;
@@ -1385,8 +1385,8 @@ aim_locate_getinfoshort(OscarData *od, c
 	byte_stream_put8(&bs, strlen(sn));
 	byte_stream_putstr(&bs, sn);
 
-	snacid = aim_cachesnac(od, 0x0002, 0x0015, 0x0000, sn, strlen(sn)+1);
-	flap_connection_send_snac(od, conn, 0x0002, 0x0015, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x0015, 0x0000, sn, strlen(sn)+1);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x0015, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
============================================================
--- libpurple/protocols/oscar/family_odir.c	3dd56e62e51fa758640fad54e1a41993dd973a65
+++ libpurple/protocols/oscar/family_odir.c	a98b2b5f0e29dc0492e8f149495210862690641c
@@ -45,7 +45,7 @@ int aim_odir_email(OscarData *od, const 
 	aim_snacid_t snacid;
 	GSList *tlvlist = NULL;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x000f)) || !region || !email)
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ODIR)) || !region || !email)
 		return -EINVAL;
 
 	/* Create a TLV chain, write it to the outgoing frame, then free the chain */
@@ -58,8 +58,8 @@ int aim_odir_email(OscarData *od, const 
 	aim_tlvlist_write(&bs, &tlvlist);
 	aim_tlvlist_free(tlvlist);
 
-	snacid = aim_cachesnac(od, 0x000f, 0x0002, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x000f, 0x0002, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ODIR, 0x0002, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ODIR, 0x0002, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -94,7 +94,7 @@ int aim_odir_name(OscarData *od, const c
 	aim_snacid_t snacid;
 	GSList *tlvlist = NULL;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x000f)) || !region)
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ODIR)) || !region)
 		return -EINVAL;
 
 	/* Create a TLV chain, write it to the outgoing frame, then free the chain */
@@ -126,8 +126,8 @@ int aim_odir_name(OscarData *od, const c
 	aim_tlvlist_write(&bs, &tlvlist);
 	aim_tlvlist_free(tlvlist);
 
-	snacid = aim_cachesnac(od, 0x000f, 0x0002, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x000f, 0x0002, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ODIR, 0x0002, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ODIR, 0x0002, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -149,7 +149,7 @@ int aim_odir_interest(OscarData *od, con
 	aim_snacid_t snacid;
 	GSList *tlvlist = NULL;
 
-	if (!od || !(conn = flap_connection_findbygroup(od, 0x000f)) || !region)
+	if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_ODIR)) || !region)
 		return -EINVAL;
 
 	/* Create a TLV chain, write it to the outgoing frame, then free the chain */
@@ -163,8 +163,8 @@ int aim_odir_interest(OscarData *od, con
 	aim_tlvlist_write(&bs, &tlvlist);
 	aim_tlvlist_free(tlvlist);
 
-	snacid = aim_cachesnac(od, 0x000f, 0x0002, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x000f, 0x0002, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_ODIR, 0x0002, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_ODIR, 0x0002, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -252,7 +252,7 @@ odir_modfirst(OscarData *od, aim_module_
 int
 odir_modfirst(OscarData *od, aim_module_t *mod)
 {
-	mod->family = 0x000f;
+	mod->family = SNAC_FAMILY_ODIR;
 	mod->version = 0x0001;
 	mod->toolid = 0x0010;
 	mod->toolversion = 0x0629;
============================================================
--- libpurple/protocols/oscar/family_oservice.c	dd2ae5eb03d218c23ab00997ad1e8543619483b2
+++ libpurple/protocols/oscar/family_oservice.c	ed9e1a7164059c4d1e94be726452257e33b58571
@@ -54,8 +54,8 @@ aim_clientready(OscarData *od, FlapConne
 		}
 	}
 
-	snacid = aim_cachesnac(od, 0x0001, 0x0002, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0001, 0x0002, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_OSERVICE, 0x0002, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_OSERVICE, 0x0002, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 }
@@ -108,7 +108,7 @@ aim_srv_requestnew(OscarData *od, guint1
 	if(!conn)
 		return;
 
-	aim_genericreq_s(od, conn, 0x0001, 0x0004, &serviceid);
+	aim_genericreq_s(od, conn, SNAC_FAMILY_OSERVICE, 0x0004, &serviceid);
 }
 
 /*
@@ -146,8 +146,8 @@ aim_chat_join(OscarData *od, guint16 exc
 	aim_tlvlist_write(&bs, &tlvlist);
 	aim_tlvlist_free(tlvlist);
 
-	snacid = aim_cachesnac(od, 0x0001, 0x0004, 0x0000, &csi, sizeof(csi));
-	flap_connection_send_snac(od, conn, 0x0001, 0x0004, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_OSERVICE, 0x0004, 0x0000, &csi, sizeof(csi));
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_OSERVICE, 0x0004, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -210,7 +210,7 @@ aim_srv_reqrates(OscarData *od, FlapConn
 void
 aim_srv_reqrates(OscarData *od, FlapConnection *conn)
 {
-	aim_genericreq_n_snacid(od, conn, 0x0001, 0x0006);
+	aim_genericreq_n_snacid(od, conn, SNAC_FAMILY_OSERVICE, 0x0006);
 }
 
 /*
@@ -389,8 +389,8 @@ aim_srv_rates_addparam(OscarData *od, Fl
 		byte_stream_put16(&bs, rateclass->classid);
 	}
 
-	snacid = aim_cachesnac(od, 0x0001, 0x0008, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0001, 0x0008, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_OSERVICE, 0x0008, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_OSERVICE, 0x0008, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 }
@@ -412,8 +412,8 @@ aim_srv_rates_delparam(OscarData *od, Fl
 		byte_stream_put16(&bs, rateclass->classid);
 	}
 
-	snacid = aim_cachesnac(od, 0x0001, 0x0009, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0001, 0x0009, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_OSERVICE, 0x0009, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_OSERVICE, 0x0009, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 }
@@ -503,8 +503,8 @@ aim_srv_sendpauseack(OscarData *od, Flap
 	for (cur = conn->groups; cur != NULL; cur = cur->next)
 		byte_stream_put16(&bs, GPOINTER_TO_UINT(cur->data));
 
-	snacid = aim_cachesnac(od, 0x0001, 0x000c, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0001, 0x000c, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_OSERVICE, 0x000c, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_OSERVICE, 0x000c, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 }
@@ -526,7 +526,7 @@ aim_srv_reqpersonalinfo(OscarData *od, F
 void
 aim_srv_reqpersonalinfo(OscarData *od, FlapConnection *conn)
 {
-	aim_genericreq_n_snacid(od, conn, 0x0001, 0x000e);
+	aim_genericreq_n_snacid(od, conn, SNAC_FAMILY_OSERVICE, 0x000e);
 }
 
 /* Subtype 0x000f - Self User Info */
@@ -589,7 +589,7 @@ aim_srv_setidle(OscarData *od, guint32 i
 	if(!conn)
 		return;
 
-	aim_genericreq_l(od, conn, 0x0001, 0x0011, &idletime);
+	aim_genericreq_l(od, conn, SNAC_FAMILY_OSERVICE, 0x0011, &idletime);
 }
 
 /*
@@ -698,7 +698,7 @@ aim_srv_setprivacyflags(OscarData *od, F
 void
 aim_srv_setprivacyflags(OscarData *od, FlapConnection *conn, guint32 flags)
 {
-	aim_genericreq_l(od, conn, 0x0001, 0x0014, &flags);
+	aim_genericreq_l(od, conn, SNAC_FAMILY_OSERVICE, 0x0014, &flags);
 }
 
 /*
@@ -713,7 +713,7 @@ aim_srv_nop(OscarData *od, FlapConnectio
 void
 aim_srv_nop(OscarData *od, FlapConnection *conn)
 {
-	aim_genericreq_n(od, conn, 0x0001, 0x0016);
+	aim_genericreq_n(od, conn, SNAC_FAMILY_OSERVICE, 0x0016);
 }
 
 /*
@@ -753,8 +753,8 @@ aim_srv_setversions(OscarData *od, FlapC
 		}
 	}
 
-	snacid = aim_cachesnac(od, 0x0001, 0x0017, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0001, 0x0017, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_OSERVICE, 0x0017, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_OSERVICE, 0x0017, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 }
@@ -861,8 +861,8 @@ aim_srv_setextrainfo(OscarData *od,
 	aim_tlvlist_write(&bs, &tlvlist);
 	aim_tlvlist_free(tlvlist);
 
-	snacid = aim_cachesnac(od, 0x0001, 0x001e, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0001, 0x001e, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_OSERVICE, 0x001e, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_OSERVICE, 0x001e, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -1012,8 +1012,8 @@ aim_sendmemblock(OscarData *od, FlapConn
 
 	}
 
-	snacid = aim_cachesnac(od, 0x0001, 0x0020, 0x0000, NULL, 0);
-	flap_connection_send_snac(od, conn, 0x0001, 0x0020, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_OSERVICE, 0x0020, 0x0000, NULL, 0);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_OSERVICE, 0x0020, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -1100,7 +1100,7 @@ int service_modfirst(OscarData *od, aim_
 
 int service_modfirst(OscarData *od, aim_module_t *mod)
 {
-	mod->family = 0x0001;
+	mod->family = SNAC_FAMILY_OSERVICE;
 	mod->version = 0x0003;
 	mod->toolid = 0x0110;
 	mod->toolversion = 0x0629;
============================================================
--- libpurple/protocols/oscar/family_popup.c	fcff44d76039d0b127bd14451f8f7b9edd70d12d
+++ libpurple/protocols/oscar/family_popup.c	fde54ac0ca302d011b29c8f6550ae5d2e866ad8f
@@ -72,7 +72,7 @@ popups_modfirst(OscarData *od, aim_modul
 int
 popups_modfirst(OscarData *od, aim_module_t *mod)
 {
-	mod->family = 0x0008;
+	mod->family = SNAC_FAMILY_POPUP;
 	mod->version = 0x0001;
 	mod->toolid = 0x0104;
 	mod->toolversion = 0x0001;
============================================================
--- libpurple/protocols/oscar/family_stats.c	6a3728688960e13b968d5d73627565007bd7d471
+++ libpurple/protocols/oscar/family_stats.c	4b8659ce52a1c2445d9fee5009ee2bd067a740b7
@@ -52,7 +52,7 @@ stats_modfirst(OscarData *od, aim_module
 int
 stats_modfirst(OscarData *od, aim_module_t *mod)
 {
-	mod->family = 0x000b;
+	mod->family = SNAC_FAMILY_STATS;
 	mod->version = 0x0001;
 	mod->toolid = 0x0104;
 	mod->toolversion = 0x0001;
============================================================
--- libpurple/protocols/oscar/family_translate.c	a210b87c99e3bcb0e81f55bc35e1959d1a8dfe5c
+++ libpurple/protocols/oscar/family_translate.c	ec30287380d9329cbb0b691f71fd80a387b2ed85
@@ -34,7 +34,7 @@ int translate_modfirst(OscarData *od, ai
 int translate_modfirst(OscarData *od, aim_module_t *mod)
 {
 
-	mod->family = 0x000c;
+	mod->family = SNAC_FAMILY_TRANSLATE;
 	mod->version = 0x0001;
 	mod->toolid = 0x0104;
 	mod->toolversion = 0x0001;
============================================================
--- libpurple/protocols/oscar/family_userlookup.c	63f4e4bcac77e352ae94c5bea4f162583f56d3ae
+++ libpurple/protocols/oscar/family_userlookup.c	56f4c1c8eada80e41f1277dfcf3e695da046bd0b
@@ -74,8 +74,8 @@ int aim_search_address(OscarData *od, co
 
 	byte_stream_putstr(&bs, address);
 
-	snacid = aim_cachesnac(od, 0x000a, 0x0002, 0x0000, address, strlen(address)+1);
-	flap_connection_send_snac(od, conn, 0x000a, 0x0002, 0x0000, snacid, &bs);
+	snacid = aim_cachesnac(od, SNAC_FAMILY_USERLOOKUP, 0x0002, 0x0000, address, strlen(address)+1);
+	flap_connection_send_snac(od, conn, SNAC_FAMILY_USERLOOKUP, 0x0002, 0x0000, snacid, &bs);
 
 	byte_stream_destroy(&bs);
 
@@ -145,7 +145,7 @@ search_modfirst(OscarData *od, aim_modul
 int
 search_modfirst(OscarData *od, aim_module_t *mod)
 {
-	mod->family = 0x000a;
+	mod->family = SNAC_FAMILY_USERLOOKUP;
 	mod->version = 0x0001;
 	mod->toolid = 0x0110;
 	mod->toolversion = 0x0629;


More information about the Commits mailing list