1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301 USA.
18 * Copyright 2014 - 2015 Red Hat, Inc.
21 #include "NetworkManager.h"
23 #include "nm-test-utils.h"
25 /*****************************************************************************/
32 #if ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY)
39 NMTstcServiceInfo *nmtstc_service_init (void);
40 void nmtstc_service_cleanup (NMTstcServiceInfo *info);
42 static inline void _nmtstc_auto_service_cleanup (NMTstcServiceInfo **info)
45 nmtstc_service_cleanup (*info);
50 #define NMTSTC_SERVICE_INFO_SETUP(sinfo) \
51 NM_PRAGMA_WARNING_DISABLE ("-Wunused-variable") \
52 __attribute__ ((cleanup(_nmtstc_auto_service_cleanup))) NMTstcServiceInfo *sinfo = nmtstc_service_init (); \
53 NM_PRAGMA_WARNING_REENABLE
55 /*****************************************************************************/
57 #if ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB)
59 NMDevice *nmtstc_service_add_device (NMTstcServiceInfo *info,
64 NMDevice * nmtstc_service_add_wired_device (NMTstcServiceInfo *sinfo,
68 const char **subchannels);
70 #endif /* NM_NETWORKMANAGER_COMPILATION_LIB */
72 #if ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY)
74 #include "nm-client.h"
75 #include "nm-remote-settings.h"
77 NMClient *nmtstc_nm_client_new (void);
78 NMRemoteSettings *nmtstc_nm_remote_settings_new (void);
80 #endif /* NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY */
82 void nmtstc_service_add_connection (NMTstcServiceInfo *sinfo,
83 NMConnection *connection,
84 gboolean verify_connection,
87 void nmtstc_service_add_connection_variant (NMTstcServiceInfo *sinfo,
89 gboolean verify_connection,
92 void nmtstc_service_update_connection (NMTstcServiceInfo *sinfo,
94 NMConnection *connection,
95 gboolean verify_connection);
97 void nmtstc_service_update_connection_variant (NMTstcServiceInfo *sinfo,
100 gboolean verify_connection);