2008-11-03 04:13:42 +00:00
|
|
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
2004-06-24 14:18:37 +00:00
|
|
|
/* NetworkManager -- Network link manager
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
2008-06-26 18:31:52 +00:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2004-06-24 14:18:37 +00:00
|
|
|
*
|
2016-03-01 09:56:51 +01:00
|
|
|
* Copyright 2004 - 2016 Red Hat, Inc.
|
2014-09-05 10:55:37 +02:00
|
|
|
* Copyright 2005 - 2008 Novell, Inc.
|
2004-06-24 14:18:37 +00:00
|
|
|
*/
|
|
|
|
|
|
all: fix up multiple-include-guard defines
Previously, src/nm-ip4-config.h, libnm/nm-ip4-config.h, and
libnm-glib/nm-ip4-config.h all used "NM_IP4_CONFIG_H" as an include
guard, which meant that nm-test-utils.h could not tell which of them
was being included (and so, eg, if you tried to include
nm-ip4-config.h in a libnm test, it would fail to compile because
nm-test-utils.h was referring to symbols in src/nm-ip4-config.h).
Fix this by changing the include guards in the non-API-stable parts of
the tree:
- libnm-glib/nm-ip4-config.h remains NM_IP4_CONFIG_H
- libnm/nm-ip4-config.h now uses __NM_IP4_CONFIG_H__
- src/nm-ip4-config.h now uses __NETWORKMANAGER_IP4_CONFIG_H__
And likewise for all other headers.
The two non-"nm"-prefixed headers, libnm/NetworkManager.h and
src/NetworkManagerUtils.h are now __NETWORKMANAGER_H__ and
__NETWORKMANAGER_UTILS_H__ respectively, which, while not entirely
consistent with the general scheme, do still mostly make sense in
isolation.
2014-08-13 14:10:11 -04:00
|
|
|
#ifndef __NETWORKMANAGER_UTILS_H__
|
|
|
|
|
#define __NETWORKMANAGER_UTILS_H__
|
2004-06-24 14:18:37 +00:00
|
|
|
|
2016-03-01 09:56:51 +01:00
|
|
|
#include "nm-core-utils.h"
|
2015-10-27 10:25:22 +01:00
|
|
|
|
2015-12-07 14:04:45 +01:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2011-07-01 14:56:07 -05:00
|
|
|
const char *nm_utils_get_shared_wifi_permission (NMConnection *connection);
|
2007-08-15 01:59:19 +00:00
|
|
|
|
2016-03-08 13:57:20 +01:00
|
|
|
void nm_utils_complete_generic (NMPlatform *platform,
|
|
|
|
|
NMConnection *connection,
|
2011-01-13 13:28:52 -06:00
|
|
|
const char *ctype,
|
|
|
|
|
const GSList *existing,
|
2014-08-05 17:11:57 -04:00
|
|
|
const char *preferred_id,
|
|
|
|
|
const char *fallback_id_prefix,
|
|
|
|
|
const char *ifname_prefix,
|
2011-02-25 11:58:16 -06:00
|
|
|
gboolean default_enable_ipv6);
|
2011-01-13 13:28:52 -06:00
|
|
|
|
2013-11-15 13:09:12 -06:00
|
|
|
typedef gboolean (NMUtilsMatchFilterFunc) (NMConnection *connection, gpointer user_data);
|
|
|
|
|
|
|
|
|
|
NMConnection *nm_utils_match_connection (GSList *connections,
|
|
|
|
|
NMConnection *original,
|
2014-02-25 17:56:06 -06:00
|
|
|
gboolean device_has_carrier,
|
2016-02-01 14:16:30 +01:00
|
|
|
gint64 default_v4_metric,
|
|
|
|
|
gint64 default_v6_metric,
|
2013-11-15 13:09:12 -06:00
|
|
|
NMUtilsMatchFilterFunc match_filter_func,
|
|
|
|
|
gpointer match_filter_data);
|
|
|
|
|
|
2015-04-03 10:08:52 -04:00
|
|
|
void nm_utils_g_value_set_object_path (GValue *value, gpointer object);
|
|
|
|
|
|
2015-08-06 10:29:29 +02:00
|
|
|
/**
|
|
|
|
|
* NMUtilsObjectFunc:
|
|
|
|
|
* @object: the object to filter on
|
|
|
|
|
* @user_data: data passed to the function from the caller
|
|
|
|
|
*
|
|
|
|
|
* Returns: %TRUE if the object should be used, %FALSE if not
|
|
|
|
|
*/
|
|
|
|
|
typedef gboolean (*NMUtilsObjectFunc) (GObject *object, gpointer user_data);
|
|
|
|
|
|
|
|
|
|
void nm_utils_g_value_set_object_path_array (GValue *value,
|
|
|
|
|
GSList *objects,
|
|
|
|
|
NMUtilsObjectFunc filter_func,
|
|
|
|
|
gpointer user_data);
|
2016-03-01 09:56:51 +01:00
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
2015-08-06 10:29:29 +02:00
|
|
|
|
all: fix up multiple-include-guard defines
Previously, src/nm-ip4-config.h, libnm/nm-ip4-config.h, and
libnm-glib/nm-ip4-config.h all used "NM_IP4_CONFIG_H" as an include
guard, which meant that nm-test-utils.h could not tell which of them
was being included (and so, eg, if you tried to include
nm-ip4-config.h in a libnm test, it would fail to compile because
nm-test-utils.h was referring to symbols in src/nm-ip4-config.h).
Fix this by changing the include guards in the non-API-stable parts of
the tree:
- libnm-glib/nm-ip4-config.h remains NM_IP4_CONFIG_H
- libnm/nm-ip4-config.h now uses __NM_IP4_CONFIG_H__
- src/nm-ip4-config.h now uses __NETWORKMANAGER_IP4_CONFIG_H__
And likewise for all other headers.
The two non-"nm"-prefixed headers, libnm/NetworkManager.h and
src/NetworkManagerUtils.h are now __NETWORKMANAGER_H__ and
__NETWORKMANAGER_UTILS_H__ respectively, which, while not entirely
consistent with the general scheme, do still mostly make sense in
isolation.
2014-08-13 14:10:11 -04:00
|
|
|
#endif /* __NETWORKMANAGER_UTILS_H__ */
|