From 7869b995ea5e355a68cc3bb60500478d84c566e6 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 6 Nov 2013 18:54:33 +0000 Subject: [PATCH 08/11] Adjust telepathy-glib code for removal of Contacts interface --- .../telepathy-glib/telepathy-glib-sections.txt | 46 ++++++------------- docs/templates/interface.html | 2 +- examples/cm/call/conn.c | 1 - examples/cm/call/example_call.manager | 2 +- examples/cm/channelspecific/conn.c | 1 - examples/cm/channelspecific/example_csh.manager | 2 +- examples/cm/contactlist/conn.c | 1 - .../cm/contactlist/example_contact_list.manager | 2 +- examples/cm/echo-message-parts/conn.c | 1 - .../cm/echo-message-parts/example_echo_2.manager | 2 +- examples/cm/extended/conn.c | 1 - examples/cm/extended/example_extended.manager | 2 +- spec/Makefile.am | 1 - telepathy-glib/base-connection.c | 53 ++++++++-------------- telepathy-glib/connection.c | 6 +-- telepathy-glib/connection.xml | 1 - telepathy-glib/contact.c | 7 +-- telepathy-glib/extra-gtkdoc.h | 13 ------ tests/dbus/contact-lists.c | 4 +- tests/dbus/contacts-mixin.c | 4 +- tests/dbus/protocol-objects.c | 1 - tests/dbus/self-presence.c | 2 - .../telepathy-1/managers/test_manager_file.manager | 2 +- tests/lib/bug-19101-conn.c | 18 +++----- tests/lib/contacts-conn.c | 1 - 25 files changed, 53 insertions(+), 123 deletions(-) diff --git a/docs/reference/telepathy-glib/telepathy-glib-sections.txt b/docs/reference/telepathy-glib/telepathy-glib-sections.txt index cb86701..2f25e6e 100644 --- a/docs/reference/telepathy-glib/telepathy-glib-sections.txt +++ b/docs/reference/telepathy-glib/telepathy-glib-sections.txt @@ -938,6 +938,12 @@ tp_svc_connection_implement_remove_client_interest tp_svc_connection_remove_client_interest_impl tp_svc_connection_return_from_add_client_interest tp_svc_connection_return_from_remove_client_interest +tp_svc_connection_get_contact_attributes_impl +tp_svc_connection_implement_get_contact_attributes +tp_svc_connection_return_from_get_contact_attributes +tp_svc_connection_get_contact_by_id_impl +tp_svc_connection_implement_get_contact_by_id +tp_svc_connection_return_from_get_contact_by_id TP_SVC_CONNECTION TP_IS_SVC_CONNECTION @@ -945,21 +951,6 @@ TP_TYPE_SVC_CONNECTION tp_svc_connection_get_type TP_SVC_CONNECTION_GET_CLASS -TpSvcConnectionInterfaceContacts -TpSvcConnectionInterfaceContactsClass -tp_svc_connection_interface_contacts_get_contact_attributes_impl -tp_svc_connection_interface_contacts_implement_get_contact_attributes -tp_svc_connection_interface_contacts_return_from_get_contact_attributes -tp_svc_connection_interface_contacts_get_contact_by_id_impl -tp_svc_connection_interface_contacts_implement_get_contact_by_id -tp_svc_connection_interface_contacts_return_from_get_contact_by_id - -TP_IS_SVC_CONNECTION_INTERFACE_CONTACTS -TP_SVC_CONNECTION_INTERFACE_CONTACTS -TP_SVC_CONNECTION_INTERFACE_CONTACTS_GET_CLASS -tp_svc_connection_interface_contacts_get_type -TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACTS - TpSvcConnectionInterfaceRequests TpSvcConnectionInterfaceRequestsClass tp_svc_connection_interface_requests_create_channel_impl @@ -1373,6 +1364,10 @@ TP_STRUCT_TYPE_PARAM_SPEC TP_ARRAY_TYPE_PARAM_SPEC_LIST TP_HASH_TYPE_PROTOCOL_PROPERTIES_MAP +# Connection - core +TP_HASH_TYPE_CONTACT_ATTRIBUTES_MAP +TP_HASH_TYPE_SINGLE_CONTACT_ATTRIBUTES_MAP + # Connection - Aliasing TP_HASH_TYPE_ALIAS_MAP @@ -1388,10 +1383,6 @@ TP_ARRAY_TYPE_CONTACT_CAPABILITIES_MAP_LIST TP_STRUCT_TYPE_HANDLER_CAPABILITIES TP_ARRAY_TYPE_HANDLER_CAPABILITIES_LIST -# Connection - Contacts -TP_HASH_TYPE_CONTACT_ATTRIBUTES_MAP -TP_HASH_TYPE_SINGLE_CONTACT_ATTRIBUTES_MAP - # Connection - Requests TP_HASH_TYPE_CHANNEL_CLASS TP_ARRAY_TYPE_CHANNEL_CLASS_LIST @@ -2332,8 +2323,6 @@ TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO1 TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_INFO1 TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST1 TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_LIST1 -TP_IFACE_CONNECTION_INTERFACE_CONTACTS -TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACTS TP_IFACE_CONNECTION_INTERFACE_RENAMING1 TP_IFACE_QUARK_CONNECTION_INTERFACE_RENAMING1 TP_IFACE_CONNECTION_INTERFACE_REQUESTS @@ -2828,7 +2817,6 @@ tp_iface_quark_connection_interface_avatars1 tp_iface_quark_connection_interface_balance1 tp_iface_quark_connection_interface_cellular1 tp_iface_quark_connection_interface_client_types1 -tp_iface_quark_connection_interface_contacts tp_iface_quark_connection_interface_contact_blocking1 tp_iface_quark_connection_interface_contact_capabilities1 tp_iface_quark_connection_interface_contact_groups1 @@ -3393,6 +3381,10 @@ tp_cli_connection_call_add_client_interest tp_cli_connection_call_remove_client_interest tp_cli_connection_callback_for_add_client_interest tp_cli_connection_callback_for_remove_client_interest +tp_cli_connection_call_get_contact_attributes +tp_cli_connection_callback_for_get_contact_attributes +tp_cli_connection_call_get_contact_by_id +tp_cli_connection_callback_for_get_contact_by_id tp_cli_connection_add_signals @@ -3527,16 +3519,6 @@ tp_cli_connection_interface_cellular1_signal_callback_imsi_changed
-connection-contacts -connection-contacts -telepathy-glib/telepathy-glib-dbus.h -tp_cli_connection_interface_contacts_call_get_contact_attributes -tp_cli_connection_interface_contacts_callback_for_get_contact_attributes -tp_cli_connection_interface_contacts_call_get_contact_by_id -tp_cli_connection_interface_contacts_callback_for_get_contact_by_id -
- -
connection-contact-info connection-contact-info telepathy-glib/telepathy-glib-dbus.h diff --git a/docs/templates/interface.html b/docs/templates/interface.html index 94aee69..17ef1c1 100644 --- a/docs/templates/interface.html +++ b/docs/templates/interface.html @@ -351,7 +351,7 @@

