pidgin.vv: 873706a3: Remove purple_media_accept.

maiku at soc.pidgin.im maiku at soc.pidgin.im
Sun Mar 29 21:25:40 EDT 2009


-----------------------------------------------------------------
Revision: 873706a32d182d0f1dd0fac0a99109941c68616d
Ancestor: d0637728c81f4df64c156e4cffb411348e3ebad9
Author: maiku at soc.pidgin.im
Date: 2009-03-30T01:06:44
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/873706a32d182d0f1dd0fac0a99109941c68616d

Modified files:
        finch/gntmedia.c libpurple/media.c libpurple/media.h
        libpurple/protocols/jabber/google.c
        libpurple/protocols/jabber/jingle/rtp.c pidgin/gtkmedia.c

ChangeLog: 

Remove purple_media_accept.

-------------- next part --------------
============================================================
--- finch/gntmedia.c	267d102e9e2b1055da9643481d8dca5a73d1f223
+++ finch/gntmedia.c	a56b8ac3a7026dac75acaeb90d50d730fa219c86
@@ -160,7 +160,7 @@ static void
 }
 
 static void
-finch_media_accept_cb(PurpleMedia *media, FinchMedia *gntmedia)
+finch_media_connected_cb(PurpleMedia *media, FinchMedia *gntmedia)
 {
 	GntWidget *parent;
 
@@ -227,7 +227,7 @@ finch_media_state_changed_cb(PurpleMedia
 			g_object_unref(gntmedia);
 		}
 	} else if (state == PURPLE_MEDIA_STATE_CONNECTED) {
-		finch_media_accept_cb(media, gntmedia);
+		finch_media_connected_cb(media, gntmedia);
 	}
 }
 
@@ -242,6 +242,13 @@ static void
 }
 
 static void
+finch_media_accept_cb(PurpleMedia *media, GntWidget *widget)
+{
+	purple_media_stream_info(media, PURPLE_MEDIA_INFO_ACCEPT,
+			NULL, NULL, TRUE);
+}
+
+static void
 finch_media_hangup_cb(PurpleMedia *media, GntWidget *widget)
 {
 	purple_media_stream_info(media, PURPLE_MEDIA_INFO_HANGUP,
@@ -271,7 +278,7 @@ finch_media_set_property (GObject *objec
 			media->priv->media = g_value_get_object(value);
 			g_object_ref(media->priv->media);
 			g_signal_connect_swapped(G_OBJECT(media->priv->accept), "activate",
-				 G_CALLBACK(purple_media_accept), media->priv->media);
+				 G_CALLBACK(finch_media_accept_cb), media->priv->media);
 			g_signal_connect_swapped(G_OBJECT(media->priv->reject), "activate",
 				 G_CALLBACK(finch_media_reject_cb), media->priv->media);
 			g_signal_connect_swapped(G_OBJECT(media->priv->hangup), "activate",
============================================================
--- libpurple/media.c	511f1f839fa89700dba2bba98336a275c4f15879
+++ libpurple/media.c	229ad2136fcced181858d91c7889670073e5dcac
@@ -1383,15 +1383,6 @@ void
 }
 
 void
-purple_media_accept(PurpleMedia *media)
-{
-#ifdef USE_VV
-	purple_media_stream_info(media, PURPLE_MEDIA_INFO_ACCEPT,
-			NULL, NULL, TRUE);
-#endif
-}
-
-void
 purple_media_end(PurpleMedia *media,
 		const gchar *session_id, const gchar *participant)
 {
============================================================
--- libpurple/media.h	8af7944ee589d99bd409c93e9619d66a8c0d47ce
+++ libpurple/media.h	4ca863bab8e334d96346c23b26128c5f5a649593
@@ -350,13 +350,6 @@ void purple_media_error(PurpleMedia *med
 void purple_media_error(PurpleMedia *media, const gchar *error, ...);
 
 /**
- * Set the media session to the accepted state.
- *
- * @param media The media object to set the state on.
- */
-void purple_media_accept(PurpleMedia *media);
-
-/**
  * Ends all streams that match the given parameters
  *
  * @param media The media object with which to end streams.
============================================================
--- libpurple/protocols/jabber/google.c	20abb184a658b1d0dbac937b5b7e8ce985d246d0
+++ libpurple/protocols/jabber/google.c	abeba0b990f3bcc606a496d8ae153f5edf07178a
@@ -490,7 +490,8 @@ google_session_handle_accept(JabberStrea
 	purple_media_set_remote_codecs(session->media, "google-voice",
 			session->remote_jid, codecs);
 
-	purple_media_accept(session->media);
+	purple_media_stream_info(session->media, PURPLE_MEDIA_INFO_ACCEPT,
+			NULL, NULL, FALSE);
 
 	result = jabber_iq_new(js, JABBER_IQ_RESULT);
 	jabber_iq_set_id(result, xmlnode_get_attrib(packet, "id"));
============================================================
--- libpurple/protocols/jabber/jingle/rtp.c	a525b1cbe51fd7dd22dcb51f8ae7e019fabd7717
+++ libpurple/protocols/jabber/jingle/rtp.c	7e6be996e9ac8ced0864e5b00728f3692f7500d2
@@ -743,11 +743,10 @@ jingle_rtp_handle_action_internal(Jingle
 			purple_media_add_remote_candidates(media,
 					name, remote_jid, candidates);
 
-			/* This needs to be for the entire session, not a single content */
-			/* very hacky */
-			if (action == JINGLE_SESSION_ACCEPT &&
-					xmlnode_get_next_twin(xmlcontent) == NULL)
-				purple_media_accept(media);
+			if (action == JINGLE_SESSION_ACCEPT)
+				purple_media_stream_info(media,
+						PURPLE_MEDIA_INFO_ACCEPT,
+						name, remote_jid, FALSE);
 
 			g_free(remote_jid);
 			g_free(name);
============================================================
--- pidgin/gtkmedia.c	ec71bf3a3931c10c523dd782b79f9af3b6c03d23
+++ pidgin/gtkmedia.c	053a278e21b08c0fa6e88ed0933c3164ba5d9356
@@ -813,6 +813,13 @@ static void
 }
 
 static void
+pidgin_media_accept_cb(PurpleMedia *media, int index)
+{
+	purple_media_stream_info(media, PURPLE_MEDIA_INFO_ACCEPT,
+			NULL, NULL, TRUE);
+}
+
+static void
 pidgin_media_reject_cb(PurpleMedia *media, int index)
 {
 	purple_media_stream_info(media, PURPLE_MEDIA_INFO_REJECT,
@@ -840,7 +847,8 @@ pidgin_media_new_cb(PurpleMediaManager *
 		purple_request_accept_cancel(gtkmedia, "Media invitation",
 				message, NULL, PURPLE_DEFAULT_ACTION_NONE,
 				(void*)pc, screenname, NULL, media,
-				purple_media_accept, pidgin_media_reject_cb);
+				pidgin_media_accept_cb,
+				pidgin_media_reject_cb);
 		g_free(message);
 	} else
 		gtk_widget_show(GTK_WIDGET(gtkmedia));


More information about the Commits mailing list