aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-02-21 22:46:02 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-02-21 23:02:29 +0800
commitc7dd14aef20e429135fba7c7a53a8d507b9579a3 (patch)
treeb44663dba676e41af28719da704ef1c55d0291cf
parentb48a8176d050de2d03bed6c5f00b451f3ca5c750 (diff)
downloadgsoc2013-empathy-c7dd14aef20e429135fba7c7a53a8d507b9579a3.tar
gsoc2013-empathy-c7dd14aef20e429135fba7c7a53a8d507b9579a3.tar.gz
gsoc2013-empathy-c7dd14aef20e429135fba7c7a53a8d507b9579a3.tar.bz2
gsoc2013-empathy-c7dd14aef20e429135fba7c7a53a8d507b9579a3.tar.lz
gsoc2013-empathy-c7dd14aef20e429135fba7c7a53a8d507b9579a3.tar.xz
gsoc2013-empathy-c7dd14aef20e429135fba7c7a53a8d507b9579a3.tar.zst
gsoc2013-empathy-c7dd14aef20e429135fba7c7a53a8d507b9579a3.zip
Stop approve StreamedMedia channels
https://bugzilla.gnome.org/show_bug.cgi?id=629902
-rw-r--r--src/empathy-event-manager.c86
-rw-r--r--src/empathy-event-manager.h1
-rw-r--r--src/empathy-notifications-approver.c9
3 files changed, 2 insertions, 94 deletions
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index c6b3e29ed..75f2cb8ab 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -33,7 +33,6 @@
#include <libempathy/empathy-tp-contact-factory.h>
#include <libempathy/empathy-connection-aggregator.h>
#include <libempathy/empathy-tp-chat.h>
-#include <libempathy/empathy-tp-streamed-media.h>
#include <libempathy/empathy-utils.h>
#include <libempathy/empathy-gsettings.h>
@@ -408,11 +407,7 @@ reject_channel_claim_cb (GObject *source,
goto out;
}
- if (EMPATHY_IS_TP_STREAMED_MEDIA (user_data))
- {
- empathy_tp_streamed_media_close (user_data);
- }
- else if (TP_IS_CALL_CHANNEL (user_data))
+ if (TP_IS_CALL_CHANNEL (user_data))
{
tp_call_channel_hangup_async (user_data,
TP_CALL_STATE_CHANGE_REASON_USER_REQUESTED,
@@ -499,13 +494,7 @@ event_channel_process_voip_func (EventPriv *event)
return;
}
- if (etype == EMPATHY_EVENT_TYPE_VOIP)
- {
- EmpathyTpStreamedMedia *call;
- call = EMPATHY_TP_STREAMED_MEDIA (event->approval->handler_instance);
- video = empathy_tp_streamed_media_has_initial_video (call);
- }
- else if (etype == EMPATHY_EVENT_TYPE_CALL)
+ if (etype == EMPATHY_EVENT_TYPE_CALL)
{
TpCallChannel *call;
call = TP_CALL_CHANNEL (event->approval->handler_instance);
@@ -748,54 +737,6 @@ event_manager_call_channel_got_contact_cb (TpConnection *connection,
}
static void
-event_manager_media_channel_got_contact (EventManagerApproval *approval)
-{
- EmpathyEventManagerPriv *priv = GET_PRIV (approval->manager);
- GtkWidget *window = empathy_roster_window_dup ();
- gchar *header;
- EmpathyTpStreamedMedia *call;
- gboolean video;
-
- call = EMPATHY_TP_STREAMED_MEDIA (approval->handler_instance);
-
- video = empathy_tp_streamed_media_has_initial_video (call);
-
- header = g_strdup_printf (
- video ? _("Incoming video call from %s") :_("Incoming call from %s"),
- empathy_contact_get_alias (approval->contact));
-
- event_manager_add (approval->manager, NULL,
- approval->contact, EMPATHY_EVENT_TYPE_VOIP,
- video ? EMPATHY_IMAGE_VIDEO_CALL : EMPATHY_IMAGE_VOIP,
- header, NULL, approval,
- event_channel_process_voip_func, NULL);
-
- g_free (header);
-
- priv->ringing++;
- if (priv->ringing == 1)
- empathy_sound_manager_start_playing (priv->sound_mgr, window,
- EMPATHY_SOUND_PHONE_INCOMING, MS_BETWEEN_RING);
-
- g_object_unref (window);
-}
-
-static void
-event_manager_media_channel_contact_changed_cb (EmpathyTpStreamedMedia *call,
- GParamSpec *param, EventManagerApproval *approval)
-{
- EmpathyContact *contact;
-
- g_object_get (G_OBJECT (call), "contact", &contact, NULL);
-
- if (contact == NULL)
- return;
-
- approval->contact = contact;
- event_manager_media_channel_got_contact (approval);
-}
-
-static void
invite_dialog_response_cb (GtkDialog *dialog,
gint response,
EventManagerApproval *approval)
@@ -1080,29 +1021,6 @@ approve_channels (TpSimpleApprover *approver,
event_manager_chat_message_received_cb (tp_chat, msg, approval);
}
}
- else if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_STREAMED_MEDIA)
- {
- EmpathyContact *contact;
- EmpathyTpStreamedMedia *call = empathy_tp_streamed_media_new (account,
- channel);
-
- approval->handler_instance = G_OBJECT (call);
-
- g_object_get (G_OBJECT (call), "contact", &contact, NULL);
-
- if (contact == NULL)
- {
- g_signal_connect (call, "notify::contact",
- G_CALLBACK (event_manager_media_channel_contact_changed_cb),
- approval);
- }
- else
- {
- approval->contact = contact;
- event_manager_media_channel_got_contact (approval);
- }
-
- }
else if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL)
{
TpCallChannel *call = TP_CALL_CHANNEL (channel);
diff --git a/src/empathy-event-manager.h b/src/empathy-event-manager.h
index 91c6e1f99..c780e5e73 100644
--- a/src/empathy-event-manager.h
+++ b/src/empathy-event-manager.h
@@ -50,7 +50,6 @@ struct _EmpathyEventManagerClass {
typedef enum {
EMPATHY_EVENT_TYPE_CHAT,
- EMPATHY_EVENT_TYPE_VOIP,
EMPATHY_EVENT_TYPE_CALL,
EMPATHY_EVENT_TYPE_TRANSFER,
EMPATHY_EVENT_TYPE_SUBSCRIPTION,
diff --git a/src/empathy-notifications-approver.c b/src/empathy-notifications-approver.c
index 7a4f03731..bb7f6b458 100644
--- a/src/empathy-notifications-approver.c
+++ b/src/empathy-notifications-approver.c
@@ -25,8 +25,6 @@
#include <libnotify/notify.h>
#include <telepathy-glib/telepathy-glib.h>
-#include <libempathy/empathy-tp-streamed-media.h>
-
#include <libempathy-gtk/empathy-notify-manager.h>
#include <libempathy-gtk/empathy-call-utils.h>
@@ -190,12 +188,7 @@ add_notification_actions (EmpathyNotificationsApprover *self,
self, NULL);
break;
- case EMPATHY_EVENT_TYPE_VOIP:
case EMPATHY_EVENT_TYPE_CALL:
- if (self->priv->event->type == EMPATHY_EVENT_TYPE_VOIP)
- video = empathy_tp_streamed_media_has_initial_video (
- EMPATHY_TP_STREAMED_MEDIA (self->priv->event->handler_instance));
- else
video = tp_call_channel_has_initial_video (
TP_CALL_CHANNEL (self->priv->event->handler_instance), NULL);
@@ -260,7 +253,6 @@ notification_is_urgent (EmpathyNotificationsApprover *self,
* interact ASAP */
switch (self->priv->event->type) {
case EMPATHY_EVENT_TYPE_CHAT:
- case EMPATHY_EVENT_TYPE_VOIP:
case EMPATHY_EVENT_TYPE_CALL:
case EMPATHY_EVENT_TYPE_TRANSFER:
case EMPATHY_EVENT_TYPE_INVITATION:
@@ -288,7 +280,6 @@ get_category_for_event_type (EmpathyEventType type)
return "presence.online";
case EMPATHY_EVENT_TYPE_PRESENCE_OFFLINE:
return "presence.offline";
- case EMPATHY_EVENT_TYPE_VOIP:
case EMPATHY_EVENT_TYPE_CALL:
return "x-empathy.call.incoming";
case EMPATHY_EVENT_TYPE_TRANSFER: