pidgin.next.minor: 8efa0866: Add the purple_media_got_media_caps func...

maiku at pidgin.im maiku at pidgin.im
Tue Oct 20 17:06:14 EDT 2009


-----------------------------------------------------------------
Revision: 8efa0866a7f0c98d3e027184b7990fc83a4f935b
Ancestor: fbcbcd2843fbf25ee8008ef8526ff74ad2774139
Author: maiku at pidgin.im
Date: 2009-10-20T20:06:25
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/8efa0866a7f0c98d3e027184b7990fc83a4f935b

Modified files:
        ChangeLog.API libpurple/prpl.c libpurple/prpl.h

ChangeLog: 

Add the purple_media_got_media_caps function in order to signal when a prpl
has retrieved a contact's media capabilities.

-------------- next part --------------
============================================================
--- ChangeLog.API	ae938fc138e6aa518924de9ace1b0928d7fe1a36
+++ ChangeLog.API	33dce0e32174315bdb094d1ce544dfc5fe04c860
@@ -5,6 +5,7 @@ version 2.7.0 (??/??/????):
 		Added:
 		* purple_account_get_name_for_display
 		* purple_network_get_all_local_system_ips
+		* purple_prpl_got_media_caps
 		* purple_uuid_random
 		* buddy-caps-changed blist signal
 		* ui-caps-changed media manager signal
============================================================
--- libpurple/prpl.c	51904653ad0bee1750da2d5da7488590699cb774
+++ libpurple/prpl.c	8b5b83d10e3edb02867702256739637a43a1d21e
@@ -560,6 +560,30 @@ purple_prpl_get_media_caps(PurpleAccount
 	return PURPLE_MEDIA_CAPS_NONE;
 }
 
+void
+purple_prpl_got_media_caps(PurpleAccount *account, const char *name)
+{
+#ifdef USE_VV
+	GSList *list;
+
+	g_return_if_fail(account != NULL);
+	g_return_if_fail(name    != NULL);
+
+	if ((list = purple_find_buddies(account, name)) == NULL)
+		return;
+
+	while (list) {
+		PurpleBuddy *buddy = list->data;
+		list = g_slist_delete_link(list, list);
+
+		purple_signal_emit(purple_blist_get_handle(),
+				"buddy-caps-changed", buddy,
+				purple_prpl_get_media_caps(account, name),
+				PURPLE_MEDIA_CAPS_NONE);
+	}
+#endif
+}
+
 /**************************************************************************
  * Protocol Plugin Subsystem API
  **************************************************************************/
============================================================
--- libpurple/prpl.h	0a8c668f8cec8a3963e25a19f6ffadc3eabcfd83
+++ libpurple/prpl.h	848e491089ab04f7d8649d0f10416d02e7546964
@@ -815,6 +815,17 @@ gboolean purple_prpl_initiate_media(Purp
 					const char *who,
 					PurpleMediaSessionType type);
 
+/**
+ * Signals that the prpl received capabilities for the given contact.
+ *
+ * This function is intended to be used only by prpls.
+ *
+ * @param account The account the user is on.
+ * @param who The name of the contact for which capabilities have been received.
+ * @since 2.7.0
+ */
+void purple_prpl_got_media_caps(PurpleAccount *account, const char *who);
+
 /*@}*/
 
 /**************************************************************************/


More information about the Commits mailing list