diff options
| author | Michael Biebl <biebl@debian.org> | 2017-01-17 20:25:09 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2017-01-17 20:25:09 +0100 |
| commit | 58f8be580039b0575b197b9573a1c92745d96d30 (patch) | |
| tree | 2c226233f623a0dcb529be0eb8cdf97e4a2ae0c0 /libnm/nm-secret-agent-old.c | |
| parent | 45cb5bb3c0e6edb887cf69b417fcaf7053814a9b (diff) | |
New upstream version 1.5.90 upstream/1.5.90
Diffstat (limited to 'libnm/nm-secret-agent-old.c')
| -rw-r--r-- | libnm/nm-secret-agent-old.c | 50 |
1 files changed, 24 insertions, 26 deletions
diff --git a/libnm/nm-secret-agent-old.c b/libnm/nm-secret-agent-old.c index 5f9ca216..76e4238d 100644 --- a/libnm/nm-secret-agent-old.c +++ b/libnm/nm-secret-agent-old.c @@ -29,8 +29,8 @@ #include "nm-simple-connection.h" #include "nm-core-internal.h" -#include "nmdbus-secret-agent.h" -#include "nmdbus-agent-manager.h" +#include "introspection/org.freedesktop.NetworkManager.SecretAgent.h" +#include "introspection/org.freedesktop.NetworkManager.AgentManager.h" static void nm_secret_agent_old_initable_iface_init (GInitableIface *iface); static void nm_secret_agent_old_async_initable_iface_init (GAsyncInitableIface *iface); @@ -70,7 +70,7 @@ enum { LAST_PROP }; -/*************************************************************/ +/*****************************************************************************/ static void _internal_unregister (NMSecretAgentOld *self) @@ -472,7 +472,7 @@ impl_secret_agent_old_delete_secrets (NMSecretAgentOld *self, g_object_unref (connection); } -/**************************************************************/ +/*****************************************************************************/ static gboolean check_nm_running (NMSecretAgentOld *self, GError **error) @@ -493,7 +493,7 @@ check_nm_running (NMSecretAgentOld *self, GError **error) return FALSE; } -/**************************************************************/ +/*****************************************************************************/ /** * nm_secret_agent_old_register: @@ -877,7 +877,7 @@ nm_secret_agent_old_get_registered (NMSecretAgentOld *self) return NM_SECRET_AGENT_OLD_GET_PRIVATE (self)->registered; } -/**************************************************************/ +/*****************************************************************************/ /** * nm_secret_agent_old_get_secrets: @@ -983,7 +983,7 @@ nm_secret_agent_old_delete_secrets (NMSecretAgentOld *self, user_data); } -/**************************************************************/ +/*****************************************************************************/ static gboolean validate_identifier (const char *identifier) @@ -1046,19 +1046,20 @@ init_sync (GInitable *initable, GCancellable *cancellable, GError **error) { NMSecretAgentOld *self = NM_SECRET_AGENT_OLD (initable); NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE (self); - GDBusProxy *proxy; priv->bus = _nm_dbus_new_connection (cancellable, error); if (!priv->bus) return FALSE; - proxy = _nm_dbus_new_proxy_for_connection (priv->bus, - NM_DBUS_PATH_AGENT_MANAGER, - NM_DBUS_INTERFACE_AGENT_MANAGER, - cancellable, error); - if (!proxy) + priv->manager_proxy = nmdbus_agent_manager_proxy_new_sync (priv->bus, + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES + | G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START, + NM_DBUS_SERVICE, + NM_DBUS_PATH_AGENT_MANAGER, + cancellable, + error); + if (!priv->manager_proxy) return FALSE; - priv->manager_proxy = NMDBUS_AGENT_MANAGER (proxy); init_common (self); @@ -1105,15 +1106,13 @@ init_async_got_proxy (GObject *object, GAsyncResult *result, gpointer user_data) { NMSecretAgentOldInitData *init_data = user_data; NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE (init_data->self); - GDBusProxy *proxy; GError *error = NULL; - proxy = _nm_dbus_new_proxy_for_connection_finish (result, &error); - if (!proxy) { + priv->manager_proxy = nmdbus_agent_manager_proxy_new_finish (result, &error); + if (!priv->manager_proxy) { init_async_complete (init_data, error); return; } - priv->manager_proxy = NMDBUS_AGENT_MANAGER (proxy); init_common (init_data->self); @@ -1137,11 +1136,13 @@ init_async_got_bus (GObject *initable, GAsyncResult *result, gpointer user_data) return; } - _nm_dbus_new_proxy_for_connection_async (priv->bus, - NM_DBUS_PATH_AGENT_MANAGER, - NM_DBUS_INTERFACE_AGENT_MANAGER, - init_data->cancellable, - init_async_got_proxy, init_data); + nmdbus_agent_manager_proxy_new (priv->bus, + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES + | G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START, + NM_DBUS_INTERFACE_AGENT_MANAGER, + NM_DBUS_PATH_AGENT_MANAGER, + init_data->cancellable, + init_async_got_proxy, init_data); } static void @@ -1339,9 +1340,6 @@ nm_secret_agent_old_class_init (NMSecretAgentOldClass *class) G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); - - _nm_dbus_register_proxy_type (NM_DBUS_INTERFACE_AGENT_MANAGER, - NMDBUS_TYPE_AGENT_MANAGER_PROXY); } static void |