diff options
author | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2012-05-02 13:54:19 +0200 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2012-05-02 14:13:21 +0200 |
commit | 4e142f577f0faa86096a90f90f5509805f776201 (patch) | |
tree | 1ec31f9d4bd62d676cb0a9db2e943142ee012330 /examples | |
parent | f81a0bd99be209c74a48b9c2b8101fd6fb596c40 (diff) | |
download | telepathy-glib-4e142f577f0faa86096a90f90f5509805f776201.tar.gz |
TpConnection: Deprecate _get_self_handle()
New code should be using _get_self_contact()
Diffstat (limited to 'examples')
-rw-r--r-- | examples/client/inspect-contact.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/examples/client/inspect-contact.c b/examples/client/inspect-contact.c index c1b6bb37d..7c759bffa 100644 --- a/examples/client/inspect-contact.c +++ b/examples/client/inspect-contact.c @@ -44,14 +44,12 @@ display_contact (TpContact *contact) } static void -got_contacts_by_handle (TpConnection *connection, - guint n_contacts, - TpContact * const *contacts, - guint n_invalid, - const TpHandle *invalid, - const GError *error, - gpointer user_data, - GObject *weak_object) +contacts_upgraded_cb (TpConnection *connection, + guint n_contacts, + TpContact * const *contacts, + const GError *error, + gpointer user_data, + GObject *weak_object) { InspectContactData *data = user_data; @@ -65,12 +63,6 @@ got_contacts_by_handle (TpConnection *connection, { display_contact (contacts[i]); } - - for (i = 0; i < n_invalid; i++) - { - g_warning ("Invalid handle %u", invalid[i]); - data->exit_status = 1; - } } else { @@ -151,12 +143,12 @@ connection_ready_cb (GObject *source, if (data->to_inspect == NULL) { - TpHandle self_handle = tp_connection_get_self_handle (connection); + TpContact *self_contact = tp_connection_get_self_contact (connection); - tp_connection_get_contacts_by_handle (connection, - 1, &self_handle, + tp_connection_upgrade_contacts (connection, + 1, &self_contact, G_N_ELEMENTS (features), features, - got_contacts_by_handle, + contacts_upgraded_cb, data, NULL, NULL); } else |