[glib/wip/kdbus-junk: 28/37] [kdbus] Remove redundant g_dbus_name_has_owner() function from new API
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/kdbus-junk: 28/37] [kdbus] Remove redundant g_dbus_name_has_owner() function from new API
- Date: Wed, 10 Dec 2014 15:59:34 +0000 (UTC)
commit f6d8cbfceeffd4be16d67eee3ef747272392be09
Author: Lukasz Skalski <l skalski samsung com>
Date: Fri Nov 21 14:50:20 2014 +0000
[kdbus] Remove redundant g_dbus_name_has_owner() function from new API
https://bugzilla.gnome.org/show_bug.cgi?id=721861#c38
gio/gdbusconnection.c | 51 -------------------------------------------------
gio/gdbusconnection.h | 4 ---
gio/gkdbus.c | 40 --------------------------------------
gio/gkdbus.h | 4 ---
4 files changed, 0 insertions(+), 99 deletions(-)
---
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index 09b5598..55c2156 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -1953,57 +1953,6 @@ g_dbus_get_name_owner (GDBusConnection *connection,
}
/**
- * g_dbus_name_has_owner:
- * @connection: a #GDBusConnection
- * @name: a unique or well-known bus name
- * @error: return location for error or %NULL
- *
- * Synchronously checks if the specified name exists (currently has an owner).
- *
- * If @name contains a value not compatible with the D-Bus syntax and naming
- * conventions for bus names, the operation returns %NULL and @error is set.
- *
- * The calling thread is blocked until a reply is received.
- *
- * Returns: %TRUE if specified name exists (currently has an owner)
- * If the requested name doesn't have an owner or @error is set,
- * function returns %FALSE.
- *
- * Since: 2.4x
- */
-gboolean
-g_dbus_name_has_owner (GDBusConnection *connection,
- const gchar *name,
- GError **error)
-{
- GVariant *result;
- gboolean ret;
-
- g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), NULL);
- g_return_val_if_fail (name == NULL || g_dbus_is_name (name), NULL);
- g_return_val_if_fail (error == NULL || *error == NULL, NULL);
-
- result = NULL;
-
- if (G_IS_KDBUS_CONNECTION (connection->stream))
- result = _g_kdbus_NameHasOwner (connection, name, error);
- else
- result = g_dbus_connection_call_sync (connection, "org.freedesktop.DBus", "/",
- "org.freedesktop.DBus", "NameHasOwner",
- g_variant_new ("(s)", name), G_VARIANT_TYPE ("(b)"),
- G_DBUS_CALL_FLAGS_NONE, -1, NULL, error);
- if (result != NULL)
- {
- g_variant_get (result, "(b)", &ret);
- g_variant_unref (result);
- }
- else
- ret = FALSE;
-
- return ret;
-}
-
-/**
* g_dbus_get_connection_pid:
* @connection: a #GDBusConnection
* @name: a unique or well-known bus name of the connection to query
diff --git a/gio/gdbusconnection.h b/gio/gdbusconnection.h
index 19a637e..641a136 100644
--- a/gio/gdbusconnection.h
+++ b/gio/gdbusconnection.h
@@ -118,10 +118,6 @@ gchar *g_dbus_get_name_owner (GDBusConnection
const gchar *name,
GError **error);
GLIB_AVAILABLE_IN_2_40
-gboolean g_dbus_name_has_owner (GDBusConnection *connection,
- const gchar *name,
- GError **error);
-GLIB_AVAILABLE_IN_2_40
guint32 g_dbus_get_connection_pid (GDBusConnection *connection,
const gchar *name,
GError **error);
diff --git a/gio/gkdbus.c b/gio/gkdbus.c
index ff1b6a5..e612b8f 100644
--- a/gio/gkdbus.c
+++ b/gio/gkdbus.c
@@ -1017,46 +1017,6 @@ _g_kdbus_GetListQueuedOwners (GDBusConnection *connection,
/**
- * _g_kdbus_NameHasOwner:
- *
- */
-GVariant *
-_g_kdbus_NameHasOwner (GDBusConnection *connection,
- const gchar *name,
- GError **error)
-{
- GKdbus *kdbus;
- GVariant *result;
-
- kdbus = _g_kdbus_connection_get_kdbus (G_KDBUS_CONNECTION (g_dbus_connection_get_stream (connection)));
- if (kdbus == NULL)
- {
- g_set_error_literal (error,
- G_DBUS_ERROR,
- G_DBUS_ERROR_IO_ERROR,
- _("The connection is closed"));
- return NULL;
- }
-
- if (!g_dbus_is_name (name))
- {
- g_set_error (error,
- G_DBUS_ERROR,
- G_DBUS_ERROR_INVALID_ARGS,
- "Given bus name \"%s\" is not valid", name);
- return NULL;
- }
-
- if (!g_kdbus_NameHasOwner_internal (kdbus, name, error))
- result = g_variant_new ("(b)", FALSE);
- else
- result = g_variant_new ("(b)", TRUE);
-
- return result;
-}
-
-
-/**
* g_kdbus_GetConnInfo_internal:
*
*/
diff --git a/gio/gkdbus.h b/gio/gkdbus.h
index 48e3add..82386dc 100644
--- a/gio/gkdbus.h
+++ b/gio/gkdbus.h
@@ -93,10 +93,6 @@ GVariant * _g_kdbus_GetListQueuedOwners (GDB
const gchar *name,
GError **error);
-GVariant * _g_kdbus_NameHasOwner (GDBusConnection *connection,
- const gchar *name,
- GError **error);
-
GVariant * _g_kdbus_GetNameOwner (GDBusConnection *connection,
const gchar *name,
GError **error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]