1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* NetworkManager -- Network link manager
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 * Copyright 2004 - 2016 Red Hat, Inc.
19 * Copyright 2005 - 2008 Novell, Inc.
22 #ifndef __NETWORKMANAGER_UTILS_H__
23 #define __NETWORKMANAGER_UTILS_H__
25 #include "nm-core-utils.h"
27 /*****************************************************************************/
29 const char *nm_utils_get_shared_wifi_permission (NMConnection *connection);
31 void nm_utils_complete_generic (NMPlatform *platform,
32 NMConnection *connection,
34 const GSList *existing,
35 const char *preferred_id,
36 const char *fallback_id_prefix,
37 const char *ifname_prefix,
38 gboolean default_enable_ipv6);
40 typedef gboolean (NMUtilsMatchFilterFunc) (NMConnection *connection, gpointer user_data);
42 NMConnection *nm_utils_match_connection (GSList *connections,
43 NMConnection *original,
44 gboolean device_has_carrier,
45 gint64 default_v4_metric,
46 gint64 default_v6_metric,
47 NMUtilsMatchFilterFunc match_filter_func,
48 gpointer match_filter_data);
50 void nm_utils_g_value_set_object_path (GValue *value, gpointer object);
54 * @object: the object to filter on
55 * @user_data: data passed to the function from the caller
57 * Returns: %TRUE if the object should be used, %FALSE if not
59 typedef gboolean (*NMUtilsObjectFunc) (GObject *object, gpointer user_data);
61 void nm_utils_g_value_set_object_path_array (GValue *value,
63 NMUtilsObjectFunc filter_func,
66 /*****************************************************************************/
68 #endif /* __NETWORKMANAGER_UTILS_H__ */