Commit 6b79d40a authored by Tambet Ingo's avatar Tambet Ingo

2007-11-07 Tambet Ingo <tambet@gmail.com>

        Rework NMSetting structures: Move each setting to it's own file.
        Convert to GObject. Remove home grown setting types and use
GTypes.
        Use GObject property introspection for hash conversion,
enumerating
        properties, etc.

        * libnm-util/nm-setting-connection.[ch]
        * libnm-util/nm-setting-ip4-config.[ch]
        * libnm-util/nm-setting-ppp.[ch]
        * libnm-util/nm-setting-vpn.[ch]
        * libnm-util/nm-setting-vpn-properties.[ch]
        * libnm-util/nm-setting-wired.[ch]
        * libnm-util/nm-setting-wireless.[ch]
        * libnm-util/nm-setting-wireless-security.[ch]

        New files, each containing a setting.

        * libnm-util/nm-setting-template.[ch]: A template for creating
        * new
        settings. To use it, just replace 'template' with the new
setting
        name, and you're half-way done.

        * libnm-util/nm-setting.c: Convert to GObject and use GObject
        introspection instead of internal types and tables.

        * libnm-util/nm-connection.c: Adapt the new NMSetting work.

        * libnm-util/nm-param-spec-specialized.[ch]: Implement. Handles
        GValue types defined by dbus-glib for composed types like
