Mercurial > pidgin
changeset 26371:12c7db418c3e
Remove purple_media_accept.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Mon, 30 Mar 2009 01:06:44 +0000 |
parents | c0846d6659c6 |
children | d254bc6b4d60 |
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, 25 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntmedia.c Mon Mar 30 00:55:29 2009 +0000 +++ b/finch/gntmedia.c Mon Mar 30 01:06:44 2009 +0000 @@ -160,7 +160,7 @@ } static void -finch_media_accept_cb(PurpleMedia *media, FinchMedia *gntmedia) +finch_media_connected_cb(PurpleMedia *media, FinchMedia *gntmedia) { GntWidget *parent; @@ -227,7 +227,7 @@ 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 +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 @@ 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",
--- a/libpurple/media.c Mon Mar 30 00:55:29 2009 +0000 +++ b/libpurple/media.c Mon Mar 30 01:06:44 2009 +0000 @@ -1383,15 +1383,6 @@ } 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) {
--- a/libpurple/media.h Mon Mar 30 00:55:29 2009 +0000 +++ b/libpurple/media.h Mon Mar 30 01:06:44 2009 +0000 @@ -350,13 +350,6 @@ 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.
--- a/libpurple/protocols/jabber/google.c Mon Mar 30 00:55:29 2009 +0000 +++ b/libpurple/protocols/jabber/google.c Mon Mar 30 01:06:44 2009 +0000 @@ -490,7 +490,8 @@ 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"));
--- a/libpurple/protocols/jabber/jingle/rtp.c Mon Mar 30 00:55:29 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/rtp.c Mon Mar 30 01:06:44 2009 +0000 @@ -743,11 +743,10 @@ 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);
--- a/pidgin/gtkmedia.c Mon Mar 30 00:55:29 2009 +0000 +++ b/pidgin/gtkmedia.c Mon Mar 30 01:06:44 2009 +0000 @@ -813,6 +813,13 @@ } 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 @@ 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));