comparison 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
comparison
equal deleted inserted replaced
26996:4605fe3c43bb 26997:72bcdcb0629f
243 243
244 xmlnode *jabber_presence_create_js(JabberStream *js, JabberBuddyState state, const char *msg, int priority) 244 xmlnode *jabber_presence_create_js(JabberStream *js, JabberBuddyState state, const char *msg, int priority)
245 { 245 {
246 xmlnode *show, *status, *presence, *pri, *c; 246 xmlnode *show, *status, *presence, *pri, *c;
247 const char *show_string = NULL; 247 const char *show_string = NULL;
248 gboolean audio_enabled, video_enabled;
248 249
249 presence = xmlnode_new("presence"); 250 presence = xmlnode_new("presence");
250 251
251 if(state == JABBER_BUDDY_STATE_UNAVAILABLE) 252 if(state == JABBER_BUDDY_STATE_UNAVAILABLE)
252 xmlnode_set_attrib(presence, "type", "unavailable"); 253 xmlnode_set_attrib(presence, "type", "unavailable");
298 * This is a huge hack. As far as I can tell, Google Talk's gmail client 299 * This is a huge hack. As far as I can tell, Google Talk's gmail client
299 * doesn't bother to check the actual features we advertise; they 300 * doesn't bother to check the actual features we advertise; they
300 * just assume that if we specify a 'voice-v1' ext (ignoring that 301 * just assume that if we specify a 'voice-v1' ext (ignoring that
301 * these are to be assigned no semantic value), we support receiving voice 302 * these are to be assigned no semantic value), we support receiving voice
302 * calls. 303 * calls.
304 *
305 * Ditto for 'video-v1'.
303 */ 306 */
304 if (jabber_audio_enabled(js, NULL /* unused */)) 307 audio_enabled = jabber_audio_enabled(js, NULL /* unused */);
308 video_enabled = jabber_video_enabled(js, NULL /* unused */);
309
310 if (audio_enabled && video_enabled)
311 xmlnode_set_attrib(c, "ext", "voice-v1 video-v1");
312 else if (audio_enabled)
305 xmlnode_set_attrib(c, "ext", "voice-v1"); 313 xmlnode_set_attrib(c, "ext", "voice-v1");
314 else if (video_enabled)
315 xmlnode_set_attrib(c, "ext", "video-v1");
306 #endif 316 #endif
307 317
308 return presence; 318 return presence;
309 } 319 }
310 320