Commit b3959aef authored by Dan Williams's avatar Dan Williams

core: rename NMSysconfigConnection -> NMSettingsConnection

parent b92e3cca
......@@ -45,7 +45,7 @@ IGNORE_HFILES= \
nm-device-wifi-bindings.h \
nm-dhcp4-config-bindings.h \
nm-dhcp6-config-bindings.h \
nm-sysconfig-connection-glue.h \
nm-settings-connection-glue.h \
nm-ip4-config-bindings.h \
nm-ip6-config-bindings.h \
nm-settings-bindings.h \
......
......@@ -18,7 +18,7 @@ EXTRA_DIST = \
nm-manager.xml \
nm-manager-client.xml \
nm-settings.xml \
nm-sysconfig-connection.xml \
nm-settings-connection.xml \
nm-vpn-plugin.xml \
nm-vpn-connection.xml \
nm-ppp-manager.xml \
......
......@@ -42,7 +42,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<xi:include href="nm-dhcp4-config.xml"/>
<xi:include href="nm-dhcp6-config.xml"/>
<xi:include href="nm-settings.xml"/>
<xi:include href="nm-sysconfig-connection.xml"/>
<xi:include href="nm-settings-connection.xml"/>
<xi:include href="nm-active-connection.xml"/>
<xi:include href="nm-agent-manager.xml"/>
<xi:include href="nm-vpn-connection.xml"/>
......
......@@ -14,7 +14,7 @@
update request, and will be either stored in persistent storage or
given to a Secret Agent for storage, depending on the request.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_sysconfig_connection_update"/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_settings_connection_update"/>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<arg name="properties" type="a{sa{sv}}" direction="in">
<tp:docstring>
......@@ -27,7 +27,7 @@
<tp:docstring>
Delete the connection.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_sysconfig_connection_delete"/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_settings_connection_delete"/>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
</method>
......@@ -38,7 +38,7 @@
to the network, as those are often protected. Secrets must
be requested separately using the GetSecrets() call.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_sysconfig_connection_get_settings"/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_settings_connection_get_settings"/>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<arg name="settings" type="a{sa{sv}}" direction="out" tp:type="String_String_Variant_Map_Map">
<tp:docstring>
......@@ -54,7 +54,7 @@
the requestor's session will be returned. The user will never
be prompted for secrets as a result of this request.
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_sysconfig_connection_get_secrets"/>
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_settings_connection_get_secrets"/>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<arg name="setting_name" type="s" direction="in">
<tp:docstring>
......
......@@ -12,7 +12,7 @@ BUILT_SOURCES = \
nm-device-ethernet-bindings.h \
nm-device-wifi-bindings.h \
nm-device-bt-bindings.h \
nm-sysconfig-connection-bindings.h \
nm-settings-connection-bindings.h \
nm-device-wimax-bindings.h \
nm-settings-bindings.h \
nm-vpn-connection-bindings.h \
......@@ -198,8 +198,8 @@ nm-access-point-bindings.h: $(top_srcdir)/introspection/nm-access-point.xml
nm-settings-bindings.h: $(top_srcdir)/introspection/nm-settings.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_settings --mode=glib-client --output=$@ $<
nm-sysconfig-connection-bindings.h: $(top_srcdir)/introspection/nm-sysconfig-connection.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_sysconfig_connection --mode=glib-client --output=$@ $<
nm-settings-connection-bindings.h: $(top_srcdir)/introspection/nm-settings-connection.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_settings_connection --mode=glib-client --output=$@ $<
nm-vpn-connection-bindings.h: $(top_srcdir)/introspection/nm-vpn-connection.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_vpn_connection --mode=glib-client --output=$@ $<
......
......@@ -29,7 +29,7 @@
#include "nm-remote-connection.h"
#include "nm-remote-connection-private.h"
#include "nm-dbus-glib-types.h"
#include "nm-sysconfig-connection-bindings.h"
#include "nm-settings-connection-bindings.h"
#define NM_REMOTE_CONNECTION_BUS "bus"
......
......@@ -31,7 +31,7 @@
#include "nm-agent-manager.h"
#include "nm-secret-agent.h"
#include "nm-manager-auth.h"
#include "nm-sysconfig-connection.h"
#include "nm-settings-connection.h"
#include "nm-dbus-glib-types.h"
G_DEFINE_TYPE (NMAgentManager, nm_agent_manager, G_TYPE_OBJECT)
......@@ -571,9 +571,9 @@ request_start_secrets (gpointer user_data)
req, req->setting_name);
/* Grab any secrets from persistent storage */
secrets = nm_sysconfig_connection_get_secrets (NM_SYSCONFIG_CONNECTION (req->connection),
req->setting_name,
&error);
secrets = nm_settings_connection_get_secrets (NM_SETTINGS_CONNECTION (req->connection),
req->setting_name,
&error);
if (secrets)
setting_secrets = g_hash_table_lookup (secrets, req->setting_name);
......@@ -795,7 +795,7 @@ nm_agent_manager_get_secrets (NMAgentManager *self,
g_return_val_if_fail (self != NULL, 0);
g_return_val_if_fail (connection != NULL, 0);
g_return_val_if_fail (NM_IS_SYSCONFIG_CONNECTION (connection), 0);
g_return_val_if_fail (NM_IS_SETTINGS_CONNECTION (connection), 0);
g_return_val_if_fail (callback != NULL, 0);
nm_log_dbg (LOGD_SETTINGS,
......
......@@ -57,7 +57,7 @@
#include "nm-bluez-manager.h"
#include "nm-bluez-common.h"
#include "nm-settings.h"
#include "nm-sysconfig-connection.h"
#include "nm-settings-connection.h"
#include "nm-manager-auth.h"
#include "nm-agent-manager.h"
#include "NetworkManagerUtils.h"
......@@ -480,7 +480,7 @@ nm_manager_update_state (NMManager *manager)
}
static void
ignore_cb (NMSysconfigConnection *connection, GError *error, gpointer user_data)
ignore_cb (NMSettingsConnection *connection, GError *error, gpointer user_data)
{
}
......@@ -509,7 +509,7 @@ update_active_connection_timestamp (NMManager *manager, NMDevice *device)
if (nm_setting_connection_get_read_only (s_con))
return;
nm_sysconfig_connection_commit_changes (NM_SYSCONFIG_CONNECTION (connection), ignore_cb, NULL);
nm_settings_connection_commit_changes (NM_SETTINGS_CONNECTION (connection), ignore_cb, NULL);
}
static void
......@@ -918,7 +918,7 @@ get_active_connections (NMManager *manager, NMConnection *filter)
static void
connections_changed (NMSettings *settings,
NMSysconfigConnection *connection,
NMSettingsConnection *connection,
NMManager *manager)
{
bluez_manager_resync_devices (manager);
......@@ -1995,7 +1995,7 @@ static void
pending_activate (NMManager *self, PendingActivation *pending)
{
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
NMSysconfigConnection *connection;
NMSettingsConnection *connection;
const char *path = NULL;
GError *error = NULL;
......@@ -2069,7 +2069,7 @@ impl_manager_activate_connection (NMManager *self,
static void
activation_add_done (NMSettings *self,
NMSysconfigConnection *connection,
NMSettingsConnection *connection,
GError *error,
DBusGMethodInvocation *context,
gpointer user_data)
......@@ -3097,13 +3097,13 @@ nm_manager_get (NMSettings *settings,
G_CALLBACK (system_unmanaged_devices_changed_cb), singleton);
g_signal_connect (priv->settings, "notify::" NM_SETTINGS_HOSTNAME,
G_CALLBACK (system_hostname_changed_cb), singleton);
g_signal_connect (priv->settings, NM_SETTINGS_CONNECTION_ADDED,
g_signal_connect (priv->settings, NM_SETTINGS_SIGNAL_CONNECTION_ADDED,
G_CALLBACK (connections_changed), singleton);
g_signal_connect (priv->settings, NM_SETTINGS_CONNECTION_UPDATED,
g_signal_connect (priv->settings, NM_SETTINGS_SIGNAL_CONNECTION_UPDATED,
G_CALLBACK (connections_changed), singleton);
g_signal_connect (priv->settings, NM_SETTINGS_CONNECTION_REMOVED,
g_signal_connect (priv->settings, NM_SETTINGS_SIGNAL_CONNECTION_REMOVED,
G_CALLBACK (connections_changed), singleton);
g_signal_connect (priv->settings, NM_SETTINGS_CONNECTION_VISIBILITY_CHANGED,
g_signal_connect (priv->settings, NM_SETTINGS_SIGNAL_CONNECTION_VISIBILITY_CHANGED,
G_CALLBACK (connections_changed), singleton);
dbus_g_connection_register_g_object (bus, NM_DBUS_PATH, G_OBJECT (singleton));
......
......@@ -741,7 +741,7 @@ auto_activate_device (gpointer user_data)
/* Ignore connections that aren't visible to any logged-in users */
if (ignore == FALSE) {
if (!nm_sysconfig_connection_is_visible (NM_SYSCONFIG_CONNECTION (candidate)))
if (!nm_settings_connection_is_visible (NM_SETTINGS_CONNECTION (candidate)))
ignore = TRUE;
}
......@@ -1099,12 +1099,12 @@ connection_removed (NMSettings *settings,
static void
connection_visibility_changed (NMSettings *settings,
NMSysconfigConnection *connection,
NMSettingsConnection *connection,
gpointer user_data)
{
NMPolicy *policy = user_data;
if (nm_sysconfig_connection_is_visible (connection))
if (nm_settings_connection_is_visible (connection))
schedule_activate_all (policy);
else
_deactivate_if_active (policy->manager, NM_CONNECTION (connection));
......@@ -1169,11 +1169,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_SETTINGS_CONNECTIONS_LOADED, connections_loaded);
_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,
_connect_settings_signal (policy, NM_SETTINGS_SIGNAL_CONNECTIONS_LOADED, connections_loaded);
_connect_settings_signal (policy, NM_SETTINGS_SIGNAL_CONNECTION_ADDED, connection_added);
_connect_settings_signal (policy, NM_SETTINGS_SIGNAL_CONNECTION_UPDATED, connection_updated);
_connect_settings_signal (policy, NM_SETTINGS_SIGNAL_CONNECTION_REMOVED, connection_removed);
_connect_settings_signal (policy, NM_SETTINGS_SIGNAL_CONNECTION_VISIBILITY_CHANGED,
connection_visibility_changed);
initialized = TRUE;
......
......@@ -9,7 +9,7 @@ noinst_LTLIBRARIES = libsettings.la
BUILT_SOURCES = \
nm-settings-glue.h \
nm-sysconfig-connection-glue.h
nm-settings-connection-glue.h
libsettings_la_SOURCES = \
nm-settings.c \
......@@ -21,8 +21,8 @@ libsettings_la_SOURCES = \
nm-settings-error.h \
nm-system-config-interface.c \
nm-system-config-interface.h \
nm-sysconfig-connection.c \
nm-sysconfig-connection.h \
nm-settings-connection.c \
nm-settings-connection.h \
nm-default-wired-connection.c \
nm-default-wired-connection.h
......@@ -56,8 +56,8 @@ libsettings_la_LDFLAGS = -rdynamic
nm-settings-glue.h: $(top_srcdir)/introspection/nm-settings.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_settings --mode=glib-server --output=$@ $<
nm-sysconfig-connection-glue.h: $(top_srcdir)/introspection/nm-sysconfig-connection.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_sysconfig_connection --mode=glib-server --output=$@ $<
nm-settings-connection-glue.h: $(top_srcdir)/introspection/nm-settings-connection.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_settings_connection --mode=glib-server --output=$@ $<
CLEANFILES = \
$(BUILT_SOURCES)
......
......@@ -16,7 +16,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* (C) Copyright 2008 Novell, Inc.
* (C) Copyright 2009 Red Hat, Inc.
* (C) Copyright 2009 - 2011 Red Hat, Inc.
*/
#include <netinet/ether.h>
......@@ -32,7 +32,7 @@
#include "nm-marshal.h"
#include "nm-default-wired-connection.h"
G_DEFINE_TYPE (NMDefaultWiredConnection, nm_default_wired_connection, NM_TYPE_SYSCONFIG_CONNECTION)
G_DEFINE_TYPE (NMDefaultWiredConnection, nm_default_wired_connection, NM_TYPE_SETTINGS_CONNECTION)
#define NM_DEFAULT_WIRED_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEFAULT_WIRED_CONNECTION, NMDefaultWiredConnectionPrivate))
......@@ -85,8 +85,8 @@ nm_default_wired_connection_get_device (NMDefaultWiredConnection *wired)
}
static void
commit_changes (NMSysconfigConnection *connection,
NMSysconfigConnectionCommitFunc callback,
commit_changes (NMSettingsConnection *connection,
NMSettingsConnectionCommitFunc callback,
gpointer user_data)
{
NMDefaultWiredConnection *self = NM_DEFAULT_WIRED_CONNECTION (connection);
......@@ -101,17 +101,17 @@ commit_changes (NMSysconfigConnection *connection,
}
static void
do_delete (NMSysconfigConnection *connection,
NMSysconfigConnectionDeleteFunc callback,
do_delete (NMSettingsConnection *connection,
NMSettingsConnectionDeleteFunc callback,
gpointer user_data)
{
NMDefaultWiredConnection *self = NM_DEFAULT_WIRED_CONNECTION (connection);
NMDefaultWiredConnectionPrivate *priv = NM_DEFAULT_WIRED_CONNECTION_GET_PRIVATE (connection);
g_signal_emit (self, signals[DELETED], 0, priv->mac);
NM_SYSCONFIG_CONNECTION_CLASS (nm_default_wired_connection_parent_class)->delete (connection,
callback,
user_data);
NM_SETTINGS_CONNECTION_CLASS (nm_default_wired_connection_parent_class)->delete (connection,
callback,
user_data);
}
/****************************************************************/
......@@ -237,7 +237,7 @@ static void
nm_default_wired_connection_class_init (NMDefaultWiredConnectionClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
NMSysconfigConnectionClass *sysconfig_class = NM_SYSCONFIG_CONNECTION_CLASS (klass);
NMSettingsConnectionClass *settings_class = NM_SETTINGS_CONNECTION_CLASS (klass);
g_type_class_add_private (klass, sizeof (NMDefaultWiredConnectionPrivate));
......@@ -246,8 +246,8 @@ nm_default_wired_connection_class_init (NMDefaultWiredConnectionClass *klass)
object_class->set_property = set_property;
object_class->get_property = get_property;
object_class->finalize = finalize;
sysconfig_class->commit_changes = commit_changes;
sysconfig_class->delete = do_delete;
settings_class->commit_changes = commit_changes;
settings_class->delete = do_delete;
/* Properties */
g_object_class_install_property
......
......@@ -16,13 +16,13 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* (C) Copyright 2008 Novell, Inc.
* (C) Copyright 2009 Red Hat, Inc.
* (C) Copyright 2009 - 2011 Red Hat, Inc.
*/
#ifndef NM_DEFAULT_WIRED_CONNECTION_H
#define NM_DEFAULT_WIRED_CONNECTION_H
#include "nm-sysconfig-connection.h"
#include "nm-settings-connection.h"
#include "nm-device.h"
G_BEGIN_DECLS
......@@ -39,11 +39,11 @@ G_BEGIN_DECLS
#define NM_DEFAULT_WIRED_CONNECTION_READ_ONLY "read-only"
typedef struct {
NMSysconfigConnection parent;
NMSettingsConnection parent;
} NMDefaultWiredConnection;
typedef struct {
NMSysconfigConnectionClass parent;
NMSettingsConnectionClass parent;
} NMDefaultWiredConnectionClass;
GType nm_default_wired_connection_get_type (void);
......
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager system settings service
*
* 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 2008 Novell, Inc.
* (C) Copyright 2008 - 2011 Red Hat, Inc.
*/
#ifndef NM_SETTINGS_CONNECTION_H
#define NM_SETTINGS_CONNECTION_H
#include <nm-connection.h>
#include <dbus/dbus-glib.h>
G_BEGIN_DECLS
#define NM_TYPE_SETTINGS_CONNECTION (nm_settings_connection_get_type ())
#define NM_SETTINGS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTINGS_CONNECTION, NMSettingsConnection))
#define NM_SETTINGS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTINGS_CONNECTION, NMSettingsConnectionClass))
#define NM_IS_SETTINGS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTINGS_CONNECTION))
#define NM_IS_SETTINGS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_SETTINGS_CONNECTION))
#define NM_SETTINGS_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTINGS_CONNECTION, NMSettingsConnectionClass))
#define NM_SETTINGS_CONNECTION_UPDATED "updated"
#define NM_SETTINGS_CONNECTION_REMOVED "removed"
#define NM_SETTINGS_CONNECTION_VISIBLE "visible"
typedef struct _NMSettingsConnection NMSettingsConnection;
typedef struct _NMSettingsConnectionClass NMSettingsConnectionClass;
typedef void (*NMSettingsConnectionCommitFunc) (NMSettingsConnection *connection,
GError *error,
gpointer user_data);
typedef void (*NMSettingsConnectionDeleteFunc) (NMSettingsConnection *connection,
GError *error,
gpointer user_data);
struct _NMSettingsConnection {
NMConnection parent;
};
struct _NMSettingsConnectionClass {
NMConnectionClass parent;
void (*commit_changes) (NMSettingsConnection *connection,
NMSettingsConnectionCommitFunc callback,
gpointer user_data);
void (*delete) (NMSettingsConnection *connection,
NMSettingsConnectionDeleteFunc callback,
gpointer user_data);
gboolean (*supports_secrets) (NMSettingsConnection *connection,
const char *setting_name);
};
GType nm_settings_connection_get_type (void);
void nm_settings_connection_commit_changes (NMSettingsConnection *connection,
NMSettingsConnectionCommitFunc callback,
gpointer user_data);
gboolean nm_settings_connection_replace_settings (NMSettingsConnection *self,
NMConnection *new_settings,
GError **error);
void nm_settings_connection_replace_and_commit (NMSettingsConnection *self,
NMConnection *new_settings,
NMSettingsConnectionCommitFunc callback,
gpointer user_data);
void nm_settings_connection_delete (NMSettingsConnection *connection,
NMSettingsConnectionDeleteFunc callback,
gpointer user_data);
GHashTable *nm_settings_connection_get_secrets (NMSettingsConnection *connection,
const char *setting_name,
GError **error);
gboolean nm_settings_connection_is_visible (NMSettingsConnection *self);
void nm_settings_connection_recheck_visibility (NMSettingsConnection *self);
G_END_DECLS
#endif /* NM_SETTINGS_CONNECTION_H */
This diff is collapsed.
......@@ -28,7 +28,7 @@
#include <nm-connection.h>
#include "nm-sysconfig-connection.h"
#include "nm-settings-connection.h"
#include "nm-system-config-interface.h"
#include "nm-device.h"
......@@ -43,11 +43,11 @@
#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"
#define NM_SETTINGS_SIGNAL_CONNECTION_ADDED "connection-added"
#define NM_SETTINGS_SIGNAL_CONNECTION_UPDATED "connection-updated"
#define NM_SETTINGS_SIGNAL_CONNECTION_REMOVED "connection-removed"
#define NM_SETTINGS_SIGNAL_CONNECTION_VISIBILITY_CHANGED "connection-visibility-changed"
#define NM_SETTINGS_SIGNAL_CONNECTIONS_LOADED "connections-loaded"
typedef struct {
GObject parent_instance;
......@@ -77,7 +77,7 @@ NMSettings *nm_settings_new (const char *config_file,
GError **error);
typedef void (*NMSettingsForEachFunc) (NMSettings *settings,
NMSysconfigConnection *connection,
NMSettingsConnection *connection,
gpointer user_data);
void nm_settings_for_each_connection (NMSettings *settings,
......@@ -85,7 +85,7 @@ void nm_settings_for_each_connection (NMSettings *settings,
gpointer user_data);
typedef void (*NMSettingsAddCallback) (NMSettings *settings,
NMSysconfigConnection *connection,
NMSettingsConnection *connection,
GError *error,
DBusGMethodInvocation *context,
gpointer user_data);
......@@ -96,13 +96,13 @@ void nm_settings_add_connection (NMSettings *self,
NMSettingsAddCallback callback,
gpointer user_data);
/* Returns a list of NMSysconfigConnections. Caller must free the list with
/* Returns a list of NMSettingsConnections. 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);
NMSettingsConnection *nm_settings_get_connection_by_path (NMSettings *settings,
const char *path);
const GSList *nm_settings_get_unmanaged_specs (NMSettings *self);
......
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager system settings service
*
* 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 2008 Novell, Inc.
* (C) Copyright 2008 - 2011 Red Hat, Inc.
*/
#ifndef NM_SYSCONFIG_CONNECTION_H
#define NM_SYSCONFIG_CONNECTION_H
#include <nm-connection.h>
#include <dbus/dbus-glib.h>
G_BEGIN_DECLS
#define NM_TYPE_SYSCONFIG_CONNECTION (nm_sysconfig_connection_get_type ())
#define NM_SYSCONFIG_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SYSCONFIG_CONNECTION, NMSysconfigConnection))
#define NM_SYSCONFIG_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SYSCONFIG_CONNECTION, NMSysconfigConnectionClass))
#define NM_IS_SYSCONFIG_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SYSCONFIG_CONNECTION))
#define NM_IS_SYSCONFIG_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_SYSCONFIG_CONNECTION))
#define NM_SYSCONFIG_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SYSCONFIG_CONNECTION, NMSysconfigConnectionClass))
#define NM_SYSCONFIG_CONNECTION_UPDATED "updated"
#define NM_SYSCONFIG_CONNECTION_REMOVED "removed"
#define NM_SYSCONFIG_CONNECTION_VISIBLE "visible"
typedef struct _NMSysconfigConnection NMSysconfigConnection;
typedef struct _NMSysconfigConnectionClass NMSysconfigConnectionClass;
typedef void (*NMSysconfigConnectionCommitFunc) (NMSysconfigConnection *connection,
GError *error,
gpointer user_data);
typedef void (*NMSysconfigConnectionDeleteFunc) (NMSysconfigConnection *connection,
GError *error,
gpointer user_data);
struct _NMSysconfigConnection {
NMConnection parent;
};
struct _NMSysconfigConnectionClass {
NMConnectionClass parent;
void (*commit_changes) (NMSysconfigConnection *connection,
NMSysconfigConnectionCommitFunc callback,
gpointer user_data);
void (*delete) (NMSysconfigConnection *connection,
NMSysconfigConnectionDeleteFunc callback,
gpointer user_data);
gboolean (*supports_secrets) (NMSysconfigConnection *connection,
const char *setting_name);
};
GType nm_sysconfig_connection_get_type (void);
void nm_sysconfig_connection_commit_changes (NMSysconfigConnection *connection,
NMSysconfigConnectionCommitFunc callback,
gpointer user_data);
gboolean nm_sysconfig_connection_replace_settings (NMSysconfigConnection *self,
NMConnection *new_settings,
GError **error);
void nm_sysconfig_connection_replace_and_commit (NMSysconfigConnection *self,
NMConnection *new_settings,
NMSysconfigConnectionCommitFunc callback,
gpointer user_data);
void nm_sysconfig_connection_delete (NMSysconfigConnection *connection,
NMSysconfigConnectionDeleteFunc callback,
gpointer user_data);
GHashTable *nm_sysconfig_connection_get_secrets (NMSysconfigConnection *connection,
const char *setting_name,
GError **error);
gboolean nm_sysconfig_connection_is_visible (NMSysconfigConnection *self);
void nm_sysconfig_connection_recheck_visibility (NMSysconfigConnection *self);
G_END_DECLS
#endif /* NM_SYSCONFIG_CONNECTION_H */
......@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2010 Red Hat, Inc.
* Copyright (C) 2007 - 2011 Red Hat, Inc.
* Copyright (C) 2008 Novell, Inc.
*/
......@@ -73,7 +73,7 @@ interface_init (gpointer g_iface)
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
NM_TYPE_SYSCONFIG_CONNECTION);
NM_TYPE_SETTINGS_CONNECTION);
g_signal_new (NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED,
iface_type,
......@@ -146,7 +146,7 @@ nm_system_config_interface_get_unmanaged_specs (NMSystemConfigInterface *config)
return NULL;
}
NMSysconfigConnection *
NMSettingsConnection *
nm_system_config_interface_add_connection (NMSystemConfigInterface *config,
NMConnection *connection,
GError **error)
......
......@@ -15,7 +15,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2010 Red Hat, Inc.
* Copyright (C) 2007 - 2011 Red Hat, Inc.
* Copyright (C) 2008 Novell, Inc.
*/
......@@ -25,7 +25,7 @@
#include <glib.h>
#include <glib-object.h>
#include <nm-connection.h>
#include <nm-sysconfig-connection.h>
#include <nm-settings-connection.h>
G_BEGIN_DECLS
......@@ -90,7 +90,7 @@ struct _NMSystemConfigInterface {
/* Called when the plugin is loaded to initialize it */
void (*init) (NMSystemConfigInterface *config);
/* Returns a GSList of NMSysconfigConnection objects that represent
/* Returns a GSList of NMSettingsConnection objects that represent
* connections the plugin knows about. The returned list is freed by the
* system settings service.
*/
......@@ -118,18 +118,18 @@ struct _NMSystemConfigInterface {
/*
* Save the given connection to backing storage, and return a new
* NMSysconfigConnection subclass that contains the same settings as the
* NMSettingsConnection subclass that contains the same settings as the
* original connection.
*/
NMSysconfigConnection * (*add_connection) (NMSystemConfigInterface *config,
NMConnection *connection,
GError **error);
NMSettingsConnection * (*add_connection) (NMSystemConfigInterface *config,
NMConnection *connection,
GError **error);
/* Signals */
/* Emitted when a new connection has been found by the plugin */
void (*connection_added) (NMSystemConfigInterface *config,
NMSysconfigConnection *connection);
NMSettingsConnection *connection);
/* Emitted when the list of unmanaged device specifications changes */
void (*unmanaged_specs_changed) (NMSystemConfigInterface *config);
......@@ -144,9 +144,9 @@ GSList *nm_system_config_interface_get_connections (NMSystemConfigInterface *con
GSList *nm_system_config_interface_get_unmanaged_specs (NMSystemConfigInterface *config);
NMSysconfigConnection *nm_system_config_interface_add_connection (NMSystemConfigInterface *config,
NMConnection *connection,
GError **error);
NMSettingsConnection *nm_system_config_interface_add_connection (NMSystemConfigInterface *config,
NMConnection *connection,
GError **error);
G_END_DECLS
......
......@@ -40,7 +40,7 @@
#include "writer.h"
#include "nm-inotify-helper.h"
G_DEFINE_TYPE (NMIfcfgConnection, nm_ifcfg_connection, NM_TYPE_SYSCONFIG_CONNECTION)
G_DEFINE_TYPE (NMIfcfgConnection, nm_ifcfg_connection, NM_TYPE_SETTINGS_CONNECTION)
#define NM_IFCFG_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_IFCFG_CONNECTION, NMIfcfgConnectionPrivate))
......@@ -134,7 +134,7 @@ nm_ifcfg_connection_new (const char *full_path,
goto out;