From 763913b20065d14fbb8e21701ed754ad7c5b6b42 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 12 Mar 2008 12:45:20 +0000 Subject: [PATCH] 2008-03-12 Dan Williams * libnm-util/nm-setting-ip4-config.c libnm-util/nm-setting-ip4-config.h - (set_property, get_property, nm_setting_ip4_config_class_init): add the 'autoip' property from the spec git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3427 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 7 +++++++ libnm-util/nm-setting-ip4-config.c | 15 +++++++++++++++ libnm-util/nm-setting-ip4-config.h | 2 ++ 3 files changed, 24 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0b6d85a9f..b264227c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-03-12 Dan Williams + + * libnm-util/nm-setting-ip4-config.c + libnm-util/nm-setting-ip4-config.h + - (set_property, get_property, nm_setting_ip4_config_class_init): add + the 'autoip' property from the spec + 2008-03-11 Dan Williams * src/backends/NetworkManagerGeneric.c diff --git a/libnm-util/nm-setting-ip4-config.c b/libnm-util/nm-setting-ip4-config.c index cd3af06f8..30eb465da 100644 --- a/libnm-util/nm-setting-ip4-config.c +++ b/libnm-util/nm-setting-ip4-config.c @@ -10,6 +10,7 @@ G_DEFINE_TYPE (NMSettingIP4Config, nm_setting_ip4_config, NM_TYPE_SETTING) enum { PROP_0, PROP_MANUAL, + PROP_AUTOIP, PROP_DNS, PROP_DNS_SEARCH, PROP_ADDRESSES, @@ -127,6 +128,9 @@ set_property (GObject *object, guint prop_id, case PROP_MANUAL: setting->manual = g_value_get_boolean (value); break; + case PROP_AUTOIP: + setting->autoip = g_value_get_boolean (value); + break; case PROP_DNS: if (setting->dns) g_array_free (setting->dns, TRUE); @@ -156,6 +160,9 @@ get_property (GObject *object, guint prop_id, case PROP_MANUAL: g_value_set_boolean (value, setting->manual); break; + case PROP_AUTOIP: + g_value_set_boolean (value, setting->autoip); + break; case PROP_DNS: g_value_set_boxed (value, setting->dns); break; @@ -192,6 +199,14 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class) FALSE, G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); + g_object_class_install_property + (object_class, PROP_AUTOIP, + g_param_spec_boolean (NM_SETTING_IP4_CONFIG_AUTOIP, + "Auto IP", + "Use Auto IP", + 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, diff --git a/libnm-util/nm-setting-ip4-config.h b/libnm-util/nm-setting-ip4-config.h index bebd3baa5..d1d5b027c 100644 --- a/libnm-util/nm-setting-ip4-config.h +++ b/libnm-util/nm-setting-ip4-config.h @@ -17,6 +17,7 @@ G_BEGIN_DECLS #define NM_SETTING_IP4_CONFIG_SETTING_NAME "ipv4" #define NM_SETTING_IP4_CONFIG_MANUAL "manual" +#define NM_SETTING_IP4_CONFIG_AUTOIP "autoip" #define NM_SETTING_IP4_CONFIG_DNS "dns" #define NM_SETTING_IP4_CONFIG_DNS_SEARCH "dns-search" #define NM_SETTING_IP4_CONFIG_ADDRESSES "addresses" @@ -31,6 +32,7 @@ typedef struct { NMSetting parent; gboolean manual; + gboolean autoip; GArray *dns; /* array of guint32 */ GSList *dns_search; /* list of strings */ GSList *addresses; /* array of NMSettingIP4Address */