summaryrefslogtreecommitdiff
path: root/libnm/nm-dbus-helpers.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-09-02 10:22:57 +0200
committerThomas Haller <thaller@redhat.com>2019-09-21 14:58:26 +0200
commitbe3712f6fbdf79a44512cef5da4005b2c9710da7 (patch)
treec8932d56c5f035bb4073e7321f6c0f297c5016a5 /libnm/nm-dbus-helpers.c
parent908fadec964e028b3be3382a74d535b3c3324e2f (diff)
downloadNetworkManager-be3712f6fbdf79a44512cef5da4005b2c9710da7.tar.gz
libnm: drop nm_dbus_new_connection() helper API
We don't need a wrapper around g_bus_get*(). Just use it directly. I guess in the past this had some use when we were using a private socket too. Those days are gone. If we are going to re-introduce private socket support, then we probably should come up with a better solution.
Diffstat (limited to 'libnm/nm-dbus-helpers.c')
-rw-r--r--libnm/nm-dbus-helpers.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/libnm/nm-dbus-helpers.c b/libnm/nm-dbus-helpers.c
index 84312d2c31..834deebd6f 100644
--- a/libnm/nm-dbus-helpers.c
+++ b/libnm/nm-dbus-helpers.c
@@ -26,57 +26,6 @@ _nm_dbus_bus_type (void)
return nm_bus;
}
-GDBusConnection *
-_nm_dbus_new_connection (GCancellable *cancellable, GError **error)
-{
- return g_bus_get_sync (_nm_dbus_bus_type (), cancellable, error);
-}
-
-static void
-new_connection_async_got_system (GObject *source, GAsyncResult *result, gpointer user_data)
-{
- GSimpleAsyncResult *simple = user_data;
- GDBusConnection *connection;
- GError *error = NULL;
-
- connection = g_bus_get_finish (result, &error);
- if (connection)
- g_simple_async_result_set_op_res_gpointer (simple, connection, g_object_unref);
- else
- g_simple_async_result_take_error (simple, error);
-
- g_simple_async_result_complete (simple);
- g_object_unref (simple);
-}
-
-void
-_nm_dbus_new_connection_async (GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- GSimpleAsyncResult *simple;
-
- simple = g_simple_async_result_new (NULL, callback, user_data, _nm_dbus_new_connection_async);
- if (cancellable)
- g_simple_async_result_set_check_cancellable (simple, cancellable);
-
- g_bus_get (_nm_dbus_bus_type (),
- cancellable,
- new_connection_async_got_system, simple);
-}
-
-GDBusConnection *
-_nm_dbus_new_connection_finish (GAsyncResult *result,
- GError **error)
-{
- GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
-
- if (g_simple_async_result_propagate_error (simple, error))
- return NULL;
-
- return g_object_ref (g_simple_async_result_get_op_res_gpointer (simple));
-}
-
gboolean
_nm_dbus_is_connection_private (GDBusConnection *connection)
{