Commit d34910b1 authored by Dan Winship's avatar Dan Winship

libnm: create NMIPConfig as parent of NMIP4Config and NMIP6Config

Create NMIPConfig as the parent of NMIP4Config and NMIP6Config, and
remove the two subclasses from the public API; while it's convenient
to still have both internally, they are now identical to the outside
world.
parent f8dcb951
......@@ -76,7 +76,7 @@ NmcOutputField nmc_fields_dhcp6_config[] = {
gboolean
print_ip4_config (NMIP4Config *cfg4,
print_ip4_config (NMIPConfig *cfg4,
NmCli *nmc,
const char *group_prefix,
const char *one_field)
......@@ -103,8 +103,8 @@ print_ip4_config (NMIP4Config *cfg4,
g_ptr_array_add (nmc->output_data, arr);
/* addresses */
ptr_array = nm_ip4_config_get_addresses (cfg4);
gw = nm_ip4_config_get_gateway (cfg4);
ptr_array = nm_ip_config_get_addresses (cfg4);
gw = nm_ip_config_get_gateway (cfg4);
if (ptr_array) {
addr_arr = g_new (char *, ptr_array->len + 1);
for (i = 0; i < ptr_array->len; i++) {
......@@ -119,7 +119,7 @@ print_ip4_config (NMIP4Config *cfg4,
}
/* routes */
ptr_array = nm_ip4_config_get_routes (cfg4);
ptr_array = nm_ip_config_get_routes (cfg4);
if (ptr_array) {
route_arr = g_new (char *, ptr_array->len + 1);
for (i = 0; i < ptr_array->len; i++) {
......@@ -140,13 +140,13 @@ print_ip4_config (NMIP4Config *cfg4,
}
/* DNS */
dns_arr = g_strdupv ((char **) nm_ip4_config_get_nameservers (cfg4));
dns_arr = g_strdupv ((char **) nm_ip_config_get_nameservers (cfg4));
/* domains */
domain_arr = g_strdupv ((char **) nm_ip4_config_get_domains (cfg4));
domain_arr = g_strdupv ((char **) nm_ip_config_get_domains (cfg4));
/* WINS */
wins_arr = g_strdupv ((char **) nm_ip4_config_get_wins_servers (cfg4));
wins_arr = g_strdupv ((char **) nm_ip_config_get_wins_servers (cfg4));
arr = nmc_dup_fields_array (tmpl, tmpl_len, NMC_OF_FLAG_SECTION_PREFIX);
set_val_strc (arr, 0, group_prefix);
......@@ -166,7 +166,7 @@ print_ip4_config (NMIP4Config *cfg4,
}
gboolean
print_ip6_config (NMIP6Config *cfg6,
print_ip6_config (NMIPConfig *cfg6,
NmCli *nmc,
const char *group_prefix,
const char *one_field)
......@@ -192,8 +192,8 @@ print_ip6_config (NMIP6Config *cfg6,
g_ptr_array_add (nmc->output_data, arr);
/* addresses */
ptr_array = nm_ip6_config_get_addresses (cfg6);
gw = nm_ip6_config_get_gateway (cfg6);
ptr_array = nm_ip_config_get_addresses (cfg6);
gw = nm_ip_config_get_gateway (cfg6);
if (ptr_array) {
addr_arr = g_new (char *, ptr_array->len + 1);
for (i = 0; i < ptr_array->len; i++) {
......@@ -208,7 +208,7 @@ print_ip6_config (NMIP6Config *cfg6,
}
/* routes */
ptr_array = nm_ip6_config_get_routes (cfg6);
ptr_array = nm_ip_config_get_routes (cfg6);
if (ptr_array) {
route_arr = g_new (char *, ptr_array->len + 1);
for (i = 0; i < ptr_array->len; i++) {
......@@ -229,10 +229,10 @@ print_ip6_config (NMIP6Config *cfg6,
}
/* DNS */
dns_arr = g_strdupv ((char **) nm_ip6_config_get_nameservers (cfg6));
dns_arr = g_strdupv ((char **) nm_ip_config_get_nameservers (cfg6));
/* domains */
domain_arr = g_strdupv ((char **) nm_ip6_config_get_domains (cfg6));
domain_arr = g_strdupv ((char **) nm_ip_config_get_domains (cfg6));
arr = nmc_dup_fields_array (tmpl, tmpl_len, NMC_OF_FLAG_SECTION_PREFIX);
set_val_strc (arr, 0, group_prefix);
......
......@@ -24,8 +24,8 @@
#include "nmcli.h"
gboolean print_ip4_config (NMIP4Config *cfg4, NmCli *nmc, const char *group_prefix, const char *one_field);
gboolean print_ip6_config (NMIP6Config *cfg6, NmCli *nmc, const char *group_prefix, const char *one_field);
gboolean print_ip4_config (NMIPConfig *cfg4, NmCli *nmc, const char *group_prefix, const char *one_field);
gboolean print_ip6_config (NMIPConfig *cfg6, NmCli *nmc, const char *group_prefix, const char *one_field);
gboolean print_dhcp4_config (NMDhcp4Config *dhcp4, NmCli *nmc, const char *group_prefix, const char *one_field);
gboolean print_dhcp6_config (NMDhcp6Config *dhcp6, NmCli *nmc, const char *group_prefix, const char *one_field);
......
......@@ -1128,7 +1128,7 @@ nmc_active_connection_details (NMActiveConnection *acon, NmCli *nmc)
/* IP4 */
if (strcasecmp (nmc_fields_con_active_details_groups[group_idx].name, nmc_fields_con_active_details_groups[1].name) == 0) {
gboolean b1 = FALSE;
NMIP4Config *cfg4 = nm_active_connection_get_ip4_config (acon);
NMIPConfig *cfg4 = nm_active_connection_get_ip4_config (acon);
b1 = print_ip4_config (cfg4, nmc, "IP4", group_fld);
was_output = was_output || b1;
......@@ -1146,7 +1146,7 @@ nmc_active_connection_details (NMActiveConnection *acon, NmCli *nmc)
/* IP6 */
if (strcasecmp (nmc_fields_con_active_details_groups[group_idx].name, nmc_fields_con_active_details_groups[3].name) == 0) {
gboolean b1 = FALSE;
NMIP6Config *cfg6 = nm_active_connection_get_ip6_config (acon);
NMIPConfig *cfg6 = nm_active_connection_get_ip6_config (acon);
b1 = print_ip6_config (cfg6, nmc, "IP6", group_fld);
was_output = was_output || b1;
......
......@@ -767,8 +767,7 @@ show_device_info (NMDevice *device, NmCli *nmc)
NmcOutputField *tmpl, *arr;
size_t tmpl_len;
gboolean was_output = FALSE;
NMIP4Config *cfg4;
NMIP6Config *cfg6;
NMIPConfig *cfg4, *cfg6;
NMDhcp4Config *dhcp4;
NMDhcp6Config *dhcp6;
const char *base_hdr = _("Device details");
......
......@@ -34,6 +34,8 @@ IGNORE_HFILES= \
nm-dbus-helpers-private.h \
nm-core-internal.h \
nm-device-private.h \
nm-ip4-config.h \
nm-ip6-config.h \
nm-manager.h \
nm-object-cache.h \
nm-object-private.h \
......
......@@ -128,8 +128,7 @@
<xi:include href="xml/nm-remote-connection.xml"/>
<xi:include href="xml/nm-access-point.xml"/>
<xi:include href="xml/nm-wimax-nsp.xml"/>
<xi:include href="xml/nm-ip4-config.xml"/>
<xi:include href="xml/nm-ip6-config.xml"/>
<xi:include href="xml/nm-ip-config.xml"/>
<xi:include href="xml/nm-dhcp4-config.xml"/>
<xi:include href="xml/nm-dhcp6-config.xml"/>
</chapter>
......
......@@ -46,8 +46,7 @@ libnminclude_hfiles = \
nm-dhcp4-config.h \
nm-dhcp6-config.h \
nm-enum-types.h \
nm-ip4-config.h \
nm-ip6-config.h \
nm-ip-config.h \
nm-object.h \
nm-remote-connection.h \
nm-secret-agent.h \
......@@ -66,6 +65,8 @@ libnminclude_HEADERS = \
libnm_la_private_headers = \
nm-dbus-helpers.h \
nm-device-private.h \
nm-ip4-config.h \
nm-ip6-config.h \
nm-manager.h \
nm-object-cache.h \
nm-object-private.h \
......@@ -94,6 +95,7 @@ libnm_la_csources = \
nm-dhcp4-config.c \
nm-dhcp6-config.c \
nm-enum-types.c \
nm-ip-config.c \
nm-ip4-config.c \
nm-ip6-config.c \
nm-manager.c \
......
......@@ -46,8 +46,7 @@
#include <nm-dhcp4-config.h>
#include <nm-dhcp6-config.h>
#include <nm-enum-types.h>
#include <nm-ip4-config.h>
#include <nm-ip6-config.h>
#include <nm-ip-config.h>
#include <nm-object.h>
#include <nm-remote-connection.h>
#include <nm-secret-agent.h>
......
......@@ -268,21 +268,6 @@ global:
nm_dhcp6_config_get_one_option;
nm_dhcp6_config_get_options;
nm_dhcp6_config_get_type;
nm_ip4_config_get_addresses;
nm_ip4_config_get_domains;
nm_ip4_config_get_gateway;
nm_ip4_config_get_nameservers;
nm_ip4_config_get_routes;
nm_ip4_config_get_searches;
nm_ip4_config_get_type;
nm_ip4_config_get_wins_servers;
nm_ip6_config_get_addresses;
nm_ip6_config_get_domains;
nm_ip6_config_get_gateway;
nm_ip6_config_get_nameservers;
nm_ip6_config_get_routes;
nm_ip6_config_get_searches;
nm_ip6_config_get_type;
nm_ip_address_equal;
nm_ip_address_get_address;
nm_ip_address_get_address_binary;
......@@ -299,6 +284,15 @@ global:
nm_ip_address_set_attribute;
nm_ip_address_set_prefix;
nm_ip_address_unref;
nm_ip_config_get_addresses;
nm_ip_config_get_domains;
nm_ip_config_get_family;
nm_ip_config_get_gateway;
nm_ip_config_get_nameservers;
nm_ip_config_get_routes;
nm_ip_config_get_searches;
nm_ip_config_get_type;
nm_ip_config_get_wins_servers;
nm_ip_route_equal;
nm_ip_route_get_attribute;
nm_ip_route_get_attribute_names;
......
......@@ -57,10 +57,10 @@ typedef struct {
GPtrArray *devices;
NMActiveConnectionState state;
gboolean is_default;
NMIP4Config *ip4_config;
NMIPConfig *ip4_config;
NMDhcp4Config *dhcp4_config;
gboolean is_default6;
NMIP6Config *ip6_config;
NMIPConfig *ip6_config;
NMDhcp6Config *dhcp6_config;
gboolean is_vpn;
NMDevice *master;
......@@ -242,13 +242,12 @@ nm_active_connection_get_default (NMActiveConnection *connection)
* nm_active_connection_get_ip4_config:
* @connection: an #NMActiveConnection
*
* Gets the current #NMIP4Config associated with the #NMActiveConnection.
* Gets the current IPv4 #NMIPConfig associated with the #NMActiveConnection.
*
* Returns: (transfer none): the #NMIP4Config, or %NULL if the
* connection is not in the %NM_ACTIVE_CONNECTION_STATE_ACTIVATED
* state.
* Returns: (transfer none): the IPv4 #NMIPConfig, or %NULL if the connection is
* not in the %NM_ACTIVE_CONNECTION_STATE_ACTIVATED state.
**/
NMIP4Config *
NMIPConfig *
nm_active_connection_get_ip4_config (NMActiveConnection *connection)
{
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
......@@ -296,13 +295,12 @@ nm_active_connection_get_default6 (NMActiveConnection *connection)
* nm_active_connection_get_ip6_config:
* @connection: an #NMActiveConnection
*
* Gets the current #NMIP6Config associated with the #NMActiveConnection.
* Gets the current IPv6 #NMIPConfig associated with the #NMActiveConnection.
*
* Returns: (transfer none): the #NMIP6Config, or %NULL if the
* connection is not in the %NM_ACTIVE_CONNECTION_STATE_ACTIVATED
* state.
* Returns: (transfer none): the IPv6 #NMIPConfig, or %NULL if the connection is
* not in the %NM_ACTIVE_CONNECTION_STATE_ACTIVATED state.
**/
NMIP6Config *
NMIPConfig *
nm_active_connection_get_ip6_config (NMActiveConnection *connection)
{
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
......@@ -631,12 +629,12 @@ nm_active_connection_class_init (NMActiveConnectionClass *ap_class)
/**
* NMActiveConnection:ip4-config:
*
* The #NMIP4Config of the connection.
* The IPv4 #NMIPConfig of the connection.
**/
g_object_class_install_property
(object_class, PROP_IP4_CONFIG,
g_param_spec_object (NM_ACTIVE_CONNECTION_IP4_CONFIG, "", "",
NM_TYPE_IP4_CONFIG,
NM_TYPE_IP_CONFIG,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
......@@ -667,12 +665,12 @@ nm_active_connection_class_init (NMActiveConnectionClass *ap_class)
/**
* NMActiveConnection:ip6-config:
*
* The #NMIP6Config of the connection.
* The IPv6 #NMIPConfig of the connection.
**/
g_object_class_install_property
(object_class, PROP_IP6_CONFIG,
g_param_spec_object (NM_ACTIVE_CONNECTION_IP6_CONFIG, "", "",
NM_TYPE_IP6_CONFIG,
NM_TYPE_IP_CONFIG,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
......
......@@ -75,10 +75,10 @@ const GPtrArray *nm_active_connection_get_devices (NMActive
NMActiveConnectionState nm_active_connection_get_state (NMActiveConnection *connection);
NMDevice *nm_active_connection_get_master (NMActiveConnection *connection);
gboolean nm_active_connection_get_default (NMActiveConnection *connection);
NMIP4Config *nm_active_connection_get_ip4_config (NMActiveConnection *connection);
NMIPConfig *nm_active_connection_get_ip4_config (NMActiveConnection *connection);
NMDhcp4Config *nm_active_connection_get_dhcp4_config (NMActiveConnection *connection);
gboolean nm_active_connection_get_default6 (NMActiveConnection *connection);
NMIP6Config *nm_active_connection_get_ip6_config (NMActiveConnection *connection);
NMIPConfig *nm_active_connection_get_ip6_config (NMActiveConnection *connection);
NMDhcp6Config *nm_active_connection_get_dhcp6_config (NMActiveConnection *connection);
gboolean nm_active_connection_get_vpn (NMActiveConnection *connection);
......
......@@ -83,9 +83,9 @@ typedef struct {
gboolean managed;
gboolean firmware_missing;
gboolean autoconnect;
NMIP4Config *ip4_config;
NMIPConfig *ip4_config;
NMDhcp4Config *dhcp4_config;
NMIP6Config *ip6_config;
NMIPConfig *ip6_config;
NMDhcp6Config *dhcp6_config;
NMDeviceState state;
NMDeviceState last_seen_state;
......@@ -651,7 +651,7 @@ nm_device_class_init (NMDeviceClass *device_class)
g_object_class_install_property
(object_class, PROP_IP4_CONFIG,
g_param_spec_object (NM_DEVICE_IP4_CONFIG, "", "",
NM_TYPE_IP4_CONFIG,
NM_TYPE_IP_CONFIG,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
......@@ -670,12 +670,12 @@ nm_device_class_init (NMDeviceClass *device_class)
/**
* NMDevice:ip6-config:
*
* The #NMIP6Config of the device.
* The IPv6 #NMIPConfig of the device.
**/
g_object_class_install_property
(object_class, PROP_IP6_CONFIG,
g_param_spec_object (NM_DEVICE_IP6_CONFIG, "", "",
NM_TYPE_IP6_CONFIG,
NM_TYPE_IP_CONFIG,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
......@@ -1106,15 +1106,15 @@ nm_device_get_firmware_missing (NMDevice *device)
* nm_device_get_ip4_config:
* @device: a #NMDevice
*
* Gets the current #NMIP4Config associated with the #NMDevice.
* Gets the current IPv4 #NMIPConfig associated with the #NMDevice.
*
* Note that as of NetworkManager 0.9.10, you can alternatively use
* nm_active_connection_get_ip4_config(), which also works with VPN
* connections.
* You can alternatively use nm_active_connection_get_ip4_config(), which also
* works with VPN connections.
*
* Returns: (transfer none): the #NMIP4Config or %NULL if the device is not activated.
* Returns: (transfer none): the IPv4 #NMIPConfig, or %NULL if the device is not
* activated.
**/
NMIP4Config *
NMIPConfig *
nm_device_get_ip4_config (NMDevice *device)
{
g_return_val_if_fail (NM_IS_DEVICE (device), NULL);
......@@ -1147,15 +1147,14 @@ nm_device_get_dhcp4_config (NMDevice *device)
* nm_device_get_ip6_config:
* @device: a #NMDevice
*
* Gets the current #NMIP6Config associated with the #NMDevice.
* Gets the current IPv6 #NMIPConfig associated with the #NMDevice.
*
* Note that as of NetworkManager 0.9.10, you can alternatively use
* nm_active_connection_get_ip6_config(), which also works with VPN
* connections.
* You can alternatively use nm_active_connection_get_ip6_config(), which also
* works with VPN connections.
*
* Returns: (transfer none): the #NMIP6Config or %NULL if the device is not activated.
* Returns: (transfer none): the IPv6 #NMIPConfig or %NULL if the device is not activated.
**/
NMIP6Config *
NMIPConfig *
nm_device_get_ip6_config (NMDevice *device)
{
g_return_val_if_fail (NM_IS_DEVICE (device), NULL);
......
......@@ -104,9 +104,9 @@ gboolean nm_device_get_managed (NMDevice *device);
gboolean nm_device_get_autoconnect (NMDevice *device);
void nm_device_set_autoconnect (NMDevice *device, gboolean autoconnect);
gboolean nm_device_get_firmware_missing (NMDevice *device);
NMIP4Config * nm_device_get_ip4_config (NMDevice *device);
NMIPConfig * nm_device_get_ip4_config (NMDevice *device);
NMDhcp4Config * nm_device_get_dhcp4_config (NMDevice *device);
NMIP6Config * nm_device_get_ip6_config (NMDevice *device);
NMIPConfig * nm_device_get_ip6_config (NMDevice *device);
NMDhcp6Config * nm_device_get_dhcp6_config (NMDevice *device);
NMDeviceState nm_device_get_state (NMDevice *device);
NMDeviceStateReason nm_device_get_state_reason (NMDevice *device);
......
This diff is collapsed.
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
* Copyright 2007 - 2008 Novell, Inc.
* Copyright 2008 - 2014 Red Hat, Inc.
*/
#ifndef __NM_IP_CONFIG_H__
#define __NM_IP_CONFIG_H__
#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-object.h>
G_BEGIN_DECLS
#define NM_TYPE_IP_CONFIG (nm_ip_config_get_type ())
#define NM_IP_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_IP_CONFIG, NMIPConfig))
#define NM_IP_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_IP_CONFIG, NMIPConfigClass))
#define NM_IS_IP_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_IP_CONFIG))
#define NM_IS_IP_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_IP_CONFIG))
#define NM_IP_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IP_CONFIG, NMIPConfigClass))
struct _NMIPConfig {
NMObject parent;
};
typedef struct {
NMObjectClass parent;
/*< private >*/
gpointer padding[8];
} NMIPConfigClass;
#define NM_IP_CONFIG_FAMILY "family"
#define NM_IP_CONFIG_GATEWAY "gateway"
#define NM_IP_CONFIG_ADDRESSES "addresses"
#define NM_IP_CONFIG_ROUTES "routes"
#define NM_IP_CONFIG_NAMESERVERS "nameservers"
#define NM_IP_CONFIG_DOMAINS "domains"
#define NM_IP_CONFIG_SEARCHES "searches"
#define NM_IP_CONFIG_WINS_SERVERS "wins-servers"
GType nm_ip_config_get_type (void);
int nm_ip_config_get_family (NMIPConfig *config);
const char * nm_ip_config_get_gateway (NMIPConfig *config);
GPtrArray * nm_ip_config_get_addresses (NMIPConfig *config);
GPtrArray * nm_ip_config_get_routes (NMIPConfig *config);
const char * const *nm_ip_config_get_nameservers (NMIPConfig *config);
const char * const *nm_ip_config_get_domains (NMIPConfig *config);
const char * const *nm_ip_config_get_searches (NMIPConfig *config);
const char * const *nm_ip_config_get_wins_servers (NMIPConfig *config);
G_END_DECLS
#endif /* __NM_IP_CONFIG_H__ */
This diff is collapsed.
......@@ -22,11 +22,7 @@
#ifndef __NM_IP4_CONFIG_H__
#define __NM_IP4_CONFIG_H__
#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-object.h>
#include <nm-ip-config.h>
G_BEGIN_DECLS
......@@ -37,35 +33,19 @@ G_BEGIN_DECLS
#define NM_IS_IP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_IP4_CONFIG))
#define NM_IP4_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IP4_CONFIG, NMIP4ConfigClass))
struct _NMIP4Config {
NMObject parent;
};
typedef struct {
NMIPConfig parent;
} NMIP4Config;
typedef struct {
NMObjectClass parent;
NMIPConfigClass parent;
/*< private >*/
gpointer padding[4];
} NMIP4ConfigClass;
#define NM_IP4_CONFIG_GATEWAY "gateway"
#define NM_IP4_CONFIG_ADDRESSES "addresses"
#define NM_IP4_CONFIG_ROUTES "routes"
#define NM_IP4_CONFIG_NAMESERVERS "nameservers"
#define NM_IP4_CONFIG_DOMAINS "domains"
#define NM_IP4_CONFIG_SEARCHES "searches"
#define NM_IP4_CONFIG_WINS_SERVERS "wins-servers"
GType nm_ip4_config_get_type (void);
const char * nm_ip4_config_get_gateway (NMIP4Config *config);
GPtrArray * nm_ip4_config_get_addresses (NMIP4Config *config);
GPtrArray * nm_ip4_config_get_routes (NMIP4Config *config);
const char * const *nm_ip4_config_get_nameservers (NMIP4Config *config);
const char * const *nm_ip4_config_get_domains (NMIP4Config *config);
const char * const *nm_ip4_config_get_searches (NMIP4Config *config);
const char * const *nm_ip4_config_get_wins_servers (NMIP4Config *config);
G_END_DECLS
#endif /* __NM_IP4_CONFIG_H__ */
This diff is collapsed.
......@@ -22,11 +22,7 @@
#ifndef __NM_IP6_CONFIG_H__
#define __NM_IP6_CONFIG_H__
#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
#error "Only <NetworkManager.h> can be included directly."
#endif
#include <nm-object.h>
#include <nm-ip-config.h>
G_BEGIN_DECLS
......@@ -37,33 +33,19 @@ G_BEGIN_DECLS
#define NM_IS_IP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_IP6_CONFIG))
#define NM_IP6_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IP6_CONFIG, NMIP6ConfigClass))
struct _NMIP6Config {
NMObject parent;
};
typedef struct {
NMIPConfig parent;
} NMIP6Config;
typedef struct {
NMObjectClass parent;
NMIPConfigClass parent;
/*< private >*/
gpointer padding[4];
} NMIP6ConfigClass;
#define NM_IP6_CONFIG_GATEWAY "gateway"
#define NM_IP6_CONFIG_ADDRESSES "addresses"
#define NM_IP6_CONFIG_ROUTES "routes"
#define NM_IP6_CONFIG_NAMESERVERS "nameservers"
#define NM_IP6_CONFIG_DOMAINS "domains"
#define NM_IP6_CONFIG_SEARCHES "searches"
GType nm_ip6_config_get_type (void);
const char * nm_ip6_config_get_gateway (NMIP6Config *config);
GPtrArray * nm_ip6_config_get_addresses (NMIP6Config *config);
GPtrArray * nm_ip6_config_get_routes (NMIP6Config *config);
const char * const * nm_ip6_config_get_nameservers (NMIP6Config *config);
const char * const * nm_ip6_config_get_domains (NMIP6Config *config);
const char * const * nm_ip6_config_get_searches (NMIP6Config *config);
G_END_DECLS
#endif /* __NM_IP6_CONFIG_H__ */
......@@ -45,8 +45,7 @@ typedef struct _NMDeviceWifi NMDeviceWifi;
typedef struct _NMDeviceWimax NMDeviceWimax;
typedef struct _NMDhcp4Config NMDhcp4Config;
typedef struct _NMDhcp6Config NMDhcp6Config;
typedef struct _NMIP4Config NMIP4Config;
typedef struct _NMIP6Config NMIP6Config;
typedef struct _NMIPConfig NMIPConfig;
typedef struct _NMObject NMObject;
typedef struct _NMRemoteConnection NMRemoteConnection;
typedef struct _NMSecretAgent NMSecretAgent;
......
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