changeset 7945:0a0be07f066a

[gaim-migrate @ 8619] Hopefully recognize the iChat AV capability. Also hopefully fix a problem faceprint was seeing where hiptop users wouldn't always have the hiptop icon. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 28 Dec 2003 22:12:50 +0000
parents a99f0aebc7ce
children 4eb96e3cf633
files src/protocols/oscar/aim.h src/protocols/oscar/locate.c src/protocols/oscar/oscar.c src/protocols/oscar/txqueue.c
diffstat 4 files changed, 19 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/aim.h	Sun Dec 28 04:27:27 2003 +0000
+++ b/src/protocols/oscar/aim.h	Sun Dec 28 22:12:50 2003 +0000
@@ -1037,7 +1037,8 @@
 #define AIM_CAPS_SMS			0x00400000
 #define AIM_CAPS_GENERICUNKNOWN	0x00800000
 #define AIM_CAPS_VIDEO			0x01000000
-#define AIM_CAPS_LAST			0x02000000
+#define AIM_CAPS_ICHATAV		0x02000000
+#define AIM_CAPS_LAST			0x04000000
 
 #define AIM_SENDMEMBLOCK_FLAG_ISREQUEST  0
 #define AIM_SENDMEMBLOCK_FLAG_ISHASH     1
--- a/src/protocols/oscar/locate.c	Sun Dec 28 04:27:27 2003 +0000
+++ b/src/protocols/oscar/locate.c	Sun Dec 28 22:12:50 2003 +0000
@@ -46,6 +46,10 @@
 	 {0x09, 0x46, 0x01, 0x00, 0x4c, 0x7f, 0x11, 0xd1, 
 	  0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}},
 
+	{AIM_CAPS_ICHATAV,
+	 {0x09, 0x46, 0x01, 0x05, 0x4c, 0x7f, 0x11, 0xd1, 
+	  0x82, 0x22, 0x44, 0x45, 0x45, 0x53, 0x54, 0x00}},
+
 	/*
 	 * Not really sure about this one.  In an email from 
 	 * 26 Sep 2003, Matthew Sachs suggested that, "this 
--- a/src/protocols/oscar/oscar.c	Sun Dec 28 04:27:27 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Sun Dec 28 22:12:50 2003 +0000
@@ -51,7 +51,6 @@
 #define UC_NORMAL	0x10
 #define UC_AB		0x20
 #define UC_WIRELESS	0x40
-#define UC_HIPTOP	0x80
 
 #define AIMHASHDATA "http://gaim.sourceforge.net/aim_data.php3"
 
@@ -1758,8 +1757,6 @@
 		caps = info->capabilities;
 	if (info->flags & AIM_FLAG_ACTIVEBUDDY)
 		type |= UC_AB;
-	if (caps & AIM_CAPS_HIPTOP)
-		type |= UC_HIPTOP;
 
 	if (info->present & AIM_USERINFO_PRESENT_FLAGS) {
 		if (info->flags & AIM_FLAG_UNCONFIRMED)
@@ -3137,6 +3134,9 @@
 			case AIM_CAPS_VIDEO:
 				tmp = _("Video Chat");
 				break;
+			case AIM_CAPS_ICHATAV:
+				tmp = _("iChat AV");
+				break;
 			default:
 				tmp = NULL;
 				break;
@@ -5385,6 +5385,8 @@
 		gc = account->gc;
 	if (gc != NULL)
 		od = gc->proto_data;
+	if (od != NULL)
+		userinfo = aim_locate_finduserinfo(od->sess, b->name);
 
 	if (!GAIM_BUDDY_IS_ONLINE(b)) {
 		char *gname;
@@ -5423,16 +5425,14 @@
 		emblems[i++] = "admin";
 	if (b->uc & UC_AB && i < 4)
 		emblems[i++] = "activebuddy";
-	if (b->uc & UC_HIPTOP && i < 4)
-		emblems[i++] = "hiptop";
 /*	if (b->uc & UC_UNCONFIRMED && i < 4)
 		emblems[i++] = "unconfirmed"; */
 
-	if ((i < 4) && (od != NULL)) {
-		userinfo = aim_locate_finduserinfo(od->sess, b->name);
-		if ((userinfo != NULL) && (userinfo->capabilities & AIM_CAPS_SECUREIM))
+	if ((i < 4) && (userinfo != NULL) && (userinfo->capabilities & AIM_CAPS_HIPTOP))
+			emblems[i++] = "hiptop";
+
+	if ((i < 4) && (userinfo != NULL) && (userinfo->capabilities & AIM_CAPS_SECUREIM))
 			emblems[i++] = "secure";
-	}
 
 	*se = emblems[0];
 	*sw = emblems[1];
--- a/src/protocols/oscar/txqueue.c	Sun Dec 28 04:27:27 2003 +0000
+++ b/src/protocols/oscar/txqueue.c	Sun Dec 28 22:12:50 2003 +0000
@@ -219,7 +219,7 @@
 	if (!bs || !conn || (count < 0))
 		return -EINVAL;
 
-	/* Make sure we don't send paste the end of the bs */
+	/* Make sure we don't send past the end of the bs */
 	if (count > aim_bstream_empty(bs))
 		count = aim_bstream_empty(bs); /* truncate to remaining space */
 
@@ -373,9 +373,9 @@
 }
 
 /*
- *  This is responsable for removing sent commands from the transmit 
- *  queue. This is not a required operation, but it of course helps
- *  reduce memory footprint at run time!  
+ * This is responsible for removing sent commands from the transmit 
+ * queue. This is not a required operation, but it of course helps
+ * reduce memory footprint at run time!  
  */
 faim_export void aim_tx_purgequeue(aim_session_t *sess)
 {