diff options
Diffstat (limited to 'shared/nm-test-utils-impl.c')
| -rw-r--r-- | shared/nm-test-utils-impl.c | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/shared/nm-test-utils-impl.c b/shared/nm-test-utils-impl.c index 3eb726d9..998d792a 100644 --- a/shared/nm-test-utils-impl.c +++ b/shared/nm-test-utils-impl.c @@ -25,10 +25,6 @@ #include "NetworkManager.h" #include "nm-dbus-compat.h" -#if ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY) -#include "nm-dbus-glib-types.h" -#endif - #include "nm-test-libnm-utils.h" /*****************************************************************************/ @@ -58,8 +54,7 @@ name_exists (GDBusConnection *c, const char *name) return exists; } -#if ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY) - +#if (NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_GLIB static DBusGProxy * _libdbus_create_proxy_test (DBusGConnection *bus) { @@ -75,7 +70,6 @@ _libdbus_create_proxy_test (DBusGConnection *bus) return proxy; } - #endif NMTstcServiceInfo * @@ -121,7 +115,7 @@ nmtstc_service_init (void) NULL, &error); g_assert_no_error (error); -#if ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY) +#if (NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_GLIB info->libdbus.bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error); g_assert_no_error (error); g_assert (info->libdbus.bus); @@ -148,7 +142,7 @@ nmtstc_service_cleanup (NMTstcServiceInfo *info) g_object_unref (info->bus); nm_close (info->keepalive_fd); -#if ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY) +#if (NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_GLIB g_clear_pointer (&info->libdbus.bus, dbus_g_connection_unref); #endif @@ -156,8 +150,7 @@ nmtstc_service_cleanup (NMTstcServiceInfo *info) g_free (info); } -#if ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB) - +#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_GLIB) typedef struct { GMainLoop *loop; const char *ifname; @@ -270,8 +263,7 @@ nmtstc_service_add_wired_device (NMTstcServiceInfo *sinfo, NMClient *client, { return add_device_common (sinfo, client, "AddWiredDevice", ifname, hwaddr, subchannels); } - -#endif /* NM_NETWORKMANAGER_COMPILATION_LIB */ +#endif void nmtstc_service_add_connection (NMTstcServiceInfo *sinfo, @@ -279,7 +271,7 @@ nmtstc_service_add_connection (NMTstcServiceInfo *sinfo, gboolean verify_connection, char **out_path) { -#if ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY) +#if (NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_GLIB gs_unref_hashtable GHashTable *new_settings = NULL; gboolean success; gs_free_error GError *error = NULL; @@ -353,7 +345,7 @@ nmtstc_service_update_connection (NMTstcServiceInfo *sinfo, path = nm_connection_get_path (connection); g_assert (path); -#if ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY) +#if (NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_GLIB { gs_unref_hashtable GHashTable *new_settings = NULL; gboolean success; @@ -414,8 +406,7 @@ nmtstc_service_update_connection_variant (NMTstcServiceInfo *sinfo, /*****************************************************************************/ -#if ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY) - +#if (NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_GLIB NMClient * nmtstc_nm_client_new (void) { @@ -461,7 +452,6 @@ nmtstc_nm_remote_settings_new (void) return settings; } - -#endif /* NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY */ +#endif /*****************************************************************************/ |