Contact Attributes

Attributes that a contact can have, accessed with the - im.telepathy.v1.Connection.Interface.Contacts interface. + im.telepathy.v1.Connection interface.
#for $token in $interface.contact_attributes
diff --git a/examples/cm/call/conn.c b/examples/cm/call/conn.c index 2ef63c8..9f20b4d 100644 --- a/examples/cm/call/conn.c +++ b/examples/cm/call/conn.c @@ -352,7 +352,6 @@ static const TpPresenceStatusSpec presence_statuses[] = { }; static const gchar *interfaces_always_present[] = { - TP_IFACE_CONNECTION_INTERFACE_CONTACTS, TP_IFACE_CONNECTION_INTERFACE_PRESENCE1, TP_IFACE_CONNECTION_INTERFACE_REQUESTS, NULL }; diff --git a/examples/cm/call/example_call.manager b/examples/cm/call/example_call.manager index e5c0000..a863e57 100644 --- a/examples/cm/call/example_call.manager +++ b/examples/cm/call/example_call.manager @@ -3,7 +3,7 @@ Interfaces= [Protocol example] Interfaces= -ConnectionInterfaces=im.telepathy.v1.Connection.Interface.Requests;im.telepathy.v1.Connection.Interface.Contacts;im.telepathy.v1.Connection.Interface.Presence; +ConnectionInterfaces=im.telepathy.v1.Connection.Interface.Requests;im.telepathy.v1.Connection.Interface.Presence; param-account=s required register param-simulation-delay=u default-simulation-delay=1000 diff --git a/examples/cm/channelspecific/conn.c b/examples/cm/channelspecific/conn.c index 1c1b854..5904d36 100644 --- a/examples/cm/channelspecific/conn.c +++ b/examples/cm/channelspecific/conn.c @@ -218,7 +218,6 @@ shut_down (TpBaseConnection *conn) static const gchar *interfaces_always_present[] = { TP_IFACE_CONNECTION_INTERFACE_REQUESTS, - TP_IFACE_CONNECTION_INTERFACE_CONTACTS, NULL }; const gchar * const * diff --git a/examples/cm/channelspecific/example_csh.manager b/examples/cm/channelspecific/example_csh.manager index bc5a12e..8beed20 100644 --- a/examples/cm/channelspecific/example_csh.manager +++ b/examples/cm/channelspecific/example_csh.manager @@ -3,7 +3,7 @@ Interfaces= [Protocol example] Interfaces= -ConnectionInterfaces=im.telepathy.v1.Connection.Interface.Requests;im.telepathy.v1.Connection.Interface.Contacts; +ConnectionInterfaces=im.telepathy.v1.Connection.Interface.Requests; param-account=s required register param-simulation-delay=u default-simulation-delay=500 diff --git a/examples/cm/contactlist/conn.c b/examples/cm/contactlist/conn.c index f0f77b3..10a8e67 100644 --- a/examples/cm/contactlist/conn.c +++ b/examples/cm/contactlist/conn.c @@ -374,7 +374,6 @@ set_own_status (GObject *object, static const gchar *interfaces_always_present[] = { TP_IFACE_CONNECTION_INTERFACE_ALIASING1, - TP_IFACE_CONNECTION_INTERFACE_CONTACTS, TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST1, TP_IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS1, TP_IFACE_CONNECTION_INTERFACE_CONTACT_BLOCKING1, diff --git a/examples/cm/contactlist/example_contact_list.manager b/examples/cm/contactlist/example_contact_list.manager index 121fc37..238b4a9 100644 --- a/examples/cm/contactlist/example_contact_list.manager +++ b/examples/cm/contactlist/example_contact_list.manager @@ -3,7 +3,7 @@ Interfaces= [Protocol example] Interfaces= -ConnectionInterfaces=im.telepathy.v1.Connection.Interface.Requests;im.telepathy.v1.Connection.Interface.Contacts;im.telepathy.v1.Connection.Interface.Presence; +ConnectionInterfaces=im.telepathy.v1.Connection.Interface.Requests;im.telepathy.v1.Connection.Interface.Presence; param-account=s required register param-simulation-delay=u default-simulation-delay=1000 diff --git a/examples/cm/echo-message-parts/conn.c b/examples/cm/echo-message-parts/conn.c index bc444ef..2f164eb 100644 --- a/examples/cm/echo-message-parts/conn.c +++ b/examples/cm/echo-message-parts/conn.c @@ -159,7 +159,6 @@ shut_down (TpBaseConnection *conn) static const gchar *interfaces_always_present[] = { TP_IFACE_CONNECTION_INTERFACE_REQUESTS, - TP_IFACE_CONNECTION_INTERFACE_CONTACTS, NULL }; const gchar * const * diff --git a/examples/cm/echo-message-parts/example_echo_2.manager b/examples/cm/echo-message-parts/example_echo_2.manager index eaf4346..cd283ca 100644 --- a/examples/cm/echo-message-parts/example_echo_2.manager +++ b/examples/cm/echo-message-parts/example_echo_2.manager @@ -3,7 +3,7 @@ Interfaces= [Protocol example] Interfaces= -ConnectionInterfaces=im.telepathy.v1.Connection.Interface.Requests;im.telepathy.v1.Connection.Interface.Contacts; +ConnectionInterfaces=im.telepathy.v1.Connection.Interface.Requests; param-account=s required register RequestableChannelClasses=1-1-text; VCardField=x-telepathy-example diff --git a/examples/cm/extended/conn.c b/examples/cm/extended/conn.c index c8dd22e..8a40c20 100644 --- a/examples/cm/extended/conn.c +++ b/examples/cm/extended/conn.c @@ -174,7 +174,6 @@ shut_down (TpBaseConnection *conn) static const gchar *interfaces_always_present[] = { TP_IFACE_CONNECTION_INTERFACE_REQUESTS, - TP_IFACE_CONNECTION_INTERFACE_CONTACTS, EXAMPLE_IFACE_CONNECTION_INTERFACE_HATS, NULL }; diff --git a/examples/cm/extended/example_extended.manager b/examples/cm/extended/example_extended.manager index e33a3a8..78e94f5 100644 --- a/examples/cm/extended/example_extended.manager +++ b/examples/cm/extended/example_extended.manager @@ -3,7 +3,7 @@ Interfaces= [Protocol example] Interfaces= -ConnectionInterfaces=im.telepathy.v1.Connection.Interface.Requests;im.telepathy.v1.Connection.Interface.Contacts;com.example.Telepathy.Connection.Interface.Hats; +ConnectionInterfaces=im.telepathy.v1.Connection.Interface.Requests;com.example.Telepathy.Connection.Interface.Hats; param-account=s required register RequestableChannelClasses= VCardField=x-telepathy-example diff --git a/spec/Makefile.am b/spec/Makefile.am index 7a40854..efe88e2 100644 --- a/spec/Makefile.am +++ b/spec/Makefile.am @@ -81,7 +81,6 @@ EXTRA_DIST = \ Connection_Interface_Contact_Groups1.xml \ Connection_Interface_Contact_Info1.xml \ Connection_Interface_Contact_List1.xml \ - Connection_Interface_Contacts.xml \ Connection_Interface_Forwarding1.xml \ Connection_Interface_IRC_Command1.xml \ Connection_Interface_Keepalive1.xml \ diff --git a/telepathy-glib/base-connection.c b/telepathy-glib/base-connection.c index 65ad97b..a847936 100644 --- a/telepathy-glib/base-connection.c +++ b/telepathy-glib/base-connection.c @@ -254,9 +254,8 @@ #include "telepathy-glib/debug-internal.h" #include "telepathy-glib/variant-util-internal.h" -static void conn_iface_init (gpointer, gpointer); +static void conn_iface_init (TpSvcConnectionClass *); static void requests_iface_init (gpointer, gpointer); -static void contacts_iface_init (TpSvcConnectionInterfaceContactsClass *); G_DEFINE_ABSTRACT_TYPE_WITH_CODE(TpBaseConnection, tp_base_connection, @@ -265,8 +264,6 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE(TpBaseConnection, conn_iface_init); G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_DBUS_PROPERTIES, tp_dbus_properties_mixin_iface_init); - G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACTS, - contacts_iface_init); G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_REQUESTS, requests_iface_init)) @@ -898,7 +895,6 @@ tp_base_connection_create_interfaces_array (TpBaseConnection *self) TpBaseConnectionClass *klass = TP_BASE_CONNECTION_GET_CLASS (self); GPtrArray *always; gboolean has_requests = FALSE; - gboolean has_contacts = FALSE; guint i; g_assert (priv->interfaces == NULL); @@ -913,16 +909,12 @@ tp_base_connection_create_interfaces_array (TpBaseConnection *self) if (!tp_strdiff (iface, TP_IFACE_CONNECTION_INTERFACE_REQUESTS)) has_requests = TRUE; - else if (!tp_strdiff (iface, TP_IFACE_CONNECTION_INTERFACE_CONTACTS)) - has_contacts = TRUE; g_array_append_val (priv->interfaces, iface); } - if (!has_requests || !has_contacts) - { - g_critical ("Requests and Contacts interfaces must always be present"); - } + if (!has_requests) + g_critical ("Requests interface must always be present"); g_ptr_array_unref (always); } @@ -943,11 +935,9 @@ tp_base_connection_constructor (GType type, guint n_construct_properties, g_assert (cls->shut_down != NULL); g_assert (cls->start_connecting != NULL); - if (!TP_IS_SVC_CONNECTION_INTERFACE_CONTACTS (self) || - !TP_IS_SVC_CONNECTION_INTERFACE_REQUESTS (self)) + if (!TP_IS_SVC_CONNECTION_INTERFACE_REQUESTS (self)) { g_critical ("Connection must always implement " - "TpSvcConnectionInterfaceContacts and " "TpSvcConnectionInterfaceRequests"); } @@ -2484,21 +2474,6 @@ finally: g_free (unique_name); } -static void -conn_iface_init (gpointer g_iface, gpointer iface_data) -{ - TpSvcConnectionClass *klass = g_iface; - -#define IMPLEMENT(prefix,x) tp_svc_connection_implement_##x (klass, \ - tp_base_connection_##prefix##x) - IMPLEMENT(,connect); - IMPLEMENT(,disconnect); - IMPLEMENT(dbus_,add_client_interest); - IMPLEMENT(dbus_,remove_client_interest); -#undef IMPLEMENT -} - - /* The handling of calls to Connection.Interface.Requests.CreateChannel is * split into three chained functions, which each call the next function in * the chain unless an error has occured. @@ -3189,7 +3164,7 @@ tp_base_connection_dup_contact_attributes_hash (TpBaseConnection *self, } static void -contacts_get_contact_attributes_impl (TpSvcConnectionInterfaceContacts *iface, +contacts_get_contact_attributes_impl (TpSvcConnection *iface, const GArray *handles, const char **interfaces, DBusGMethodInvocation *context) @@ -3204,7 +3179,7 @@ contacts_get_contact_attributes_impl (TpSvcConnectionInterfaceContacts *iface, (const gchar * const *) interfaces, contacts_always_included_interfaces); - tp_svc_connection_interface_contacts_return_from_get_contact_attributes ( + tp_svc_connection_return_from_get_contact_attributes ( context, result); g_hash_table_unref (result); @@ -3249,7 +3224,7 @@ ensure_handle_cb (GObject *source, ret = g_hash_table_lookup (attributes, GUINT_TO_POINTER (handle)); g_assert (ret != NULL); - tp_svc_connection_interface_contacts_return_from_get_contact_by_id ( + tp_svc_connection_return_from_get_contact_by_id ( data->context, handle, ret); g_array_unref (handles); @@ -3262,7 +3237,7 @@ out: } static void -contacts_get_contact_by_id_impl (TpSvcConnectionInterfaceContacts *iface, +contacts_get_contact_by_id_impl (TpSvcConnection *iface, const gchar *id, const gchar **interfaces, DBusGMethodInvocation *context) @@ -3287,9 +3262,17 @@ contacts_get_contact_by_id_impl (TpSvcConnectionInterfaceContacts *iface, } static void -contacts_iface_init (TpSvcConnectionInterfaceContactsClass *klass) +conn_iface_init (TpSvcConnectionClass *klass) { -#define IMPLEMENT(x) tp_svc_connection_interface_contacts_implement_##x ( \ +#define IMPLEMENT(prefix,x) tp_svc_connection_implement_##x (klass, \ + tp_base_connection_##prefix##x) + IMPLEMENT(,connect); + IMPLEMENT(,disconnect); + IMPLEMENT(dbus_,add_client_interest); + IMPLEMENT(dbus_,remove_client_interest); +#undef IMPLEMENT + +#define IMPLEMENT(x) tp_svc_connection_implement_##x ( \ klass, contacts_##x##_impl) IMPLEMENT (get_contact_attributes); IMPLEMENT (get_contact_by_id); diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c index 4e362c5..bbdfd64 100644 --- a/telepathy-glib/connection.c +++ b/telepathy-glib/connection.c @@ -1091,8 +1091,7 @@ _tp_connection_got_properties (TpProxy *proxy, if (interfaces == NULL) goto error; - if (!tp_strv_contains (interfaces, TP_IFACE_CONNECTION_INTERFACE_REQUESTS) || - !tp_strv_contains (interfaces, TP_IFACE_CONNECTION_INTERFACE_CONTACTS)) + if (!tp_strv_contains (interfaces, TP_IFACE_CONNECTION_INTERFACE_REQUESTS)) { DEBUG ("Connection does not have Requests/Contacts interface - Broken CM"); goto error; @@ -1363,7 +1362,7 @@ tp_connection_list_features (TpProxyClass *cls G_GNUC_UNUSED) static GQuark need_avatars[2] = {0, 0}; static GQuark need_contact_info[2] = {0, 0}; static GQuark need_balance[2] = {0, 0}; - static GQuark need_contact_list[3] = {0, 0, 0}; + static GQuark need_contact_list[2] = {0, 0}; static GQuark need_contact_groups[2] = {0, 0}; static GQuark need_contact_blocking[2] = {0, 0}; static GQuark depends_contact_list[2] = {0, 0}; @@ -1403,7 +1402,6 @@ tp_connection_list_features (TpProxyClass *cls G_GNUC_UNUSED) features[FEAT_CONTACT_LIST].name = TP_CONNECTION_FEATURE_CONTACT_LIST; features[FEAT_CONTACT_LIST].prepare_async = _tp_connection_prepare_contact_list_async; need_contact_list[0] = TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_LIST1; - need_contact_list[1] = TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACTS; features[FEAT_CONTACT_LIST].interfaces_needed = need_contact_list; depends_contact_list[0] = TP_CONNECTION_FEATURE_CONTACT_LIST_PROPERTIES; features[FEAT_CONTACT_LIST].depends_on = depends_contact_list; diff --git a/telepathy-glib/connection.xml b/telepathy-glib/connection.xml index f0fcc59..b247916 100644 --- a/telepathy-glib/connection.xml +++ b/telepathy-glib/connection.xml @@ -5,7 +5,6 @@ Connection interfaces - diff --git a/telepathy-glib/contact.c b/telepathy-glib/contact.c index d617a6f..5e91c1e 100644 --- a/telepathy-glib/contact.c +++ b/telepathy-glib/contact.c @@ -3112,9 +3112,6 @@ contacts_bind_to_signals (TpConnection *connection, if (getting != NULL) *getting = 0; - g_assert (tp_proxy_has_interface_by_id (connection, - TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACTS)); - array = g_ptr_array_new (); if ((wanted & CONTACT_FEATURE_FLAG_ALIAS) != 0 && @@ -3430,7 +3427,7 @@ tp_connection_dup_contact_by_id_async (TpConnection *self, &getting); data = contacts_async_data_new (result, feature_flags, getting); - tp_cli_connection_interface_contacts_call_get_contact_by_id (self, -1, + tp_cli_connection_call_get_contact_by_id (self, -1, id, supported_interfaces, got_contact_by_id_cb, data, (GDestroyNotify) contacts_async_data_free, NULL); @@ -3593,7 +3590,7 @@ tp_connection_upgrade_contacts_async (TpConnection *self, if (handles->len > 0 && supported_interfaces[0] != NULL) { data = contacts_async_data_new (result, feature_flags, getting); - tp_cli_connection_interface_contacts_call_get_contact_attributes ( + tp_cli_connection_call_get_contact_attributes ( self, -1, handles, supported_interfaces, got_contact_attributes_cb, data, (GDestroyNotify) contacts_async_data_free, NULL); diff --git a/telepathy-glib/extra-gtkdoc.h b/telepathy-glib/extra-gtkdoc.h index f32c04d..2d0f435 100644 --- a/telepathy-glib/extra-gtkdoc.h +++ b/telepathy-glib/extra-gtkdoc.h @@ -725,19 +725,6 @@ */ /** - * SECTION:connection-contacts - * @title: Connection Contacts interface - * @short_description: client-side wrappers for the Contacts interface - * @see_also: #TpConnection - * - * This interface allows a client to get information from various connection - * interfaces in one dbus call. - * - * This section documents the auto-generated C wrappers for the - * Contacts interface, used with #TpConnection objects. - */ - -/** * SECTION:connection-contact-list * @title: Connection ContactList, ContactGroups and ContactBlocking interfaces * @short_description: client-side wrappers for the ContactList, diff --git a/tests/dbus/contact-lists.c b/tests/dbus/contact-lists.c index 64a9ec1..bca5716 100644 --- a/tests/dbus/contact-lists.c +++ b/tests/dbus/contact-lists.c @@ -739,7 +739,7 @@ test_assert_contact_state (Test *test, handles = g_array_new (FALSE, FALSE, sizeof (TpHandle)); g_array_append_val (handles, handle); - tp_cli_connection_interface_contacts_call_get_contact_attributes (test->conn, + tp_cli_connection_call_get_contact_attributes (test->conn, -1, handles, interfaces, contact_attrs_cb, test, test_quit_loop, NULL); g_main_loop_run (test->main_loop); @@ -842,7 +842,7 @@ test_contact_blocking_attrs (Test *test, g_array_append_val (handles, test->sjoerd); g_array_append_val (handles, test->bill); - tp_cli_connection_interface_contacts_call_get_contact_attributes (test->conn, + tp_cli_connection_call_get_contact_attributes (test->conn, -1, handles, interfaces, contact_attrs_cb, test, test_quit_loop, NULL); g_main_loop_run (test->main_loop); diff --git a/tests/dbus/contacts-mixin.c b/tests/dbus/contacts-mixin.c index c77b2a9..528ebcc 100644 --- a/tests/dbus/contacts-mixin.c +++ b/tests/dbus/contacts-mixin.c @@ -34,7 +34,7 @@ test_no_features (TpTestsContactsConnection *service_conn, g_message (G_STRFUNC); - MYASSERT (tp_cli_connection_interface_contacts_run_get_contact_attributes ( + MYASSERT (tp_cli_connection_run_get_contact_attributes ( client_conn, -1, handles, NULL, &contacts, &error, NULL), ""); g_assert_no_error (error); g_assert_cmpuint (g_hash_table_size (contacts), ==, 3); @@ -79,7 +79,7 @@ test_features (TpTestsContactsConnection *service_conn, g_message (G_STRFUNC); - MYASSERT (tp_cli_connection_interface_contacts_run_get_contact_attributes ( + MYASSERT (tp_cli_connection_run_get_contact_attributes ( client_conn, -1, handles, interfaces, &contacts, &error, NULL), ""); g_assert_no_error (error); diff --git a/tests/dbus/protocol-objects.c b/tests/dbus/protocol-objects.c index 5ccadfb..441cc8d 100644 --- a/tests/dbus/protocol-objects.c +++ b/tests/dbus/protocol-objects.c @@ -91,7 +91,6 @@ teardown (Test *test, const gchar * const expected_interfaces[] = { TP_IFACE_CONNECTION_INTERFACE_REQUESTS, - TP_IFACE_CONNECTION_INTERFACE_CONTACTS, NULL }; const gchar * const expected_protocol_interfaces[] = { diff --git a/tests/dbus/self-presence.c b/tests/dbus/self-presence.c index b82f902..80329ed 100644 --- a/tests/dbus/self-presence.c +++ b/tests/dbus/self-presence.c @@ -166,8 +166,6 @@ main (int argc, MYASSERT (tp_strv_contains ((const gchar * const *) interfaces, TP_IFACE_CONNECTION_INTERFACE_AVATARS1), ""); MYASSERT (tp_strv_contains ((const gchar * const *) interfaces, - TP_IFACE_CONNECTION_INTERFACE_CONTACTS), ""); - MYASSERT (tp_strv_contains ((const gchar * const *) interfaces, TP_IFACE_CONNECTION_INTERFACE_PRESENCE1), ""); MYASSERT (tp_strv_contains ((const gchar * const *) interfaces, TP_IFACE_CONNECTION_INTERFACE_PRESENCE1), ""); diff --git a/tests/dbus/telepathy-1/managers/test_manager_file.manager b/tests/dbus/telepathy-1/managers/test_manager_file.manager index e4139b6..0498e64 100644 --- a/tests/dbus/telepathy-1/managers/test_manager_file.manager +++ b/tests/dbus/telepathy-1/managers/test_manager_file.manager @@ -12,7 +12,7 @@ default-account = foo@default default-port = 1234 default-server-list = foo;bar; Interfaces=im.telepathy.v1.Protocol.Interface.Avatars1; -ConnectionInterfaces=im.telepathy.v1.Connection.Interface.Requests;im.telepathy.v1.Connection.Interface.Contacts; +ConnectionInterfaces=im.telepathy.v1.Connection.Interface.Requests; RequestableChannelClasses=1-1-text; VCardField=x-telepathy-tests EnglishName=Regression tests diff --git a/tests/lib/bug-19101-conn.c b/tests/lib/bug-19101-conn.c index 52a4b68..b11c7fe 100644 --- a/tests/lib/bug-19101-conn.c +++ b/tests/lib/bug-19101-conn.c @@ -18,13 +18,11 @@ #include "debug.h" -static void contacts_iface_init (gpointer g_iface, gpointer iface_data); +static void conn_iface_init (TpSvcConnectionClass *klass); G_DEFINE_TYPE_WITH_CODE (TpTestsBug19101Connection, tp_tests_bug19101_connection, TP_TESTS_TYPE_CONTACTS_CONNECTION, - G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACTS, - contacts_iface_init); - ) + G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION, conn_iface_init)) static void tp_tests_bug19101_connection_init (TpTestsBug19101Connection *self) @@ -41,7 +39,7 @@ tp_tests_bug19101_connection_class_init (TpTestsBug19101ConnectionClass *klass) */ static void tp_tests_bug19101_connection_get_contact_by_id ( - TpSvcConnectionInterfaceContacts *iface, + TpSvcConnection *iface, const gchar *id, const char **interfaces, DBusGMethodInvocation *context) @@ -55,19 +53,15 @@ tp_tests_bug19101_connection_get_contact_by_id ( handle = tp_handle_ensure (contact_repo, id, NULL, NULL); table = g_hash_table_new (NULL, NULL); - tp_svc_connection_interface_contacts_return_from_get_contact_by_id ( - context, handle, table); + tp_svc_connection_return_from_get_contact_by_id (context, handle, table); g_hash_table_unref (table); } static void -contacts_iface_init (gpointer g_iface, gpointer iface_data) +conn_iface_init (TpSvcConnectionClass *klass) { - TpSvcConnectionInterfaceContactsClass *klass = - (TpSvcConnectionInterfaceContactsClass *) g_iface; - -#define IMPLEMENT(x) tp_svc_connection_interface_contacts_implement_##x ( \ +#define IMPLEMENT(x) tp_svc_connection_implement_##x ( \ klass, tp_tests_bug19101_connection_##x) IMPLEMENT(get_contact_by_id); #undef IMPLEMENT diff --git a/tests/lib/contacts-conn.c b/tests/lib/contacts-conn.c index 46028b8..7dc864a 100644 --- a/tests/lib/contacts-conn.c +++ b/tests/lib/contacts-conn.c @@ -470,7 +470,6 @@ tp_tests_contacts_get_interfaces_always_present (TpBaseConnection *base) static const gchar *interfaces_always_present[] = { TP_IFACE_CONNECTION_INTERFACE_ALIASING1, TP_IFACE_CONNECTION_INTERFACE_AVATARS1, - TP_IFACE_CONNECTION_INTERFACE_CONTACTS, TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST1, TP_IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS1, TP_IFACE_CONNECTION_INTERFACE_PRESENCE1, -- 1.8.4.2