collections,
        structures and maps.

        * src/*: The API of NMSetting and NMConnection changed a bit:
        * Getting
        a setting from connection takes the setting type now. Also,
since
        the settings are in multiple files, include relevant settings.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3068 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent 2682e916
2007-11-07 Tambet Ingo <tambet@gmail.com>
Rework NMSetting structures: Move each setting to it's own file.
Convert to GObject. Remove home grown setting types and use GTypes.
Use GObject property introspection for hash conversion, enumerating
properties, etc.
* libnm-util/nm-setting-connection.[ch]
* libnm-util/nm-setting-ip4-config.[ch]
* libnm-util/nm-setting-ppp.[ch]
* libnm-util/nm-setting-vpn.[ch]
* libnm-util/nm-setting-vpn-properties.[ch]
* libnm-util/nm-setting-wired.[ch]
* libnm-util/nm-setting-wireless.[ch]
* libnm-util/nm-setting-wireless-security.[ch]
New files, each containing a setting.
* libnm-util/nm-setting-template.[ch]: A template for creating new
settings. To use it, just replace 'template' with the new setting
name, and you're half-way done.
* libnm-util/nm-setting.c: Convert to GObject and use GObject
introspection instead of internal types and tables.
* libnm-util/nm-connection.c: Adapt the new NMSetting work.
* libnm-util/nm-param-spec-specialized.[ch]: Implement. Handles
GValue types defined by dbus-glib for composed types like collections,
structures and maps.
* src/*: The API of NMSetting and NMConnection changed a bit: Getting
a setting from connection takes the setting type now. Also, since
the settings are in multiple files, include relevant settings.
2007-10-31 Saleem Abdulrasool <compnerd@compnerd.org>
* configure.in:
......
......@@ -11,13 +11,34 @@ libnm_util_la_CPPFLAGS = \
-DGNOME_DISABLE_DEPRECATED \
-DGNOMELOCALEDIR=\"$(datadir)/locale\"
libnm_util_include_HEADERS = \
nm-connection.h \
nm-param-spec-specialized.h \
nm-setting.h \
nm-setting-connection.h \
nm-setting-ip4-config.h \
nm-setting-ppp.h \
nm-setting-wired.h \
nm-setting-wireless.h \
nm-setting-wireless-security.h \
nm-setting-vpn.h \
nm-setting-vpn-properties.h \
nm-utils.h
libnm_util_la_SOURCES= \
nm-connection.c \
nm-connection.h \
nm-param-spec-specialized.c \
nm-setting.c \
nm-setting.h \
nm-setting-connection.c \
nm-setting-ip4-config.c \
nm-setting-ppp.c \
nm-setting-wired.c \
nm-setting-wireless.c \
nm-setting-wireless-security.c \
nm-setting-vpn.c \
nm-setting-vpn-properties.c \
nm-utils.c \
nm-utils.h
$(libnm_util_include_HEADERS)
libnm_util_la_LDFLAGS= $(GLIB_LIBS) $(DBUS_LIBS)
......@@ -25,11 +46,6 @@ libnm_util_la_CFLAGS=-fPIC
libnm_util_includedir=$(includedir)/NetworkManager
libnm_util_include_HEADERS = \
nm-connection.h \
nm-setting.h \
nm-utils.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libnm-util.pc
......
This diff is collapsed.
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
#ifndef NM_CONNECTION_H
#define NM_CONNECTION_H
#include <glib.h>
#include <glib-object.h>
#include "nm-setting.h"
#include <nm-setting.h>
G_BEGIN_DECLS
......@@ -30,16 +32,19 @@ GType nm_connection_get_type (void);
NMConnection *nm_connection_new (void);
NMConnection *nm_connection_new_from_hash (GHashTable *hash);
void nm_connection_add_setting (NMConnection *connection,
NMSetting *setting);
NMSetting *setting);
NMSetting *nm_connection_get_setting (NMConnection *connection,
const char *setting_name);
GType setting_type);
NMSetting *nm_connection_get_setting_by_name (NMConnection *connection,
const char *name);
gboolean nm_connection_replace_settings (NMConnection *connection,
GHashTable *new_settings);
GHashTable *new_settings);
gboolean nm_connection_compare (NMConnection *connection,
NMConnection *other);
NMConnection *other);
gboolean nm_connection_verify (NMConnection *connection);
......@@ -52,18 +57,18 @@ void nm_connection_update_secrets (NMConnection *connection,
GHashTable *secrets);
void nm_connection_for_each_setting_value (NMConnection *connection,
NMSettingValueIterFn func,
gpointer user_data);
NMSettingValueIterFn func,
gpointer user_data);
GHashTable *nm_connection_to_hash (NMConnection *connection);
void nm_connection_dump (NMConnection *connection);
NMSetting *nm_connection_create_setting (const char *name);
void nm_setting_parser_register (const char *name,
NMSettingCreateFn creator);
void nm_setting_register (const char *name,
GType type);
void nm_setting_parser_unregister (const char *name);
void nm_setting_unregister (const char *name);
G_END_DECLS
......
This diff is collapsed.
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
#ifndef NM_PARAM_SPEC_SPECIALIZED_H
#define NM_PARAM_SPEC_SPECIALIZED_H
#include <glib-object.h>
typedef struct _NMParamSpecSpecialized NMParamSpecSpecialized;
#define NM_TYPE_PARAM_SPEC_SPECIALIZED (nm_param_spec_specialized_get_type ())
#define NM_IS_PARAM_SPEC_SPECIALIZED(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), NM_TYPE_PARAM_SPEC_SPECIALIZED))
#define NM_PARAM_SPEC_SPECIALIZED(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), NM_TYPE_PARAM_SPEC_SPECIALIZED, NMParamSpecSpecialized))
GType nm_param_spec_specialized_get_type (void);
GParamSpec *nm_param_spec_specialized (const char *name,
const char *nick,
const char *blurb,
GType specialized_type,
GParamFlags flags);
#endif /* NM_PARAM_SPEC_SPECIALIZED_H */
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
#include <string.h>
#include "nm-setting-connection.h"
G_DEFINE_TYPE (NMSettingConnection, nm_setting_connection, NM_TYPE_SETTING)
enum {
PROP_0,
PROP_NAME,
PROP_TYPE,
PROP_AUTOCONNECT,
PROP_TIMESTAMP,
LAST_PROP
};
NMSetting *nm_setting_connection_new (void)
{
return (NMSetting *) g_object_new (NM_TYPE_SETTING_CONNECTION, NULL);
}
static gint
find_setting_by_name (gconstpointer a, gconstpointer b)
{
NMSetting *setting = NM_SETTING (a);
const char *str = (const char *) b;
return strcmp (nm_setting_get_name (setting), str);
}
static gboolean
verify (NMSetting *setting, GSList *all_settings)
{
NMSettingConnection *self = NM_SETTING_CONNECTION (setting);
if (!self->name || !strlen (self->name))
return FALSE;
if (!self->type || !strlen (self->type))
return FALSE;
/* Make sure the corresponding 'type' item is present */
if (all_settings && !g_slist_find_custom (all_settings, self->type, find_setting_by_name)) {
g_warning ("Required setting '%s' not found.", self->type);
return FALSE;
}
return TRUE;
}
static void
nm_setting_connection_init (NMSettingConnection *setting)
{
((NMSetting *) setting)->name = g_strdup (NM_SETTING_CONNECTION_SETTING_NAME);
}
static void
finalize (GObject *object)
{
NMSettingConnection *self = NM_SETTING_CONNECTION (object);
g_free (self->name);
g_free (self->type);
G_OBJECT_CLASS (nm_setting_connection_parent_class)->finalize (object);
}
static void
set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec)
{
NMSettingConnection *setting = NM_SETTING_CONNECTION (object);
switch (prop_id) {
case PROP_NAME:
g_free (setting->name);
setting->name = g_value_dup_string (value);
break;
case PROP_TYPE:
g_free (setting->type);
setting->type = g_value_dup_string (value);
break;
case PROP_AUTOCONNECT:
setting->autoconnect = g_value_get_boolean (value);
break;
case PROP_TIMESTAMP:
setting->timestamp = g_value_get_uint64 (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
NMSettingConnection *setting = NM_SETTING_CONNECTION (object);
switch (prop_id) {
case PROP_NAME:
g_value_set_string (value, setting->name);
break;
case PROP_TYPE:
g_value_set_string (value, setting->type);
break;
case PROP_AUTOCONNECT:
g_value_set_boolean (value, setting->autoconnect);
break;
case PROP_TIMESTAMP:
g_value_set_uint64 (value, setting->timestamp);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
nm_setting_connection_class_init (NMSettingConnectionClass *setting_class)
{
GObjectClass *object_class = G_OBJECT_CLASS (setting_class);
NMSettingClass *parent_class = NM_SETTING_CLASS (setting_class);
/* virtual methods */
object_class->set_property = set_property;
object_class->get_property = get_property;
object_class->finalize = finalize;
parent_class->verify = verify;
/* Properties */
g_object_class_install_property
(object_class, PROP_NAME,
g_param_spec_string (NM_SETTING_CONNECTION_NAME,
"Name",
"Connection name",
NULL,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
g_object_class_install_property
(object_class, PROP_TYPE,
g_param_spec_string (NM_SETTING_CONNECTION_TYPE,
"Type",
"Connection type",
NULL,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
g_object_class_install_property
(object_class, PROP_AUTOCONNECT,
g_param_spec_boolean (NM_SETTING_CONNECTION_AUTOCONNECT,
"Autoconnect",
"Connection autoconnect",
FALSE,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
g_object_class_install_property
(object_class, PROP_TIMESTAMP,
g_param_spec_uint64 (NM_SETTING_CONNECTION_TIMESTAMP,
"Timestamp",
"Connection timestamp",
0, G_MAXUINT64, 0,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
}
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
#ifndef NM_SETTING_CONNECTION_H
#define NM_SETTING_CONNECTION_H
#include "nm-setting.h"
G_BEGIN_DECLS
#define NM_TYPE_SETTING_CONNECTION (nm_setting_connection_get_type ())
#define NM_SETTING_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTING_CONNECTION, NMSettingConnection))
#define NM_SETTING_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTING_CONNECTION, NMSettingConnectionClass))
#define NM_IS_SETTING_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTING_CONNECTION))
#define NM_IS_SETTING_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_SETTING_CONNECTION))
#define NM_SETTING_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTING_CONNECTION, NMSettingConnectionClass))
#define NM_SETTING_CONNECTION_SETTING_NAME "connection"
#define NM_SETTING_CONNECTION_NAME "name"
#define NM_SETTING_CONNECTION_TYPE "type"
#define NM_SETTING_CONNECTION_AUTOCONNECT "autoconnect"
#define NM_SETTING_CONNECTION_TIMESTAMP "timestamp"
typedef struct {
NMSetting parent;
char *name;
char *type;
gboolean autoconnect;
guint64 timestamp;
} NMSettingConnection;
typedef struct {
NMSettingClass parent;
} NMSettingConnectionClass;
GType nm_setting_connection_get_type (void);
NMSetting *nm_setting_connection_new (void);
G_END_DECLS
#endif /* NM_SETTING_CONNECTION_H */
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
#include <dbus/dbus-glib.h>
#include "nm-setting-ip4-config.h"
#include "nm-param-spec-specialized.h"
#include "nm-utils.h"
G_DEFINE_TYPE (NMSettingIP4Config, nm_setting_ip4_config, NM_TYPE_SETTING)
enum {
PROP_0,
PROP_MANUAL,
PROP_DNS,
PROP_DNS_SEARCH,
PROP_ADDRESSES,
LAST_PROP
};
NMSetting *
nm_setting_ip4_config_new (void)
{
return (NMSetting *) g_object_new (NM_TYPE_SETTING_IP4_CONFIG, NULL);
}
static gboolean
verify (NMSetting *setting, GSList *all_settings)
{
NMSettingIP4Config *self = NM_SETTING_IP4_CONFIG (setting);
if (self->manual) {
if (!self->addresses) {
g_warning ("address is not provided");
return FALSE;
}
}
return TRUE;
}
static void
nm_setting_ip4_config_init (NMSettingIP4Config *setting)
{
((NMSetting *) setting)->name = g_strdup (NM_SETTING_IP4_CONFIG_SETTING_NAME);
}
static void
finalize (GObject *object)
{
NMSettingIP4Config *self = NM_SETTING_IP4_CONFIG (object);
if (self->dns)
g_array_free (self->dns, TRUE);
nm_utils_slist_free (self->dns_search, g_free);
nm_utils_slist_free (self->addresses, g_free);
G_OBJECT_CLASS (nm_setting_ip4_config_parent_class)->finalize (object);
}
static GSList *
ip4_addresses_from_gvalue (const GValue *value)
{
GPtrArray *ptr_array;
int i;
GSList *list = NULL;
ptr_array = (GPtrArray *) g_value_get_boxed (value);
for (i = 0; i < ptr_array->len; i++) {
GValueArray *value_array = (GValueArray *) g_ptr_array_index (ptr_array, i);
if (value_array->n_values == 2 || value_array->n_values == 3) {
NMSettingIP4Address *ip4_addr;
ip4_addr = g_new0 (NMSettingIP4Address, 1);
ip4_addr->address = g_value_get_uint (g_value_array_get_nth (value_array, 0));
ip4_addr->netmask = g_value_get_uint (g_value_array_get_nth (value_array, 1));
if (value_array->n_values == 3)
ip4_addr->gateway = g_value_get_uint (g_value_array_get_nth (value_array, 2));
list = g_slist_prepend (list, ip4_addr);
} else
nm_warning ("Ignoring invalid IP4 address");
}
return g_slist_reverse (list);
}
static void
ip4_addresses_to_gvalue (GSList *list, GValue *value)
{
GPtrArray *ptr_array;
GSList *iter;
ptr_array = g_ptr_array_new ();
for (iter = list; iter; iter = iter->next) {
NMSettingIP4Address *ip4_addr = (NMSettingIP4Address *) iter->data;
GArray *array;
array = g_array_sized_new (FALSE, FALSE, sizeof (guint32), 3);
g_array_append_val (array, ip4_addr->address);
g_array_append_val (array, ip4_addr->netmask);
if (ip4_addr->gateway)
g_array_append_val (array, ip4_addr->gateway);
g_ptr_array_add (ptr_array, array);
}
g_value_take_boxed (value, ptr_array);
}
static void
set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec)
{
NMSettingIP4Config *setting = NM_SETTING_IP4_CONFIG (object);
switch (prop_id) {
case PROP_MANUAL:
setting->manual = g_value_get_boolean (value);
break;
case PROP_DNS:
if (setting->dns)
g_array_free (setting->dns, TRUE);
setting->dns = g_value_dup_boxed (value);
break;
case PROP_DNS_SEARCH:
nm_utils_slist_free (setting->dns_search, g_free);
setting->dns_search = g_value_dup_boxed (value);
break;
case PROP_ADDRESSES:
nm_utils_slist_free (setting->addresses, g_free);
setting->addresses = ip4_addresses_from_gvalue (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
NMSettingIP4Config *setting = NM_SETTING_IP4_CONFIG (object);
switch (prop_id) {
case PROP_MANUAL:
g_value_set_boolean (value, setting->manual);
break;
case PROP_DNS:
g_value_set_boxed (value, setting->dns);
break;
case PROP_DNS_SEARCH:
g_value_set_boxed (value, setting->dns_search);
break;
case PROP_ADDRESSES:
ip4_addresses_to_gvalue (setting->addresses, value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class)
{
GObjectClass *object_class = G_OBJECT_CLASS (setting_class);
NMSettingClass *parent_class = NM_SETTING_CLASS (setting_class);
/* virtual methods */
object_class->set_property = set_property;
object_class->get_property = get_property;
object_class->finalize = finalize;
parent_class->verify = verify;
/* Properties */
g_object_class_install_property
(object_class, PROP_MANUAL,
g_param_spec_boolean (NM_SETTING_IP4_CONFIG_MANUAL,
"Manual",
"Do not use DHCP",
FALSE,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
g_object_class_install_property
(object_class, PROP_DNS,
nm_param_spec_specialized (NM_SETTING_IP4_CONFIG_DNS,
"DNS",
"List of DNS servers",
DBUS_TYPE_G_UINT_ARRAY,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
g_object_class_install_property
(object_class, PROP_DNS_SEARCH,
nm_param_spec_specialized (NM_SETTING_IP4_CONFIG_DNS_SEARCH,
"DNS search",
"List of DNS search domains",
dbus_g_type_get_collection ("GSList", G_TYPE_STRING),
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
g_object_class_install_property
(object_class, PROP_ADDRESSES,
nm_param_spec_specialized (NM_SETTING_IP4_CONFIG_ADDRESSES,
"Addresses",
"List of NMSettingIP4Addresses",
dbus_g_type_get_collection ("GPtrArray", G_TYPE_VALUE_ARRAY),
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
}
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
#ifndef NM_SETTING_IP4_CONFIG_H
#define NM_SETTING_IP4_CONFIG_H
#include "nm-setting.h"
G_BEGIN_DECLS
#define NM_TYPE_SETTING_IP4_CONFIG (nm_setting_ip4_config_get_type ())
#define NM_SETTING_IP4_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTING_IP4_CONFIG, NMSettingIP4Config))
#define NM_SETTING_IP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTING_IP4CONFIG, NMSettingIP4ConfigClass))
#define NM_IS_SETTING_IP4_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTING_IP4_CONFIG))
#define NM_IS_SETTING_IP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_SETTING_IP4_CONFIG))
#define NM_SETTING_IP4_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTING_IP4_CONFIG, NMSettingIP4ConfigClass))
#define NM_SETTING_IP4_CONFIG_SETTING_NAME "ipv4"
#define NM_SETTING_IP4_CONFIG_MANUAL "manual"
#define NM_SETTING_IP4_CONFIG_DNS "dns"
#define NM_SETTING_IP4_CONFIG_DNS_SEARCH "dns-search"
#define NM_SETTING_IP4_CONFIG_ADDRESSES "addresses"
typedef struct {
guint32 address;
guint32 netmask;
guint32 gateway;
} NMSettingIP4Address;
typedef struct {
NMSetting parent;
gboolean manual;
GArray *dns; /* array of guint32 */
GSList *dns_search; /* list of strings */
GSList *addresses; /* array of NMSettingIP4Address */
} NMSettingIP4Config;
typedef struct {
NMSettingClass parent;
} NMSettingIP4ConfigClass;
GType nm_setting_ip4_config_get_type (void);
NMSetting *nm_setting_ip4_config_new (void);
G_END_DECLS
#endif /* NM_SETTING_IP4_CONFIG_H */
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
#include "nm-setting-ppp.h"
G_DEFINE_TYPE (NMSettingPPP, nm_setting_ppp, NM_TYPE_SETTING)
enum {
PROP_0,
PROP_NOAUTH,
PROP_REFUSE_EAP,
PROP_REFUSE_CHAP,
PROP_REFUSE_MSCHAP,
PROP_NOBSDCOMP,
PROP_NODEFLATE,
PROP_REQUIRE_MPPE,
PROP_REQUIRE_MPPE_128,
PROP_MPPE_STATEFUL,
PROP_REQUIRE_MPPC,
PROP_CRTSCTS,
PROP_USEPEERDNS,
PROP_BAUD,
PROP_MRU,
PROP_MTU,
PROP_LCP_ECHO_FAILURE,
PROP_LCP_ECHO_INTERVAL,
LAST_PROP
};
NMSetting *
nm_setting_ppp_new (void)
{
return (NMSetting *) g_object_new (NM_TYPE_SETTING_PPP, NULL);
}
static gboolean
verify (NMSetting *setting, GSList *all_settings)
{
/* NMSettingPPP *self = NM_SETTING_PPP (setting); */
/* FIXME: Do we even want this or can we just let pppd evaluate the options? */
return TRUE;
}
static void
nm_setting_ppp_init (NMSettingPPP *setting)
{
((NMSetting *) setting)->name = g_strdup (NM_SETTING_PPP_SETTING_NAME);
}
static void
set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec)
{
NMSettingPPP *setting = NM_SETTING_PPP (object);
switch (prop_id) {
case PROP_NOAUTH:
setting->noauth = g_value_get_boolean (value);