changeset 26369:2862fee7acf2

Remove purple_media_hangup.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Mon, 30 Mar 2009 00:45:14 +0000
parents aab0195f997d
children c0846d6659c6
files finch/gntmedia.c libpurple/media.c libpurple/media.h libpurple/protocols/jabber/google.c libpurple/protocols/jabber/jingle/rtp.c pidgin/gtkmedia.c
diffstat 6 files changed, 19 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntmedia.c	Mon Mar 30 00:30:59 2009 +0000
+++ b/finch/gntmedia.c	Mon Mar 30 00:45:14 2009 +0000
@@ -242,6 +242,13 @@
 }
 
 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 @@
 			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);
--- a/libpurple/media.c	Mon Mar 30 00:30:59 2009 +0000
+++ b/libpurple/media.c	Mon Mar 30 00:45:14 2009 +0000
@@ -1392,15 +1392,6 @@
 }
 
 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
--- a/libpurple/media.h	Mon Mar 30 00:30:59 2009 +0000
+++ b/libpurple/media.h	Mon Mar 30 00:45:14 2009 +0000
@@ -364,13 +364,6 @@
 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.
--- a/libpurple/protocols/jabber/google.c	Mon Mar 30 00:30:59 2009 +0000
+++ b/libpurple/protocols/jabber/google.c	Mon Mar 30 00:45:14 2009 +0000
@@ -331,7 +331,8 @@
 				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 @@
 	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;
--- a/libpurple/protocols/jabber/jingle/rtp.c	Mon Mar 30 00:30:59 2009 +0000
+++ b/libpurple/protocols/jabber/jingle/rtp.c	Mon Mar 30 00:45:14 2009 +0000
@@ -875,7 +875,9 @@
 		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);
 		}
 	}
 }
--- a/pidgin/gtkmedia.c	Mon Mar 30 00:30:59 2009 +0000
+++ b/pidgin/gtkmedia.c	Mon Mar 30 00:45:14 2009 +0000
@@ -182,7 +182,8 @@
 		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, 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[] = {