Commit 1ec6b671 authored by Dan Williams's avatar Dan Williams

settings: rename NMSysconfigSettings to NMSettings

parent 18f819d7
......@@ -453,7 +453,7 @@ main (int argc, char *argv[])
NMDBusManager *dbus_mgr = NULL;
NMSupplicantManager *sup_mgr = NULL;
NMDHCPManager *dhcp_mgr = NULL;
NMSysconfigSettings *settings = NULL;
NMSettings *settings = NULL;
GError *error = NULL;
gboolean wrote_pidfile = FALSE;
char *cfg_log_level = NULL, *cfg_log_domains = NULL;
......@@ -673,7 +673,7 @@ main (int argc, char *argv[])
goto done;
}
settings = nm_sysconfig_settings_new (config, plugins, &error);
settings = nm_settings_new (config, plugins, &error);
if (!settings) {
nm_log_err (LOGD_CORE, "failed to initialize settings storage.");
goto done;
......
......@@ -52,7 +52,7 @@
#include "nm-hostname-provider.h"
#include "nm-bluez-manager.h"
#include "nm-bluez-common.h"
#include "nm-sysconfig-settings.h"
#include "nm-settings.h"
#include "nm-sysconfig-connection.h"
#include "nm-secrets-provider-interface.h"
#include "nm-manager-auth.h"
......@@ -200,7 +200,7 @@ typedef struct {
NMUdevManager *udev_mgr;
NMBluezManager *bluez_mgr;
NMSysconfigSettings *settings;
NMSettings *settings;
char *hostname;
GSList *secrets_calls;
......@@ -485,7 +485,7 @@ remove_one_device (NMManager *manager,
g_signal_handlers_disconnect_by_func (device, manager_device_state_changed, manager);
nm_sysconfig_settings_device_removed (priv->settings, device);
nm_settings_device_removed (priv->settings, device);
g_signal_emit (manager, signals[DEVICE_REMOVED], 0, device);
g_object_unref (device);
......@@ -743,11 +743,11 @@ get_active_connections (NMManager *manager, NMConnection *filter)
}
/*******************************************************************/
/* Settings stuff via NMSysconfigSettings */
/* Settings stuff via NMSettings */
/*******************************************************************/
static void
connections_changed (NMSysconfigSettings *settings,
connections_changed (NMSettings *settings,
NMSysconfigConnection *connection,
NMManager *manager)
{
......@@ -755,15 +755,15 @@ connections_changed (NMSysconfigSettings *settings,
}
static void
system_unmanaged_devices_changed_cb (NMSysconfigSettings *sys_settings,
system_unmanaged_devices_changed_cb (NMSettings *settings,
GParamSpec *pspec,
gpointer user_data)
{
NMManager *manager = NM_MANAGER (user_data);
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (manager);
NMManager *self = NM_MANAGER (user_data);
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
const GSList *unmanaged_specs, *iter;
unmanaged_specs = nm_sysconfig_settings_get_unmanaged_specs (sys_settings);
unmanaged_specs = nm_settings_get_unmanaged_specs (priv->settings);
for (iter = priv->devices; iter; iter = g_slist_next (iter)) {
NMDevice *device = NM_DEVICE (iter->data);
gboolean managed;
......@@ -772,30 +772,28 @@ system_unmanaged_devices_changed_cb (NMSysconfigSettings *sys_settings,
nm_device_set_managed (device,
managed,
managed ? NM_DEVICE_STATE_REASON_NOW_MANAGED :
NM_DEVICE_STATE_REASON_NOW_UNMANAGED);
NM_DEVICE_STATE_REASON_NOW_UNMANAGED);
}
}
static void
system_hostname_changed_cb (NMSysconfigSettings *sys_settings,
system_hostname_changed_cb (NMSettings *settings,
GParamSpec *pspec,
gpointer user_data)
{
NMManager *manager = NM_MANAGER (user_data);
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (manager);
NMManager *self = NM_MANAGER (user_data);
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
char *hostname;
hostname = nm_sysconfig_settings_get_hostname (sys_settings);
hostname = nm_settings_get_hostname (priv->settings);
if (!hostname && !priv->hostname)
return;
if (hostname && priv->hostname && !strcmp (hostname, priv->hostname))
return;
g_free (priv->hostname);
priv->hostname = (hostname && strlen (hostname)) ? g_strdup (hostname) : NULL;
g_object_notify (G_OBJECT (manager), NM_MANAGER_HOSTNAME);
g_object_notify (G_OBJECT (self), NM_MANAGER_HOSTNAME);
g_free (hostname);
}
......@@ -945,7 +943,7 @@ manager_hidden_ap_found (NMDeviceInterface *device,
/* Look for this AP's BSSID in the seen-bssids list of a connection,
* and if a match is found, copy over the SSID */
connections = nm_sysconfig_settings_get_connections (priv->settings);
connections = nm_settings_get_connections (priv->settings);
for (iter = connections; iter && !done; iter = g_slist_next (iter)) {
NMConnection *connection = NM_CONNECTION (iter->data);
......@@ -1330,7 +1328,7 @@ add_device (NMManager *self, NMDevice *device)
if (nm_device_interface_can_assume_connections (NM_DEVICE_INTERFACE (device))) {
GSList *connections = NULL;
connections = nm_sysconfig_settings_get_connections (priv->settings);
connections = nm_settings_get_connections (priv->settings);
existing = nm_device_interface_connection_match_config (NM_DEVICE_INTERFACE (device),
(const GSList *) connections);
g_slist_free (connections);
......@@ -1346,7 +1344,7 @@ add_device (NMManager *self, NMDevice *device)
}
/* Start the device if it's supposed to be managed */
unmanaged_specs = nm_sysconfig_settings_get_unmanaged_specs (priv->settings);
unmanaged_specs = nm_settings_get_unmanaged_specs (priv->settings);
if ( !manager_sleeping (self)
&& !nm_device_interface_spec_match_list (NM_DEVICE_INTERFACE (device), unmanaged_specs)) {
nm_device_set_managed (device,
......@@ -1356,7 +1354,7 @@ add_device (NMManager *self, NMDevice *device)
managed = TRUE;
}
nm_sysconfig_settings_device_added (priv->settings, device);
nm_settings_device_added (priv->settings, device);
g_signal_emit (self, signals[DEVICE_ADDED], 0, device);
/* If the device has a connection it can assume, do that now */
......@@ -1415,7 +1413,7 @@ bluez_manager_find_connection (NMManager *manager,
NMConnection *found = NULL;
GSList *connections, *l;
connections = nm_sysconfig_settings_get_connections (priv->settings);
connections = nm_settings_get_connections (priv->settings);
for (l = connections; l != NULL; l = l->next) {
NMConnection *candidate = NM_CONNECTION (l->data);
......@@ -1780,8 +1778,7 @@ system_get_secrets_idle_cb (gpointer user_data)
info->idle_id = 0;
connection = nm_sysconfig_settings_get_connection_by_path (priv->settings,
info->connection_path);
connection = nm_settings_get_connection_by_path (priv->settings, info->connection_path);
if (!connection) {
error = g_error_new_literal (NM_MANAGER_ERROR,
NM_MANAGER_ERROR_UNKNOWN_CONNECTION,
......@@ -2040,8 +2037,7 @@ check_pending_ready (NMManager *self, PendingActivation *pending)
/* Ok, we're authorized */
connection = nm_sysconfig_settings_get_connection_by_path (priv->settings,
pending->connection_path);
connection = nm_settings_get_connection_by_path (priv->settings, pending->connection_path);
if (!connection) {
error = g_error_new_literal (NM_MANAGER_ERROR,
NM_MANAGER_ERROR_UNKNOWN_CONNECTION,
......@@ -2286,7 +2282,7 @@ do_sleep_wake (NMManager *self)
} else {
nm_log_info (LOGD_SUSPEND, "waking up and re-enabling...");
unmanaged_specs = nm_sysconfig_settings_get_unmanaged_specs (priv->settings);
unmanaged_specs = nm_settings_get_unmanaged_specs (priv->settings);
/* Ensure rfkill state is up-to-date since we don't respond to state
* changes during sleep.
......@@ -3004,7 +3000,7 @@ out:
}
NMManager *
nm_manager_get (NMSysconfigSettings *settings,
nm_manager_get (NMSettings *settings,
const char *config_file,
const char *plugins,
const char *state_file,
......@@ -3049,22 +3045,20 @@ nm_manager_get (NMSysconfigSettings *settings,
priv->radio_states[RFKILL_TYPE_WLAN].user_enabled = initial_wifi_enabled;
priv->radio_states[RFKILL_TYPE_WWAN].user_enabled = initial_wwan_enabled;
g_signal_connect (priv->settings, "notify::" NM_SYSCONFIG_SETTINGS_UNMANAGED_SPECS,
g_signal_connect (priv->settings, "notify::" NM_SETTINGS_UNMANAGED_SPECS,
G_CALLBACK (system_unmanaged_devices_changed_cb), singleton);
g_signal_connect (priv->settings, "notify::" NM_SYSCONFIG_SETTINGS_HOSTNAME,
g_signal_connect (priv->settings, "notify::" NM_SETTINGS_HOSTNAME,
G_CALLBACK (system_hostname_changed_cb), singleton);
g_signal_connect (priv->settings, NM_SYSCONFIG_SETTINGS_CONNECTION_ADDED,
g_signal_connect (priv->settings, NM_SETTINGS_CONNECTION_ADDED,
G_CALLBACK (connections_changed), singleton);
g_signal_connect (priv->settings, NM_SYSCONFIG_SETTINGS_CONNECTION_UPDATED,
g_signal_connect (priv->settings, NM_SETTINGS_CONNECTION_UPDATED,
G_CALLBACK (connections_changed), singleton);
g_signal_connect (priv->settings, NM_SYSCONFIG_SETTINGS_CONNECTION_REMOVED,
g_signal_connect (priv->settings, NM_SETTINGS_CONNECTION_REMOVED,
G_CALLBACK (connections_changed), singleton);
g_signal_connect (priv->settings, NM_SYSCONFIG_SETTINGS_CONNECTION_VISIBILITY_CHANGED,
g_signal_connect (priv->settings, NM_SETTINGS_CONNECTION_VISIBILITY_CHANGED,
G_CALLBACK (connections_changed), singleton);
dbus_g_connection_register_g_object (nm_dbus_manager_get_connection (priv->dbus_mgr),
NM_DBUS_PATH,
G_OBJECT (singleton));
dbus_g_connection_register_g_object (bus, NM_DBUS_PATH, G_OBJECT (singleton));
priv->udev_mgr = nm_udev_manager_new ();
g_signal_connect (priv->udev_mgr,
......
......@@ -27,7 +27,7 @@
#include <dbus/dbus-glib.h>
#include "nm-device.h"
#include "nm-device-interface.h"
#include "nm-sysconfig-settings.h"
#include "nm-settings.h"
#define NM_TYPE_MANAGER (nm_manager_get_type ())
#define NM_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_MANAGER, NMManager))
......@@ -65,7 +65,7 @@ typedef struct {
GType nm_manager_get_type (void);
NMManager *nm_manager_get (NMSysconfigSettings *settings,
NMManager *nm_manager_get (NMSettings *settings,
const char *config_file,
const char *plugins,
const char *state_file,
......
......@@ -57,7 +57,7 @@ struct NMPolicy {
gulong vpn_activated_id;
gulong vpn_deactivated_id;
NMSysconfigSettings *settings;
NMSettings *settings;
NMDevice *default_device4;
NMDevice *default_device6;
......@@ -742,7 +742,7 @@ auto_activate_device (gpointer user_data)
if (nm_device_get_act_request (data->device))
goto out;
connections = nm_sysconfig_settings_get_connections (policy->settings);
connections = nm_settings_get_connections (policy->settings);
/* Remove connections that are in the invalid list. */
iter = connections;
......@@ -834,7 +834,7 @@ sleeping_changed (NMManager *manager, GParamSpec *pspec, gpointer user_data)
/* Clear the invalid flag on all connections so they'll get retried on wakeup */
if (sleeping || !enabled) {
connections = nm_sysconfig_settings_get_connections (policy->settings);
connections = nm_settings_get_connections (policy->settings);
for (iter = connections; iter; iter = g_slist_next (iter))
g_object_set_data (G_OBJECT (iter->data), INVALID_TAG, NULL);
g_slist_free (connections);
......@@ -1026,7 +1026,7 @@ schedule_activate_all (NMPolicy *policy)
}
static void
connection_added (NMSysconfigSettings *settings,
connection_added (NMSettings *settings,
NMConnection *connection,
gpointer user_data)
{
......@@ -1034,7 +1034,7 @@ connection_added (NMSysconfigSettings *settings,
}
static void
connection_updated (NMSysconfigSettings *settings,
connection_updated (NMSettings *settings,
NMConnection *connection,
gpointer user_data)
{
......@@ -1073,7 +1073,7 @@ _deactivate_if_active (NMManager *manager, NMConnection *connection)
}
static void
connection_removed (NMSysconfigSettings *settings,
connection_removed (NMSettings *settings,
NMConnection *connection,
gpointer user_data)
{
......@@ -1083,7 +1083,7 @@ connection_removed (NMSysconfigSettings *settings,
}
static void
connection_visibility_changed (NMSysconfigSettings *settings,
connection_visibility_changed (NMSettings *settings,
NMSysconfigConnection *connection,
gpointer user_data)
{
......@@ -1116,7 +1116,7 @@ _connect_settings_signal (NMPolicy *policy, const char *name, gpointer callback)
NMPolicy *
nm_policy_new (NMManager *manager,
NMVPNManager *vpn_manager,
NMSysconfigSettings *settings)
NMSettings *settings)
{
NMPolicy *policy;
static gboolean initialized = FALSE;
......@@ -1154,11 +1154,11 @@ nm_policy_new (NMManager *manager,
_connect_manager_signal (policy, "device-added", device_added);
_connect_manager_signal (policy, "device-removed", device_removed);
_connect_settings_signal (policy, NM_SYSCONFIG_SETTINGS_CONNECTIONS_LOADED, connection_added);
_connect_settings_signal (policy, NM_SYSCONFIG_SETTINGS_CONNECTION_ADDED, connection_added);
_connect_settings_signal (policy, NM_SYSCONFIG_SETTINGS_CONNECTION_UPDATED, connection_updated);
_connect_settings_signal (policy, NM_SYSCONFIG_SETTINGS_CONNECTION_REMOVED, connection_removed);
_connect_settings_signal (policy, NM_SYSCONFIG_SETTINGS_CONNECTION_VISIBILITY_CHANGED,
_connect_settings_signal (policy, NM_SETTINGS_CONNECTIONS_LOADED, connection_added);
_connect_settings_signal (policy, NM_SETTINGS_CONNECTION_ADDED, connection_added);
_connect_settings_signal (policy, NM_SETTINGS_CONNECTION_UPDATED, connection_updated);
_connect_settings_signal (policy, NM_SETTINGS_CONNECTION_REMOVED, connection_removed);
_connect_settings_signal (policy, NM_SETTINGS_CONNECTION_VISIBILITY_CHANGED,
connection_visibility_changed);
return policy;
}
......
......@@ -19,18 +19,18 @@
* Copyright (C) 2007 - 2008 Novell, Inc.
*/
#ifndef NETWORK_MANAGER_POLICY_H
#define NETWORK_MANAGER_POLICY_H
#ifndef NM_POLICY_H
#define NM_POLICY_H
#include "nm-manager.h"
#include "nm-vpn-manager.h"
#include "nm-sysconfig-settings.h"
#include "nm-settings.h"
typedef struct NMPolicy NMPolicy;
NMPolicy *nm_policy_new (NMManager *manager,
NMVPNManager *vpn_manager,
NMSysconfigSettings *settings);
NMSettings *settings);
void nm_policy_destroy (NMPolicy *policy);
#endif /* NETWORK_MANAGER_POLICY_H */
#endif /* NM_POLICY_H */
......@@ -13,8 +13,8 @@ BUILT_SOURCES = \
nm-sysconfig-connection-glue.h
libsystem_settings_la_SOURCES = \
nm-sysconfig-settings.c \
nm-sysconfig-settings.h \
nm-settings.c \
nm-settings.h \
nm-inotify-helper.c \
nm-inotify-helper.h \
nm-polkit-helpers.h \
......
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager system settings service
*
* Søren Sandmann <sandmann@daimi.au.dk>
* Dan Williams <dcbw@redhat.com>
* Tambet Ingo <tambet@gmail.com>
*
* 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.
*
* 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.
*
* (C) Copyright 2007 - 2010 Red Hat, Inc.
* (C) Copyright 2008 Novell, Inc.
*/
#ifndef __NM_SETTINGS_H__
#define __NM_SETTINGS_H__
#include <nm-connection.h>
#include "nm-sysconfig-connection.h"
#include "nm-system-config-interface.h"
#include "nm-device.h"
#define NM_TYPE_SETTINGS (nm_settings_get_type ())
#define NM_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTINGS, NMSettings))
#define NM_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTINGS, NMSettingsClass))
#define NM_IS_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTINGS))
#define NM_IS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_SETTINGS))
#define NM_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTINGS, NMSettingsClass))
#define NM_SETTINGS_UNMANAGED_SPECS "unmanaged-specs"
#define NM_SETTINGS_HOSTNAME "hostname"
#define NM_SETTINGS_CAN_MODIFY "can-modify"
#define NM_SETTINGS_CONNECTION_ADDED "connection-added"
#define NM_SETTINGS_CONNECTION_UPDATED "connection-updated"
#define NM_SETTINGS_CONNECTION_REMOVED "connection-removed"
#define NM_SETTINGS_CONNECTION_VISIBILITY_CHANGED "connection-visibility-changed"
#define NM_SETTINGS_CONNECTIONS_LOADED "connections-loaded"
typedef struct {
GObject parent_instance;
} NMSettings;
typedef struct {
GObjectClass parent_class;
/* Signals */
void (*properties_changed) (NMSettings *self, GHashTable *properties);
void (*connection_added) (NMSettings *self, NMConnection *connection);
void (*connection_updated) (NMSettings *self, NMConnection *connection);
void (*connection_removed) (NMSettings *self, NMConnection *connection);
void (*connection_visibility_changed) (NMSettings *self, NMConnection *connection);
void (*connections_loaded) (NMSettings *self);
} NMSettingsClass;
GType nm_settings_get_type (void);
NMSettings *nm_settings_new (const char *config_file,
const char *plugins,
GError **error);
typedef void (*NMSettingsForEachFunc) (NMSettings *settings,
NMSysconfigConnection *connection,
gpointer user_data);
void nm_settings_for_each_connection (NMSettings *settings,
NMSettingsForEachFunc for_each_func,
gpointer user_data);
/* Returns a list of NMSysconfigConnections. Caller must free the list with
* g_slist_free().
*/
GSList *nm_settings_get_connections (NMSettings *settings);
NMSysconfigConnection *nm_settings_get_connection_by_path (NMSettings *settings,
const char *path);
const GSList *nm_settings_get_unmanaged_specs (NMSettings *self);
char *nm_settings_get_hostname (NMSettings *self);
void nm_settings_device_added (NMSettings *self, NMDevice *device);
void nm_settings_device_removed (NMSettings *self, NMDevice *device);
#endif /* __NM_SETTINGS_H__ */
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager system settings service
*
* Søren Sandmann <sandmann@daimi.au.dk>
* Dan Williams <dcbw@redhat.com>
* Tambet Ingo <tambet@gmail.com>
*
* 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.
*
* 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.
*
* (C) Copyright 2007 - 2009 Red Hat, Inc.
* (C) Copyright 2008 Novell, Inc.
*/
#ifndef __NM_SYSCONFIG_SETTINGS_H__
#define __NM_SYSCONFIG_SETTINGS_H__
#include <nm-connection.h>
#include "nm-sysconfig-connection.h"
#include "nm-system-config-interface.h"
#include "nm-device.h"
#define NM_TYPE_SYSCONFIG_SETTINGS (nm_sysconfig_settings_get_type ())
#define NM_SYSCONFIG_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SYSCONFIG_SETTINGS, NMSysconfigSettings))
#define NM_SYSCONFIG_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SYSCONFIG_SETTINGS, NMSysconfigSettingsClass))
#define NM_IS_SYSCONFIG_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SYSCONFIG_SETTINGS))
#define NM_IS_SYSCONFIG_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_SYSCONFIG_SETTINGS))
#define NM_SYSCONFIG_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SYSCONFIG_SETTINGS, NMSysconfigSettingsClass))
#define NM_SYSCONFIG_SETTINGS_UNMANAGED_SPECS "unmanaged-specs"
#define NM_SYSCONFIG_SETTINGS_HOSTNAME "hostname"
#define NM_SYSCONFIG_SETTINGS_CAN_MODIFY "can-modify"
#define NM_SYSCONFIG_SETTINGS_CONNECTION_ADDED "connection-added"
#define NM_SYSCONFIG_SETTINGS_CONNECTION_UPDATED "connection-updated"
#define NM_SYSCONFIG_SETTINGS_CONNECTION_REMOVED "connection-removed"
#define NM_SYSCONFIG_SETTINGS_CONNECTION_VISIBILITY_CHANGED "connection-visibility-changed"
#define NM_SYSCONFIG_SETTINGS_CONNECTIONS_LOADED "connections-loaded"
typedef struct {
GObject parent_instance;
} NMSysconfigSettings;
typedef struct {
GObjectClass parent_class;
/* Signals */
void (*properties_changed) (NMSysconfigSettings *self, GHashTable *properties);
void (*connection_added) (NMSysconfigSettings *self, NMConnection *connection);
void (*connection_updated) (NMSysconfigSettings *self, NMConnection *connection);
void (*connection_removed) (NMSysconfigSettings *self, NMConnection *connection);
void (*connection_visibility_changed) (NMSysconfigSettings *self, NMConnection *connection);
void (*connections_loaded) (NMSysconfigSettings *self);
} NMSysconfigSettingsClass;
GType nm_sysconfig_settings_get_type (void);
NMSysconfigSettings *nm_sysconfig_settings_new (const char *config_file,
const char *plugins,
GError **error);
typedef void (*NMSysconfigSettingsForEachFunc) (NMSysconfigSettings *settings,
NMSysconfigConnection *connection,
gpointer user_data);
void nm_sysconfig_settings_for_each_connection (NMSysconfigSettings *settings,
NMSysconfigSettingsForEachFunc for_each_func,
gpointer user_data);
/* Returns a list of NMSysconfigConnections. Caller must free the list with
* g_slist_free().
*/
GSList *nm_sysconfig_settings_get_connections (NMSysconfigSettings *settings);
NMSysconfigConnection *nm_sysconfig_settings_get_connection_by_path (NMSysconfigSettings *settings,
const char *path);
const GSList *nm_sysconfig_settings_get_unmanaged_specs (NMSysconfigSettings *self);
char *nm_sysconfig_settings_get_hostname (NMSysconfigSettings *self);
void nm_sysconfig_settings_device_added (NMSysconfigSettings *self, NMDevice *device);
void nm_sysconfig_settings_device_removed (NMSysconfigSettings *self, NMDevice *device);
#endif /* __NM_SYSCONFIG_SETTINGS_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment