diff libpurple/protocols/jabber/presence.c @ 26997:72bcdcb0629f

Add Gmail video support. Thanks to Eion for all his testing help.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Tue, 02 Jun 2009 05:00:20 +0000
parents a8537bbcfb79
children 5330ffe6ca86 c8390dc125c1
line wrap: on
line diff
--- a/libpurple/protocols/jabber/presence.c	Mon Jun 01 10:33:38 2009 +0000
+++ b/libpurple/protocols/jabber/presence.c	Tue Jun 02 05:00:20 2009 +0000
@@ -245,6 +245,7 @@
 {
 	xmlnode *show, *status, *presence, *pri, *c;
 	const char *show_string = NULL;
+	gboolean audio_enabled, video_enabled;
 
 	presence = xmlnode_new("presence");
 
@@ -300,9 +301,18 @@
 	 * just assume that if we specify a 'voice-v1' ext (ignoring that
 	 * these are to be assigned no semantic value), we support receiving voice
 	 * calls.
+	 *
+	 * Ditto for 'video-v1'.
 	 */
-	if (jabber_audio_enabled(js, NULL /* unused */))
+	audio_enabled = jabber_audio_enabled(js, NULL /* unused */);
+	video_enabled = jabber_video_enabled(js, NULL /* unused */);
+
+	if (audio_enabled && video_enabled)
+		xmlnode_set_attrib(c, "ext", "voice-v1 video-v1");
+	else if (audio_enabled)
 		xmlnode_set_attrib(c, "ext", "voice-v1");
+	else if (video_enabled)
+		xmlnode_set_attrib(c, "ext", "video-v1");
 #endif
 
 	return presence;