Stop observing/approving StreamedMedia channels
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 22 Oct 2013 08:38:21 +0000 (10:38 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 22 Oct 2013 10:52:19 +0000 (12:52 +0200)
libempathy-gtk/empathy-log-window.c
src/empathy-call-observer.c
src/empathy-event-manager.c

index 2a9ba67..55202d3 100644 (file)
@@ -881,8 +881,7 @@ maybe_refresh_logs (TpChannel *channel,
   if (!tp_strdiff (type, TP_IFACE_CHANNEL_TYPE_TEXT) &&
       !(event_mask & TPL_EVENT_MASK_TEXT))
     goto out;
-  if ((!tp_strdiff (type, TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA) ||
-       !tp_strdiff (type, TP_IFACE_CHANNEL_TYPE_CALL)) &&
+  if ((!tp_strdiff (type, TP_IFACE_CHANNEL_TYPE_CALL)) &&
       !(event_mask & TPL_EVENT_MASK_CALL))
     goto out;
 
@@ -1024,8 +1023,7 @@ observe_channels (TpSimpleObserver *observer,
           tp_g_signal_connect_object (channel, "invalidated",
               G_CALLBACK (on_channel_ended), self, 0);
         }
-      else if (!tp_strdiff (type, TP_IFACE_CHANNEL_TYPE_CALL) ||
-          !tp_strdiff (type, TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA))
+      else if (!tp_strdiff (type, TP_IFACE_CHANNEL_TYPE_CALL))
         {
           g_hash_table_insert (self->priv->channels,
               g_object_ref (channel), g_object_ref (account));
@@ -1061,11 +1059,6 @@ log_window_create_observer (EmpathyLogWindow *self)
           TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
             TP_IFACE_CHANNEL_TYPE_TEXT,
           NULL));
-  tp_base_client_take_observer_filter (self->priv->observer,
-      tp_asv_new (
-          TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
-            TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA,
-          NULL));
   tp_base_client_take_observer_filter (self->priv->observer,
       tp_asv_new (
           TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
index 93f2515..82887b0 100644 (file)
@@ -147,8 +147,7 @@ find_main_channel (GList *channels)
 
       channel_type = tp_channel_get_channel_type_id (channel);
 
-      if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_STREAMED_MEDIA ||
-          channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL)
+      if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL)
         return channel;
     }
 
@@ -220,7 +219,7 @@ observe_channels (TpSimpleObserver *observer,
       GError err = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
           "Unknown channel type" };
 
-      DEBUG ("Didn't find any Call or StreamedMedia channel; ignoring");
+      DEBUG ("Didn't find any Call channel; ignoring");
 
       tp_observe_channels_context_fail (context, &err);
       return;
@@ -324,14 +323,7 @@ empathy_call_observer_init (EmpathyCallObserver *self)
       "Empathy.CallObserver", FALSE,
       observe_channels, self, NULL);
 
-  /* Observe Call and StreamedMedia channels */
-  tp_base_client_take_observer_filter (self->priv->observer,
-      tp_asv_new (
-        TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
-          TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA,
-        TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
-          TP_HANDLE_TYPE_CONTACT,
-        NULL));
+  /* Observe Call channels */
   tp_base_client_take_observer_filter (self->priv->observer,
       tp_asv_new (
         TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
index b8f1a47..e5b19e2 100644 (file)
@@ -797,8 +797,7 @@ find_main_channel (GList *channels)
 
       channel_type = tp_channel_get_channel_type_id (channel);
 
-      if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_STREAMED_MEDIA ||
-          channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL ||
+      if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL ||
           channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER ||
           channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_SERVER_AUTHENTICATION)
         return channel;
@@ -1405,12 +1404,6 @@ empathy_event_manager_init (EmpathyEventManager *manager)
         NULL));
 
   /* Calls */
-  tp_base_client_take_approver_filter (priv->approver,
-      tp_asv_new (
-        TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
-          TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA,
-        TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_CONTACT,
-        NULL));
   tp_base_client_take_approver_filter (priv->approver,
       tp_asv_new (
         TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,