mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-22 02:10:41 +01:00
libnm/tests: add nmtstc_nm_remote_settings_new()
This commit is contained in:
parent
d90525ebfc
commit
5edd265c0b
2 changed files with 21 additions and 0 deletions
|
|
@ -67,8 +67,10 @@ NMDevice * nmtstc_service_add_wired_device (NMTstcServiceInfo *sinfo,
|
|||
#if ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY)
|
||||
|
||||
#include "nm-client.h"
|
||||
#include "nm-remote-settings.h"
|
||||
|
||||
NMClient *nmtstc_nm_client_new (void);
|
||||
NMRemoteSettings *nmtstc_nm_remote_settings_new (void);
|
||||
|
||||
#endif /* NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY */
|
||||
|
||||
|
|
|
|||
|
|
@ -268,6 +268,25 @@ nmtstc_nm_client_new (void)
|
|||
return client;
|
||||
}
|
||||
|
||||
NMRemoteSettings *
|
||||
nmtstc_nm_remote_settings_new (void)
|
||||
{
|
||||
NMRemoteSettings *settings;
|
||||
DBusGConnection *bus;
|
||||
GError *error = NULL;
|
||||
|
||||
bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
|
||||
g_assert_no_error (error);
|
||||
g_assert (bus);
|
||||
|
||||
settings = nm_remote_settings_new (bus);
|
||||
g_assert (settings);
|
||||
|
||||
dbus_g_connection_unref (bus);
|
||||
|
||||
return settings;
|
||||
}
|
||||
|
||||
#endif /* NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY */
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue