diff options
author | Dan Winship <danw@gnome.org> | 2014-10-22 13:48:18 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-11-07 07:49:40 -0500 |
commit | ca18b2d44290c938894dc63f7b03d04a3be271bc (patch) | |
tree | 9fdf5a36bd0de1c788fa810864801f5c4495f2cc /libnm/nm-device.c | |
parent | d34910b12860eb080b1a519f441946cbc378f769 (diff) | |
download | NetworkManager-ca18b2d44290c938894dc63f7b03d04a3be271bc.tar.gz |
libnm: create NMDhcpConfig as parent of NMDhcp4Config and NMDhcp6Config
As with NMIP4Config and NMIP6Config, merge the two DHCP config classes
into one in the public API.
Diffstat (limited to 'libnm/nm-device.c')
-rw-r--r-- | libnm/nm-device.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/libnm/nm-device.c b/libnm/nm-device.c index 16f88d9308..29f5db8d33 100644 --- a/libnm/nm-device.c +++ b/libnm/nm-device.c @@ -84,9 +84,9 @@ typedef struct { gboolean firmware_missing; gboolean autoconnect; NMIPConfig *ip4_config; - NMDhcp4Config *dhcp4_config; + NMDhcpConfig *dhcp4_config; NMIPConfig *ip6_config; - NMDhcp6Config *dhcp6_config; + NMDhcpConfig *dhcp6_config; NMDeviceState state; NMDeviceState last_seen_state; NMDeviceStateReason reason; @@ -658,12 +658,12 @@ nm_device_class_init (NMDeviceClass *device_class) /** * NMDevice:dhcp4-config: * - * The #NMDhcp4Config of the device. + * The IPv4 #NMDhcpConfig of the device. **/ g_object_class_install_property (object_class, PROP_DHCP4_CONFIG, g_param_spec_object (NM_DEVICE_DHCP4_CONFIG, "", "", - NM_TYPE_DHCP4_CONFIG, + NM_TYPE_DHCP_CONFIG, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); @@ -682,12 +682,12 @@ nm_device_class_init (NMDeviceClass *device_class) /** * NMDevice:dhcp6-config: * - * The #NMDhcp6Config of the device. + * The IPv6 #NMDhcpConfig of the device. **/ g_object_class_install_property (object_class, PROP_DHCP6_CONFIG, g_param_spec_object (NM_DEVICE_DHCP6_CONFIG, "", "", - NM_TYPE_DHCP6_CONFIG, + NM_TYPE_DHCP_CONFIG, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); @@ -1126,16 +1126,15 @@ nm_device_get_ip4_config (NMDevice *device) * nm_device_get_dhcp4_config: * @device: a #NMDevice * - * Gets the current #NMDhcp4Config associated with the #NMDevice. + * Gets the current IPv4 #NMDhcpConfig associated with the #NMDevice. * - * Note that as of NetworkManager 0.9.10, you can alternatively use - * nm_active_connection_get_dhcp4_config(), which also works with VPN - * connections. + * You can alternatively use nm_active_connection_get_dhcp4_config(), which also + * works with VPN connections. * - * Returns: (transfer none): the #NMDhcp4Config or %NULL if the device is not activated or not - * using DHCP. + * Returns: (transfer none): the IPv4 #NMDhcpConfig, or %NULL if the device is + * not activated or not using DHCP. **/ -NMDhcp4Config * +NMDhcpConfig * nm_device_get_dhcp4_config (NMDevice *device) { g_return_val_if_fail (NM_IS_DEVICE (device), NULL); @@ -1166,16 +1165,15 @@ nm_device_get_ip6_config (NMDevice *device) * nm_device_get_dhcp6_config: * @device: a #NMDevice * - * Gets the current #NMDhcp6Config associated with the #NMDevice. + * Gets the current IPv6 #NMDhcpConfig associated with the #NMDevice. * - * Note that as of NetworkManager 0.9.10, you can alternatively use - * nm_active_connection_get_dhcp6_config(), which also works with VPN - * connections. + * You can alternatively use nm_active_connection_get_dhcp6_config(), which also + * works with VPN connections. * - * Returns: (transfer none): the #NMDhcp6Config or %NULL if the device is not activated or not - * using DHCP. + * Returns: (transfer none): the IPv6 #NMDhcpConfig, or %NULL if the device is + * not activated or not using DHCPv6. **/ -NMDhcp6Config * +NMDhcpConfig * nm_device_get_dhcp6_config (NMDevice *device) { g_return_val_if_fail (NM_IS_DEVICE (device), NULL); |