From bbe47027d4a0249dae95b2425ef106b784d9d404 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 27 Sep 2013 17:09:47 +0100 Subject: [PATCH 06/22] rename SimplePresence interface to Presence in MC itself --- src/mcd-account.c | 2 +- src/mcd-connection.c | 12 ++++++------ src/mcd-storage.c | 10 +++++----- xml/all.xml | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/mcd-account.c b/src/mcd-account.c index 8b5856b..736669e 100644 --- a/src/mcd-account.c +++ b/src/mcd-account.c @@ -4981,7 +4981,7 @@ mcd_account_self_contact_upgraded_cb (GObject *source_object, G_CALLBACK (mcd_account_update_self_presence), self, G_CONNECT_SWAPPED); - /* If the connection doesn't support SimplePresence then the + /* If the connection doesn't support Presence then the * presence will be (UNSET, '', '') which is what we want anyway. */ mcd_account_update_self_presence (self, tp_contact_get_presence_type (self_contact), diff --git a/src/mcd-connection.c b/src/mcd-connection.c index 8ebd584..49be197 100644 --- a/src/mcd-connection.c +++ b/src/mcd-connection.c @@ -324,7 +324,7 @@ _mcd_connection_set_presence (McdConnection * connection, _mcd_account_set_changing_presence (priv->account, FALSE); } - tp_cli_connection_interface_simple_presence_call_set_presence + tp_cli_connection_interface_presence_call_set_presence (priv->tp_conn, -1, adj_status, message, presence_set_status_cb, priv, NULL, (GObject *)connection); } @@ -356,7 +356,7 @@ presence_get_statuses_cb (TpProxy *proxy, const GValue *v_statuses, error->message); return; } - else if (G_VALUE_TYPE (v_statuses) != TP_HASH_TYPE_SIMPLE_STATUS_SPEC_MAP) + else if (G_VALUE_TYPE (v_statuses) != TP_HASH_TYPE_STATUS_SPEC_MAP) { g_warning ("%s: Get(Statuses) returned the wrong type: %s", mcd_account_get_unique_name (priv->account), @@ -415,7 +415,7 @@ _mcd_connection_setup_presence (McdConnection *connection) McdConnectionPrivate *priv = connection->priv; tp_cli_dbus_properties_call_get - (priv->tp_conn, -1, TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE, + (priv->tp_conn, -1, TP_IFACE_CONNECTION_INTERFACE_PRESENCE, "Statuses", presence_get_statuses_cb, priv, NULL, (GObject *)connection); } @@ -1099,7 +1099,7 @@ on_connection_ready (GObject *source_object, GAsyncResult *result, } priv->has_presence_if = tp_proxy_has_interface_by_id - (tp_conn, TP_IFACE_QUARK_CONNECTION_INTERFACE_SIMPLE_PRESENCE); + (tp_conn, TP_IFACE_QUARK_CONNECTION_INTERFACE_PRESENCE); priv->has_contact_capabilities_if = tp_proxy_has_interface_by_id (tp_conn, TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_CAPABILITIES); priv->has_power_saving_if = tp_proxy_has_interface_by_id (tp_conn, @@ -1258,7 +1258,7 @@ mcd_connection_early_get_interfaces_cb (TpProxy *proxy, /* if the interface is not recognised, q will just be 0 */ - if (q == TP_IFACE_QUARK_CONNECTION_INTERFACE_SIMPLE_PRESENCE) + if (q == TP_IFACE_QUARK_CONNECTION_INTERFACE_PRESENCE) { /* nail on the interface (TpConnection will eventually know * how to do this for itself) */ @@ -1268,7 +1268,7 @@ mcd_connection_early_get_interfaces_cb (TpProxy *proxy, self->priv->tasks_before_connect++; tp_cli_dbus_properties_call_get (tp_conn, -1, - TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE, "Statuses", + TP_IFACE_CONNECTION_INTERFACE_PRESENCE, "Statuses", mcd_connection_early_get_statuses_cb, NULL, NULL, (GObject *) self); } diff --git a/src/mcd-storage.c b/src/mcd-storage.c index 6522e7b..4439189 100644 --- a/src/mcd-storage.c +++ b/src/mcd-storage.c @@ -397,7 +397,7 @@ mcd_storage_init_value_for_attribute (GValue *value, { if (!tp_strdiff (s, "(uss)")) { - g_value_init (value, TP_STRUCT_TYPE_SIMPLE_PRESENCE); + g_value_init (value, TP_STRUCT_TYPE_PRESENCE); return TRUE; } } @@ -1299,7 +1299,7 @@ mcd_keyfile_get_value (GKeyFile *keyfile, ret = TRUE; } } - else if (type == TP_STRUCT_TYPE_SIMPLE_PRESENCE) + else if (type == TP_STRUCT_TYPE_PRESENCE) { gchar **v = g_key_file_get_string_list (keyfile, group, key, NULL, error); @@ -1311,7 +1311,7 @@ mcd_keyfile_get_value (GKeyFile *keyfile, else if (g_strv_length (v) != 3) { g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, - "Invalid simple-presence structure stored in keyfile"); + "Invalid presence structure stored in keyfile"); } else { @@ -1328,7 +1328,7 @@ mcd_keyfile_get_value (GKeyFile *keyfile, } else { - /* a syntactically valid simple presence */ + /* a syntactically valid presence */ g_value_take_boxed (value, tp_value_array_build (3, G_TYPE_UINT, (guint) u, @@ -1797,7 +1797,7 @@ mcd_keyfile_set_value (GKeyFile *keyfile, g_key_file_set_string_list (keyfile, name, key, (const gchar * const *) arr->pdata, arr->len); } - else if (G_VALUE_HOLDS (value, TP_STRUCT_TYPE_SIMPLE_PRESENCE)) + else if (G_VALUE_HOLDS (value, TP_STRUCT_TYPE_PRESENCE)) { guint type; /* enough for "4294967296" + \0 */ diff --git a/xml/all.xml b/xml/all.xml index cb7661f..c4738f2 100644 --- a/xml/all.xml +++ b/xml/all.xml @@ -19,8 +19,8 @@ from="Telepathy specification (Connection)"/> - +