diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-03-25 19:13:29 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-03-25 19:27:22 +0000 |
commit | 443ea5b78c2ed0c67fa9ee1cf8e2ad1c04516284 (patch) | |
tree | 95473b21c7a74ac7250c32ef56aa38a40e341b6a | |
parent | a7c96a2961bc4f9642bd325f53b22ae348a13998 (diff) |
empathy_event_manager_init: use TpChannelFilter API
-rw-r--r-- | src/empathy-event-manager.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c index 37cf451f..7f8a5541 100644 --- a/src/empathy-event-manager.c +++ b/src/empathy-event-manager.c @@ -1309,28 +1309,20 @@ empathy_event_manager_init (EmpathyEventManager *manager) FALSE, approve_channel, manager, NULL); /* Private text channels */ - tp_base_client_add_approver_filter (priv->approver, - g_variant_new_parsed ("{ %s: <%s>, %s: <%u> }", - TP_PROP_CHANNEL_CHANNEL_TYPE, TP_IFACE_CHANNEL_TYPE_TEXT, - TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, (guint32) TP_ENTITY_TYPE_CONTACT)); + tp_base_client_take_approver_filter (priv->approver, + tp_channel_filter_new_for_text_chats ()); /* Muc text channels */ - tp_base_client_add_approver_filter (priv->approver, - g_variant_new_parsed ("{ %s: <%s>, %s: <%u> }", - TP_PROP_CHANNEL_CHANNEL_TYPE, TP_IFACE_CHANNEL_TYPE_TEXT, - TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, (guint32) TP_ENTITY_TYPE_ROOM)); + tp_base_client_take_approver_filter (priv->approver, + tp_channel_filter_new_for_text_chatrooms ()); - /* File transfer */ - tp_base_client_add_approver_filter (priv->approver, - g_variant_new_parsed ("{ %s: <%s>, %s: <%u> }", - TP_PROP_CHANNEL_CHANNEL_TYPE, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1, - TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, (guint32) TP_ENTITY_TYPE_CONTACT)); + /* Private file transfer, any service type */ + tp_base_client_take_approver_filter (priv->approver, + tp_channel_filter_new_for_file_transfers (NULL)); /* Calls */ - tp_base_client_add_approver_filter (priv->approver, - g_variant_new_parsed ("{ %s: <%s>, %s: <%u> }", - TP_PROP_CHANNEL_CHANNEL_TYPE, TP_IFACE_CHANNEL_TYPE_CALL1, - TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, (guint32) TP_ENTITY_TYPE_CONTACT)); + tp_base_client_take_approver_filter (priv->approver, + tp_channel_filter_new_for_calls (TP_ENTITY_TYPE_CONTACT)); /* I don't feel good about doing this, and I'm sorry, but the * capabilities connection feature is added earlier because it's @@ -1346,7 +1338,7 @@ empathy_event_manager_init (EmpathyEventManager *manager) NULL); /* SASL auth channels */ - tp_base_client_add_approver_filter (priv->auth_approver, + tp_base_client_add_approver_filter_variant (priv->auth_approver, g_variant_new_parsed ("{ %s: <%s>, %s: <%s> }", TP_PROP_CHANNEL_CHANNEL_TYPE, TP_IFACE_CHANNEL_TYPE_SERVER_AUTHENTICATION1, |