#include <telepathy-glib/telepathy-glib.h>
-#include <telepathy-yell/telepathy-yell.h>
-
#include <libnotify/notification.h>
-#include <libempathy/empathy-channel-factory.h>
#include <libempathy/empathy-utils.h>
#include <libempathy-gtk/empathy-images.h>
channel_type = tp_channel_get_channel_type_id (channel);
if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_STREAMED_MEDIA ||
- channel_type == TPY_IFACE_QUARK_CHANNEL_TYPE_CALL)
+ channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL)
return channel;
}
GQuark type = tp_channel_get_channel_type_id (channel);
/* Check that Call channels are not ended */
- if (type == TPY_IFACE_QUARK_CHANNEL_TYPE_CALL &&
- tpy_call_channel_get_state (TPY_CALL_CHANNEL (channel), NULL, NULL)
- == TPY_CALL_STATE_ENDED)
+ if (type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL &&
+ tp_call_channel_get_state (TP_CALL_CHANNEL (channel),
+ NULL, NULL, NULL) == TP_CALL_STATE_ENDED)
continue;
return TRUE;
{
EmpathyCallObserverPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
EMPATHY_TYPE_CALL_OBSERVER, EmpathyCallObserverPriv);
- TpDBusDaemon *dbus;
- EmpathyChannelFactory *factory;
+ TpAccountManager *am;
GError *error = NULL;
self->priv = priv;
self->priv->notify_mgr = empathy_notify_manager_dup_singleton ();
- dbus = tp_dbus_daemon_dup (&error);
- if (dbus == NULL)
- {
- DEBUG ("Failed to get TpDBusDaemon: %s", error->message);
- g_error_free (error);
- return;
- }
+ am = tp_account_manager_dup ();
- self->priv->observer = tp_simple_observer_new (dbus, TRUE,
+ self->priv->observer = tp_simple_observer_new_with_am (am, TRUE,
"Empathy.CallObserver", FALSE,
observe_channels, self, NULL);
- factory = empathy_channel_factory_dup ();
- tp_base_client_set_channel_factory (self->priv->observer,
- TP_CLIENT_CHANNEL_FACTORY (factory));
- g_object_unref (factory);
-
/* Observe Call and StreamedMedia channels */
tp_base_client_take_observer_filter (self->priv->observer,
tp_asv_new (
tp_base_client_take_observer_filter (self->priv->observer,
tp_asv_new (
TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
- TPY_IFACE_CHANNEL_TYPE_CALL,
+ TP_IFACE_CHANNEL_TYPE_CALL,
TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
TP_HANDLE_TYPE_CONTACT,
NULL));
g_error_free (error);
}
- g_object_unref (dbus);
+ g_object_unref (am);
}
EmpathyCallObserver *