pidgin.vv: 50499592: Remove purple_media_hangup.

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


-----------------------------------------------------------------
Revision: 50499592af2b78408b09644bc9535f602afffec2
Ancestor: 91814209fea456958654529cd589e9488767be7e
Author: maiku at soc.pidgin.im
Date: 2009-03-30T00:45:14
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/50499592af2b78408b09644bc9535f602afffec2

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_hangup.

-------------- next part --------------
============================================================
--- finch/gntmedia.c	a2f5d56975a864fc1528d1af2d1c23378f7ed31f
+++ finch/gntmedia.c	287496e722696b813757152e845142db0f901638
@@ -242,6 +242,13 @@ static void
 }
 
 static void
+finch_media_hangup_cb(PurpleMedia *media, GntWidget *widget)
+{
+	purple_media_stream_info(media, PURPLE_MEDIA_INFO_HANGUP,
+			NULL, NULL, TRUE);
+}
+
+static void
 finch_media_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 {
 	FinchMedia *media;
@@ -261,7 +268,7 @@ finch_media_set_property (GObject *objec
 			g_signal_connect_swapped(G_OBJECT(media->priv->reject), "activate",
 				 G_CALLBACK(purple_media_reject), media->priv->media);
 			g_signal_connect_swapped(G_OBJECT(media->priv->hangup), "activate",
-				 G_CALLBACK(purple_media_hangup), media->priv->media);
+				 G_CALLBACK(finch_media_hangup_cb), media->priv->media);
 
 			g_object_get(G_OBJECT(media->priv->media), "initiator",
 					&is_initiator, NULL);
============================================================
--- libpurple/media.c	dc770e892823ff88958f77bbb28ac57b77ef7f7e
+++ libpurple/media.c	a1029d0dac289277acce0889864edba958913c3a
@@ -1392,15 +1392,6 @@ void
 }
 
 void
-purple_media_hangup(PurpleMedia *media)
-{
-#ifdef USE_VV
-	purple_media_stream_info(media, PURPLE_MEDIA_INFO_HANGUP,
-			NULL, NULL, TRUE);
-#endif
-}
-
-void
 purple_media_reject(PurpleMedia *media)
 {
 #ifdef USE_VV
============================================================
--- libpurple/media.h	639ee1d808f498e41499063872301bc400ac648f
+++ libpurple/media.h	d2f02ce43267bcb4e172ab8256dc357a6a2f21ea
@@ -364,13 +364,6 @@ void purple_media_reject(PurpleMedia *me
 void purple_media_reject(PurpleMedia *media);
 
 /**
- * Set the media session to the hangup state.
- *
- * @param media The media object to set the state on.
- */
-void purple_media_hangup(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	819a4823e23e14927c4fe12603680a42dd3975b2
+++ libpurple/protocols/jabber/google.c	20abb184a658b1d0dbac937b5b7e8ce985d246d0
@@ -331,7 +331,8 @@ jabber_google_session_initiate(JabberStr
 				session->remote_jid, PURPLE_MEDIA_AUDIO,
 				"nice", num_params, params) == FALSE) {
 		purple_media_error(session->media, "Error adding stream.");
-		purple_media_hangup(session->media);
+		purple_media_stream_info(session->media,
+				PURPLE_MEDIA_INFO_HANGUP, NULL, NULL, TRUE);
 		google_session_destroy(session);
 		g_free(params);
 		return FALSE;
@@ -378,7 +379,8 @@ google_session_handle_initiate(JabberStr
 	if (purple_media_add_stream(session->media, "google-voice", session->remote_jid, 
 				PURPLE_MEDIA_AUDIO, "nice", num_params, params) == FALSE) {
 		purple_media_error(session->media, "Error adding stream.");
-		purple_media_hangup(session->media);
+		purple_media_stream_info(session->media,
+				PURPLE_MEDIA_INFO_HANGUP, NULL, NULL, TRUE);
 		google_session_send_terminate(session);
 		g_free(params);
 		return;
============================================================
--- libpurple/protocols/jabber/jingle/rtp.c	88f3ba922a1ca4a3c822c204817232e0cc1c717d
+++ libpurple/protocols/jabber/jingle/rtp.c	a525b1cbe51fd7dd22dcb51f8ae7e019fabd7717
@@ -875,7 +875,9 @@ jingle_rtp_terminate_session(JabberStrea
 		PurpleMedia *media = jingle_rtp_get_media(session);
 		if (media) {
 			purple_debug_info("jingle-rtp", "hanging up media\n");
-			purple_media_hangup(media);
+			purple_media_stream_info(media,
+					PURPLE_MEDIA_INFO_HANGUP,
+					NULL, NULL, TRUE);
 		}
 	}
 }
============================================================
--- pidgin/gtkmedia.c	bbe906d1c6a8e3ce2c87793f13f0ef4e68c8b28d
+++ pidgin/gtkmedia.c	b4d267890e89c5f26e43ba75d90a8b10b6cd11ea
@@ -182,7 +182,8 @@ pidgin_media_delete_event_cb(GtkWidget *
 		GdkEvent *event, PidginMedia *media)
 {
 	if (media->priv->media)
-		purple_media_hangup(media->priv->media);
+		purple_media_stream_info(media->priv->media,
+				PURPLE_MEDIA_INFO_HANGUP, NULL, NULL, TRUE);
 	return FALSE;
 }
 
@@ -224,7 +225,8 @@ menu_hangup(gpointer data, guint action,
 menu_hangup(gpointer data, guint action, GtkWidget *item)
 {
 	PidginMedia *gtkmedia = PIDGIN_MEDIA(data);
-	purple_media_hangup(gtkmedia->priv->media);
+	purple_media_stream_info(gtkmedia->priv->media,
+			PURPLE_MEDIA_INFO_HANGUP, NULL, NULL, TRUE);
 }
 
 static GtkItemFactoryEntry menu_items[] = {


More information about the Commits mailing list