[next] telepathy-glib: remove tp_base_connection_disconnect_with_dbus_error
Guillaume Desmottes
gdesmott at kemper.freedesktop.org
Thu Feb 27 06:07:35 PST 2014
Module: telepathy-glib
Branch: next
Commit: a617a083c17432c1e5fef102edfecbd7228d538c
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=a617a083c17432c1e5fef102edfecbd7228d538c
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Tue Feb 18 17:13:17 2014 +0100
remove tp_base_connection_disconnect_with_dbus_error
---
.../telepathy-glib/telepathy-glib-sections.txt | 1 -
telepathy-glib/base-connection.c | 59 --------------------
telepathy-glib/base-connection.h | 3 -
tests/dbus/connection-error.c | 22 ++++----
4 files changed, 11 insertions(+), 74 deletions(-)
diff --git a/docs/reference/telepathy-glib/telepathy-glib-sections.txt b/docs/reference/telepathy-glib/telepathy-glib-sections.txt
index 6ccba64..fb59438 100644
--- a/docs/reference/telepathy-glib/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib/telepathy-glib-sections.txt
@@ -56,7 +56,6 @@ tp_base_connection_get_status
tp_base_connection_is_destroyed
tp_base_connection_check_connected
tp_base_connection_change_status
-tp_base_connection_disconnect_with_dbus_error
tp_base_connection_disconnect_with_dbus_error_vardict
tp_base_connection_finish_shutdown
tp_base_connection_add_interfaces
diff --git a/telepathy-glib/base-connection.c b/telepathy-glib/base-connection.c
index 4ac8944..aa62d2e 100644
--- a/telepathy-glib/base-connection.c
+++ b/telepathy-glib/base-connection.c
@@ -1730,65 +1730,6 @@ void tp_base_connection_finish_shutdown (TpBaseConnection *self)
}
/**
- * tp_base_connection_disconnect_with_dbus_error: (skip)
- * @self: The connection
- * @error_name: The D-Bus error with which the connection changed status to
- * Disconnected
- * @details: Further details of the error, as a hash table where the keys
- * are strings as defined in the Telepathy specification, and the
- * values are #GValue<!-- -->s. %NULL is allowed, and treated as
- * an empty hash table.
- * @reason: The reason code to use in the StatusChanged signal
- * (a less specific, non-extensible version of @error_name)
- *
- * Changes the #TpBaseConnection<!-- -->.status of @self to
- * %TP_CONNECTION_STATUS_DISCONNECTED, as if by a call to
- * tp_base_connection_change_status(), but additionally emits the
- * <code>ConnectionError</code> D-Bus signal to provide more details about the
- * error.
- *
- * Well-known keys for @details are documented in the Telepathy specification's
- * <ulink url='http://telepathy.freedesktop.org/spec/Connection.html#Signal:ConnectionError'>definition
- * of the ConnectionError signal</ulink>, and include:
- *
- * <itemizedlist>
- * <listitem><code>"debug-message"</code>, whose value should have type
- * #G_TYPE_STRING, for debugging information about the
- * disconnection which should not be shown to the user</listitem>
- * <listitem><code>"server-message"</code>, whose value should also have type
- * #G_TYPE_STRING, for a human-readable error message from the server (in an
- * unspecified language) explaining why the user was
- * disconnected.</listitem>
- * </itemizedlist>
- *
- * Since: 0.7.24
- */
-void
-tp_base_connection_disconnect_with_dbus_error (TpBaseConnection *self,
- const gchar *error_name,
- GHashTable *details,
- TpConnectionStatusReason reason)
-{
- GHashTable *dup_ = NULL;
-
- g_return_if_fail (TP_IS_BASE_CONNECTION (self));
- g_return_if_fail (tp_dbus_check_valid_interface_name (error_name, NULL));
-
- if (details == NULL)
- {
- dup_ = g_hash_table_new (g_str_hash, g_str_equal);
- details = dup_;
- }
-
- tp_svc_connection_emit_connection_error (self, error_name, details);
- tp_base_connection_change_status (self, TP_CONNECTION_STATUS_DISCONNECTED,
- reason);
-
- if (dup_ != NULL)
- g_hash_table_unref (dup_);
-}
-
-/**
* tp_base_connection_disconnect_with_dbus_error_vardict: (skip)
* @self: The connection
* @error_name: The D-Bus error with which the connection changed status to
diff --git a/telepathy-glib/base-connection.h b/telepathy-glib/base-connection.h
index 96c661b..6849b03 100644
--- a/telepathy-glib/base-connection.h
+++ b/telepathy-glib/base-connection.h
@@ -139,9 +139,6 @@ void tp_base_connection_disconnect_with_error (TpBaseConnection *self,
const GError *error, GHashTable *details, TpConnectionStatusReason reason);
*/
-void tp_base_connection_disconnect_with_dbus_error (TpBaseConnection *self,
- const gchar *error_name, GHashTable *details,
- TpConnectionStatusReason reason);
void tp_base_connection_disconnect_with_dbus_error_vardict (
TpBaseConnection *self,
const gchar *error_name,
diff --git a/tests/dbus/connection-error.c b/tests/dbus/connection-error.c
index e90a58f..de19183 100644
--- a/tests/dbus/connection-error.c
+++ b/tests/dbus/connection-error.c
@@ -170,8 +170,8 @@ test_registered_error (Test *test,
tp_cli_connection_connect_to_status_changed (test->conn, on_status_changed,
test->mainloop, NULL, NULL, NULL);
- tp_base_connection_disconnect_with_dbus_error (test->service_conn_as_base,
- "com.example.DomainSpecificError", NULL,
+ tp_base_connection_disconnect_with_dbus_error_vardict (
+ test->service_conn_as_base, "com.example.DomainSpecificError", NULL,
TP_CONNECTION_STATUS_REASON_NETWORK_ERROR);
g_main_loop_run (test->mainloop);
@@ -221,8 +221,8 @@ test_unregistered_error (Test *test,
tp_cli_connection_connect_to_status_changed (test->conn, on_status_changed,
test->mainloop, NULL, NULL, NULL);
- tp_base_connection_disconnect_with_dbus_error (test->service_conn_as_base,
- "net.example.WTF", NULL,
+ tp_base_connection_disconnect_with_dbus_error_vardict (
+ test->service_conn_as_base, "net.example.WTF", NULL,
TP_CONNECTION_STATUS_REASON_NETWORK_ERROR);
g_main_loop_run (test->mainloop);
@@ -298,17 +298,17 @@ test_detailed_error (Test *test,
}
else
{
- GHashTable *details = tp_asv_new (
- "debug-message", G_TYPE_STRING, "not enough bees",
- "bees-required", G_TYPE_INT, 2342,
- NULL);
+ GVariantDict dict;
- tp_base_connection_disconnect_with_dbus_error (
+ g_variant_dict_init (&dict, NULL);
+ g_variant_dict_insert (&dict, "debug-message", "s", "not enough bees");
+ g_variant_dict_insert (&dict, "bees-required", "i", 2342);
+
+ tp_base_connection_disconnect_with_dbus_error_vardict (
test->service_conn_as_base,
"com.example.DomainSpecificError",
- details,
+ g_variant_dict_end (&dict),
TP_CONNECTION_STATUS_REASON_NETWORK_ERROR);
- g_hash_table_unref (details);
}
g_main_loop_run (test->mainloop);
More information about the telepathy-commits
mailing list