summaryrefslogtreecommitdiff
path: root/libnm-core
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-10-21 22:09:52 -0400
committerDan Winship <danw@gnome.org>2014-10-28 17:17:17 -0400
commitb108790833e4829586cf42a60a60a783fe535608 (patch)
treed4be5914f03e998efd21b810aa95e0e5171d8c59 /libnm-core
parent6eba3aa141bc94fa81e9e20a6bf0e66a86409857 (diff)
downloadNetworkManager-b108790833e4829586cf42a60a60a783fe535608.tar.gz
libnm-core: add nm-core-types.h, remove cross-includes
Add nm-core-types.h, typedefing all of the GObject types in libnm-core; this is needed so that nm-setting.h can reference NMConnection in addition to nm-connection.h referencing NMSetting. Removing the cross-includes from the various headers causes lots of fallout elsewhere. (In particular, nm-utils.h used to include nm-connection.h, which included every setting header, so any file that included nm-utils.h automatically got most of the rest of libnm-core without needing to pay attention to specifics.) Fix this up by including nm-core-internal.h from those files that are now missing includes.
Diffstat (limited to 'libnm-core')
-rw-r--r--libnm-core/Makefile.libnm-core1
-rw-r--r--libnm-core/nm-connection.c27
-rw-r--r--libnm-core/nm-connection.h31
-rw-r--r--libnm-core/nm-core-types.h59
-rw-r--r--libnm-core/nm-setting-8021x.h4
-rw-r--r--libnm-core/nm-setting-adsl.h4
-rw-r--r--libnm-core/nm-setting-bluetooth.h4
-rw-r--r--libnm-core/nm-setting-bond.c1
-rw-r--r--libnm-core/nm-setting-bond.h4
-rw-r--r--libnm-core/nm-setting-bridge-port.c2
-rw-r--r--libnm-core/nm-setting-bridge-port.h4
-rw-r--r--libnm-core/nm-setting-bridge.h4
-rw-r--r--libnm-core/nm-setting-cdma.h4
-rw-r--r--libnm-core/nm-setting-connection.c4
-rw-r--r--libnm-core/nm-setting-connection.h4
-rw-r--r--libnm-core/nm-setting-dcb.h4
-rw-r--r--libnm-core/nm-setting-generic.h4
-rw-r--r--libnm-core/nm-setting-gsm.h4
-rw-r--r--libnm-core/nm-setting-infiniband.h4
-rw-r--r--libnm-core/nm-setting-ip4-config.c1
-rw-r--r--libnm-core/nm-setting-ip4-config.h4
-rw-r--r--libnm-core/nm-setting-ip6-config.h4
-rw-r--r--libnm-core/nm-setting-olpc-mesh.h4
-rw-r--r--libnm-core/nm-setting-ppp.h4
-rw-r--r--libnm-core/nm-setting-pppoe.h4
-rw-r--r--libnm-core/nm-setting-serial.h4
-rw-r--r--libnm-core/nm-setting-team-port.c2
-rw-r--r--libnm-core/nm-setting-team-port.h4
-rw-r--r--libnm-core/nm-setting-team.h4
-rw-r--r--libnm-core/nm-setting-vlan.c2
-rw-r--r--libnm-core/nm-setting-vlan.h4
-rw-r--r--libnm-core/nm-setting-vpn.h4
-rw-r--r--libnm-core/nm-setting-wimax.h4
-rw-r--r--libnm-core/nm-setting-wired.h4
-rw-r--r--libnm-core/nm-setting-wireless-security.c2
-rw-r--r--libnm-core/nm-setting-wireless-security.h4
-rw-r--r--libnm-core/nm-setting-wireless.h4
-rw-r--r--libnm-core/nm-setting.c10
-rw-r--r--libnm-core/nm-setting.h9
-rw-r--r--libnm-core/nm-simple-connection.h4
-rw-r--r--libnm-core/nm-utils.c9
-rw-r--r--libnm-core/nm-utils.h6
-rw-r--r--libnm-core/tests/test-general.c31
-rw-r--r--libnm-core/tests/test-secrets.c11
-rw-r--r--libnm-core/tests/test-setting-dcb.c1
45 files changed, 183 insertions, 134 deletions
diff --git a/libnm-core/Makefile.libnm-core b/libnm-core/Makefile.libnm-core
index c79665e9f5..a6f70133c8 100644
--- a/libnm-core/Makefile.libnm-core
+++ b/libnm-core/Makefile.libnm-core
@@ -9,6 +9,7 @@ libnm_core_headers = \
$(core_build)/nm-core-enum-types.h \
$(core_build)/nm-version.h \
$(core)/nm-connection.h \
+ $(core)/nm-core-types.h \
$(core)/nm-dbus-interface.h \
$(core)/nm-errors.h \
$(core)/nm-setting-8021x.h \
diff --git a/libnm-core/nm-connection.c b/libnm-core/nm-connection.c
index 3429ec2232..6340a0fa02 100644
--- a/libnm-core/nm-connection.c
+++ b/libnm-core/nm-connection.c
@@ -26,32 +26,7 @@
#include "nm-connection.h"
#include "nm-utils.h"
#include "nm-setting-private.h"
-
-#include "nm-setting-8021x.h"
-#include "nm-setting-bluetooth.h"
-#include "nm-setting-connection.h"
-#include "nm-setting-infiniband.h"
-#include "nm-setting-ip4-config.h"
-#include "nm-setting-ip6-config.h"
-#include "nm-setting-ppp.h"
-#include "nm-setting-pppoe.h"
-#include "nm-setting-wimax.h"
-#include "nm-setting-wired.h"
-#include "nm-setting-adsl.h"
-#include "nm-setting-wireless.h"
-#include "nm-setting-wireless-security.h"
-#include "nm-setting-serial.h"
-#include "nm-setting-vpn.h"
-#include "nm-setting-olpc-mesh.h"
-#include "nm-setting-bond.h"
-#include "nm-setting-team.h"
-#include "nm-setting-team-port.h"
-#include "nm-setting-bridge.h"
-#include "nm-setting-bridge-port.h"
-#include "nm-setting-vlan.h"
-#include "nm-setting-serial.h"
-#include "nm-setting-gsm.h"
-#include "nm-setting-cdma.h"
+#include "nm-core-internal.h"
/**
* SECTION:nm-connection
diff --git a/libnm-core/nm-connection.h b/libnm-core/nm-connection.h
index 28254c33fa..ec5db7fa2b 100644
--- a/libnm-core/nm-connection.h
+++ b/libnm-core/nm-connection.h
@@ -27,38 +27,10 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
-#include <glib.h>
-#include <glib-object.h>
+#include <nm-core-types.h>
#include <nm-setting.h>
#include <nm-errors.h>
-#include <nm-setting-8021x.h>
-#include <nm-setting-bluetooth.h>
-#include <nm-setting-bond.h>
-#include <nm-setting-team.h>
-#include <nm-setting-team-port.h>
-#include <nm-setting-bridge.h>
-#include <nm-setting-bridge-port.h>
-#include <nm-setting-cdma.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-dcb.h>
-#include <nm-setting-generic.h>
-#include <nm-setting-gsm.h>
-#include <nm-setting-infiniband.h>
-#include <nm-setting-ip4-config.h>
-#include <nm-setting-ip6-config.h>
-#include <nm-setting-olpc-mesh.h>
-#include <nm-setting-ppp.h>
-#include <nm-setting-pppoe.h>
-#include <nm-setting-serial.h>
-#include <nm-setting-vpn.h>
-#include <nm-setting-wimax.h>
-#include <nm-setting-wired.h>
-#include <nm-setting-adsl.h>
-#include <nm-setting-wireless.h>
-#include <nm-setting-wireless-security.h>
-#include <nm-setting-vlan.h>
-
G_BEGIN_DECLS
#define NM_TYPE_CONNECTION (nm_connection_get_type ())
@@ -84,7 +56,6 @@ G_BEGIN_DECLS
* NMConnection is the interface implemented by #NMRemoteConnection on the
* client side, and #NMSettingsConnection on the daemon side.
*/
-typedef struct _NMConnection NMConnection;
typedef struct {
GTypeInterface parent;
diff --git a/libnm-core/nm-core-types.h b/libnm-core/nm-core-types.h
new file mode 100644
index 0000000000..a6fc529fae
--- /dev/null
+++ b/libnm-core/nm-core-types.h
@@ -0,0 +1,59 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * 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.
+ *
+ * Copyright 2014 Red Hat, Inc.
+ */
+
+#ifndef __NM_CORE_TYPES_H__
+#define __NM_CORE_TYPES_H__
+
+#include <glib-object.h>
+
+#include <nm-dbus-interface.h>
+#include <nm-core-enum-types.h>
+
+typedef struct _NMConnection NMConnection;
+typedef struct _NMSetting NMSetting;
+typedef struct _NMSetting8021x NMSetting8021x;
+typedef struct _NMSettingAdsl NMSettingAdsl;
+typedef struct _NMSettingBluetooth NMSettingBluetooth;
+typedef struct _NMSettingBond NMSettingBond;
+typedef struct _NMSettingBridge NMSettingBridge;
+typedef struct _NMSettingBridgePort NMSettingBridgePort;
+typedef struct _NMSettingCdma NMSettingCdma;
+typedef struct _NMSettingConnection NMSettingConnection;
+typedef struct _NMSettingDcb NMSettingDcb;
+typedef struct _NMSettingGeneric NMSettingGeneric;
+typedef struct _NMSettingGsm NMSettingGsm;
+typedef struct _NMSettingInfiniband NMSettingInfiniband;
+typedef struct _NMSettingIP4Config NMSettingIP4Config;
+typedef struct _NMSettingIP6Config NMSettingIP6Config;
+typedef struct _NMSettingOlpcMesh NMSettingOlpcMesh;
+typedef struct _NMSettingPpp NMSettingPpp;
+typedef struct _NMSettingPppoe NMSettingPppoe;
+typedef struct _NMSettingSerial NMSettingSerial;
+typedef struct _NMSettingTeam NMSettingTeam;
+typedef struct _NMSettingTeamPort NMSettingTeamPort;
+typedef struct _NMSettingVlan NMSettingVlan;
+typedef struct _NMSettingVpn NMSettingVpn;
+typedef struct _NMSettingWimax NMSettingWimax;
+typedef struct _NMSettingWired NMSettingWired;
+typedef struct _NMSettingWireless NMSettingWireless;
+typedef struct _NMSettingWirelessSecurity NMSettingWirelessSecurity;
+typedef struct _NMSimpleConnection NMSimpleConnection;
+
+#endif /* __NM_CORE_TYPES_H__ */
diff --git a/libnm-core/nm-setting-8021x.h b/libnm-core/nm-setting-8021x.h
index ab6cde4401..10338de998 100644
--- a/libnm-core/nm-setting-8021x.h
+++ b/libnm-core/nm-setting-8021x.h
@@ -132,9 +132,9 @@ typedef enum { /*< underscore_name=nm_setting_802_1x_ck_scheme >*/
* properties to the paths to their respective objects.
*/
-typedef struct {
+struct _NMSetting8021x {
NMSetting parent;
-} NMSetting8021x;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-adsl.h b/libnm-core/nm-setting-adsl.h
index 57237f1e1b..2b44d68687 100644
--- a/libnm-core/nm-setting-adsl.h
+++ b/libnm-core/nm-setting-adsl.h
@@ -54,9 +54,9 @@ G_BEGIN_DECLS
#define NM_SETTING_ADSL_ENCAPSULATION_VCMUX "vcmux"
#define NM_SETTING_ADSL_ENCAPSULATION_LLC "llc"
-typedef struct {
+struct _NMSettingAdsl {
NMSetting parent;
-} NMSettingAdsl;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-bluetooth.h b/libnm-core/nm-setting-bluetooth.h
index ca0c17110a..6bb5ce80a4 100644
--- a/libnm-core/nm-setting-bluetooth.h
+++ b/libnm-core/nm-setting-bluetooth.h
@@ -59,9 +59,9 @@ G_BEGIN_DECLS
*/
#define NM_SETTING_BLUETOOTH_TYPE_PANU "panu"
-typedef struct {
+struct _NMSettingBluetooth {
NMSetting parent;
-} NMSettingBluetooth;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-bond.c b/libnm-core/nm-setting-bond.c
index 19eee1edf4..fb65c1f998 100644
--- a/libnm-core/nm-setting-bond.c
+++ b/libnm-core/nm-setting-bond.c
@@ -30,6 +30,7 @@
#include "nm-utils.h"
#include "nm-utils-private.h"
#include "nm-setting-private.h"
+#include "nm-setting-infiniband.h"
/**
* SECTION:nm-setting-bond
diff --git a/libnm-core/nm-setting-bond.h b/libnm-core/nm-setting-bond.h
index e656ca887b..055801a594 100644
--- a/libnm-core/nm-setting-bond.h
+++ b/libnm-core/nm-setting-bond.h
@@ -58,9 +58,9 @@ G_BEGIN_DECLS
#define NM_SETTING_BOND_OPTION_RESEND_IGMP "resend_igmp"
#define NM_SETTING_BOND_OPTION_LACP_RATE "lacp_rate"
-typedef struct {
+struct _NMSettingBond {
NMSetting parent;
-} NMSettingBond;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-bridge-port.c b/libnm-core/nm-setting-bridge-port.c
index 05d394721c..6f215951ad 100644
--- a/libnm-core/nm-setting-bridge-port.c
+++ b/libnm-core/nm-setting-bridge-port.c
@@ -28,6 +28,8 @@
#include "nm-utils.h"
#include "nm-utils-private.h"
#include "nm-setting-private.h"
+#include "nm-setting-connection.h"
+#include "nm-setting-bridge.h"
/**
* SECTION:nm-setting-bridge-port
diff --git a/libnm-core/nm-setting-bridge-port.h b/libnm-core/nm-setting-bridge-port.h
index 87fd898dbd..49ca38b34e 100644
--- a/libnm-core/nm-setting-bridge-port.h
+++ b/libnm-core/nm-setting-bridge-port.h
@@ -43,9 +43,9 @@ G_BEGIN_DECLS
#define NM_SETTING_BRIDGE_PORT_PATH_COST "path-cost"
#define NM_SETTING_BRIDGE_PORT_HAIRPIN_MODE "hairpin-mode"
-typedef struct {
+struct _NMSettingBridgePort {
NMSetting parent;
-} NMSettingBridgePort;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-bridge.h b/libnm-core/nm-setting-bridge.h
index 68eb10458a..b4fe747726 100644
--- a/libnm-core/nm-setting-bridge.h
+++ b/libnm-core/nm-setting-bridge.h
@@ -47,9 +47,9 @@ G_BEGIN_DECLS
#define NM_SETTING_BRIDGE_MAX_AGE "max-age"
#define NM_SETTING_BRIDGE_AGEING_TIME "ageing-time"
-typedef struct {
+struct _NMSettingBridge {
NMSetting parent;
-} NMSettingBridge;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-cdma.h b/libnm-core/nm-setting-cdma.h
index 49f77a6ad6..6e333dccc9 100644
--- a/libnm-core/nm-setting-cdma.h
+++ b/libnm-core/nm-setting-cdma.h
@@ -45,9 +45,9 @@ G_BEGIN_DECLS
#define NM_SETTING_CDMA_PASSWORD "password"
#define NM_SETTING_CDMA_PASSWORD_FLAGS "password-flags"
-typedef struct {
+struct _NMSettingCdma {
NMSetting parent;
-} NMSettingCdma;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-connection.c b/libnm-core/nm-setting-connection.c
index b060345b6a..45819cc4c6 100644
--- a/libnm-core/nm-setting-connection.c
+++ b/libnm-core/nm-setting-connection.c
@@ -27,6 +27,10 @@
#include "nm-utils-private.h"
#include "nm-setting-connection.h"
#include "nm-setting-private.h"
+#include "nm-setting-bond.h"
+#include "nm-setting-bridge.h"
+#include "nm-setting-team.h"
+#include "nm-setting-vlan.h"
/**
* SECTION:nm-setting-connection
diff --git a/libnm-core/nm-setting-connection.h b/libnm-core/nm-setting-connection.h
index 13890c32a1..d1ad0fe1e5 100644
--- a/libnm-core/nm-setting-connection.h
+++ b/libnm-core/nm-setting-connection.h
@@ -65,9 +65,9 @@ G_BEGIN_DECLS
* The NMSettingConnection struct contains only private data.
* It should only be accessed through the functions described below.
*/
-typedef struct {
+struct _NMSettingConnection {
NMSetting parent;
-} NMSettingConnection;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-dcb.h b/libnm-core/nm-setting-dcb.h
index 089d266cf6..e5bc4bcfa7 100644
--- a/libnm-core/nm-setting-dcb.h
+++ b/libnm-core/nm-setting-dcb.h
@@ -93,9 +93,9 @@ typedef enum { /*< flags >*/
#define NM_SETTING_DCB_PRIORITY_TRAFFIC_CLASS "priority-traffic-class"
-typedef struct {
+struct _NMSettingDcb {
NMSetting parent;
-} NMSettingDcb;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-generic.h b/libnm-core/nm-setting-generic.h
index db12b80491..7a209da259 100644
--- a/libnm-core/nm-setting-generic.h
+++ b/libnm-core/nm-setting-generic.h
@@ -39,9 +39,9 @@ G_BEGIN_DECLS
#define NM_SETTING_GENERIC_SETTING_NAME "generic"
-typedef struct {
+struct _NMSettingGeneric {
NMSetting parent;
-} NMSettingGeneric;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-gsm.h b/libnm-core/nm-setting-gsm.h
index 21e3c92b6e..907567381a 100644
--- a/libnm-core/nm-setting-gsm.h
+++ b/libnm-core/nm-setting-gsm.h
@@ -50,9 +50,9 @@ G_BEGIN_DECLS
#define NM_SETTING_GSM_PIN_FLAGS "pin-flags"
#define NM_SETTING_GSM_HOME_ONLY "home-only"
-typedef struct {
+struct _NMSettingGsm {
NMSetting parent;
-} NMSettingGsm;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-infiniband.h b/libnm-core/nm-setting-infiniband.h
index 35a576b3bd..c5ad418b22 100644
--- a/libnm-core/nm-setting-infiniband.h
+++ b/libnm-core/nm-setting-infiniband.h
@@ -45,9 +45,9 @@ G_BEGIN_DECLS
#define NM_SETTING_INFINIBAND_P_KEY "p-key"
#define NM_SETTING_INFINIBAND_PARENT "parent"
-typedef struct {
+struct _NMSettingInfiniband {
NMSetting parent;
-} NMSettingInfiniband;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-ip4-config.c b/libnm-core/nm-setting-ip4-config.c
index c1384bb54f..80e1f38caf 100644
--- a/libnm-core/nm-setting-ip4-config.c
+++ b/libnm-core/nm-setting-ip4-config.c
@@ -22,6 +22,7 @@
#include <string.h>
#include <glib/gi18n.h>
+#include <arpa/inet.h>
#include "nm-setting-ip4-config.h"
#include "nm-utils.h"
diff --git a/libnm-core/nm-setting-ip4-config.h b/libnm-core/nm-setting-ip4-config.h
index 004024113f..369e1d46d2 100644
--- a/libnm-core/nm-setting-ip4-config.h
+++ b/libnm-core/nm-setting-ip4-config.h
@@ -148,9 +148,9 @@ void nm_ip4_route_set_metric (NMIP4Route *route,
guint32 metric);
-typedef struct {
+struct _NMSettingIP4Config {
NMSetting parent;
-} NMSettingIP4Config;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-ip6-config.h b/libnm-core/nm-setting-ip6-config.h
index ec6299f3f0..831f212bb6 100644
--- a/libnm-core/nm-setting-ip6-config.h
+++ b/libnm-core/nm-setting-ip6-config.h
@@ -178,9 +178,9 @@ guint32 nm_ip6_route_get_metric (NMIP6Route *route);
void nm_ip6_route_set_metric (NMIP6Route *route,
guint32 metric);
-typedef struct {
+struct _NMSettingIP6Config {
NMSetting parent;
-} NMSettingIP6Config;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-olpc-mesh.h b/libnm-core/nm-setting-olpc-mesh.h
index a3e202adf0..6a1656514b 100644
--- a/libnm-core/nm-setting-olpc-mesh.h
+++ b/libnm-core/nm-setting-olpc-mesh.h
@@ -44,9 +44,9 @@ G_BEGIN_DECLS
#define NM_SETTING_OLPC_MESH_CHANNEL "channel"
#define NM_SETTING_OLPC_MESH_DHCP_ANYCAST_ADDRESS "dhcp-anycast-address"
-typedef struct {
+struct _NMSettingOlpcMesh {
NMSetting parent;
-} NMSettingOlpcMesh;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-ppp.h b/libnm-core/nm-setting-ppp.h
index a1d2b62811..2e0162cc59 100644
--- a/libnm-core/nm-setting-ppp.h
+++ b/libnm-core/nm-setting-ppp.h
@@ -59,9 +59,9 @@ G_BEGIN_DECLS
#define NM_SETTING_PPP_LCP_ECHO_FAILURE "lcp-echo-failure"
#define NM_SETTING_PPP_LCP_ECHO_INTERVAL "lcp-echo-interval"
-typedef struct {
+struct _NMSettingPpp {
NMSetting parent;
-} NMSettingPpp;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-pppoe.h b/libnm-core/nm-setting-pppoe.h
index 8595baf14d..b1e0d92feb 100644
--- a/libnm-core/nm-setting-pppoe.h
+++ b/libnm-core/nm-setting-pppoe.h
@@ -45,9 +45,9 @@ G_BEGIN_DECLS
#define NM_SETTING_PPPOE_PASSWORD "password"
#define NM_SETTING_PPPOE_PASSWORD_FLAGS "password-flags"
-typedef struct {
+struct _NMSettingPppoe {
NMSetting parent;
-} NMSettingPppoe;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-serial.h b/libnm-core/nm-setting-serial.h
index 15b18150b2..582892277b 100644
--- a/libnm-core/nm-setting-serial.h
+++ b/libnm-core/nm-setting-serial.h
@@ -60,9 +60,9 @@ typedef enum {
#define NM_SETTING_SERIAL_STOPBITS "stopbits"
#define NM_SETTING_SERIAL_SEND_DELAY "send-delay"
-typedef struct {
+struct _NMSettingSerial {
NMSetting parent;
-} NMSettingSerial;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-team-port.c b/libnm-core/nm-setting-team-port.c
index dceab5c746..66443633b9 100644
--- a/libnm-core/nm-setting-team-port.c
+++ b/libnm-core/nm-setting-team-port.c
@@ -27,6 +27,8 @@
#include "nm-utils.h"
#include "nm-utils-private.h"
#include "nm-setting-private.h"
+#include "nm-setting-connection.h"
+#include "nm-setting-team.h"
/**
* SECTION:nm-setting-team-port
diff --git a/libnm-core/nm-setting-team-port.h b/libnm-core/nm-setting-team-port.h
index 644b0b5bd8..86efb97c40 100644
--- a/libnm-core/nm-setting-team-port.h
+++ b/libnm-core/nm-setting-team-port.h
@@ -40,9 +40,9 @@ G_BEGIN_DECLS
#define NM_SETTING_TEAM_PORT_CONFIG "config"
-typedef struct {
+struct _NMSettingTeamPort {
NMSetting parent;
-} NMSettingTeamPort;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-team.h b/libnm-core/nm-setting-team.h
index 0c7fd1f940..d66eb6858a 100644
--- a/libnm-core/nm-setting-team.h
+++ b/libnm-core/nm-setting-team.h
@@ -40,9 +40,9 @@ G_BEGIN_DECLS
#define NM_SETTING_TEAM_CONFIG "config"
-typedef struct {
+struct _NMSettingTeam {
NMSetting parent;
-} NMSettingTeam;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-vlan.c b/libnm-core/nm-setting-vlan.c
index 31fa51d852..00fca606cc 100644
--- a/libnm-core/nm-setting-vlan.c
+++ b/libnm-core/nm-setting-vlan.c
@@ -27,7 +27,7 @@
#include "nm-utils.h"
#include "nm-setting-connection.h"
#include "nm-setting-private.h"
-#include "nm-core-enum-types.h"
+#include "nm-setting-wired.h"
/**
* SECTION:nm-setting-vlan
diff --git a/libnm-core/nm-setting-vlan.h b/libnm-core/nm-setting-vlan.h
index 68f73b8151..30305d327c 100644
--- a/libnm-core/nm-setting-vlan.h
+++ b/libnm-core/nm-setting-vlan.h
@@ -46,9 +46,9 @@ G_BEGIN_DECLS
#define NM_SETTING_VLAN_INGRESS_PRIORITY_MAP "ingress-priority-map"
#define NM_SETTING_VLAN_EGRESS_PRIORITY_MAP "egress-priority-map"
-typedef struct {
+struct _NMSettingVlan {
NMSetting parent;
-} NMSettingVlan;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-vpn.h b/libnm-core/nm-setting-vpn.h
index 7a6fed86cb..aa4264fdd9 100644
--- a/libnm-core/nm-setting-vpn.h
+++ b/libnm-core/nm-setting-vpn.h
@@ -45,9 +45,9 @@ G_BEGIN_DECLS
#define NM_SETTING_VPN_DATA "data"
#define NM_SETTING_VPN_SECRETS "secrets"
-typedef struct {
+struct _NMSettingVpn {
NMSetting parent;
-} NMSettingVpn;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-wimax.h b/libnm-core/nm-setting-wimax.h
index fe262a5a73..0a58504669 100644
--- a/libnm-core/nm-setting-wimax.h
+++ b/libnm-core/nm-setting-wimax.h
@@ -42,9 +42,9 @@ G_BEGIN_DECLS
#define NM_SETTING_WIMAX_NETWORK_NAME "network-name"
#define NM_SETTING_WIMAX_MAC_ADDRESS "mac-address"
-typedef struct {
+struct _NMSettingWimax {
NMSetting parent;
-} NMSettingWimax;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-wired.h b/libnm-core/nm-setting-wired.h
index 0439291cc5..4189b68967 100644
--- a/libnm-core/nm-setting-wired.h
+++ b/libnm-core/nm-setting-wired.h
@@ -52,9 +52,9 @@ G_BEGIN_DECLS
#define NM_SETTING_WIRED_S390_NETTYPE "s390-nettype"
#define NM_SETTING_WIRED_S390_OPTIONS "s390-options"
-typedef struct {
+struct _NMSettingWired {
NMSetting parent;
-} NMSettingWired;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-wireless-security.c b/libnm-core/nm-setting-wireless-security.c
index c6171869cc..f66722b270 100644
--- a/libnm-core/nm-setting-wireless-security.c
+++ b/libnm-core/nm-setting-wireless-security.c
@@ -29,7 +29,7 @@
#include "nm-utils.h"
#include "nm-utils-private.h"
#include "nm-setting-private.h"
-#include "nm-core-enum-types.h"
+#include "nm-setting-wireless.h"
/**
* SECTION:nm-setting-wireless-security
diff --git a/libnm-core/nm-setting-wireless-security.h b/libnm-core/nm-setting-wireless-security.h
index 7c9e7ec472..8c4e1f0382 100644
--- a/libnm-core/nm-setting-wireless-security.h
+++ b/libnm-core/nm-setting-wireless-security.h
@@ -89,9 +89,9 @@ typedef enum {
#define NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD "leap-password"
#define NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD_FLAGS "leap-password-flags"
-typedef struct {
+struct _NMSettingWirelessSecurity {
NMSetting parent;
-} NMSettingWirelessSecurity;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting-wireless.h b/libnm-core/nm-setting-wireless.h
index e9e6ae7dab..98fa98dc6c 100644
--- a/libnm-core/nm-setting-wireless.h
+++ b/libnm-core/nm-setting-wireless.h
@@ -79,9 +79,9 @@ G_BEGIN_DECLS
*/
#define NM_SETTING_WIRELESS_MODE_INFRA "infrastructure"
-typedef struct {
+struct _NMSettingWireless {
NMSetting parent;
-} NMSettingWireless;
+};
typedef struct {
NMSettingClass parent;
diff --git a/libnm-core/nm-setting.c b/libnm-core/nm-setting.c
index aac29fa428..81547b3f91 100644
--- a/libnm-core/nm-setting.c
+++ b/libnm-core/nm-setting.c
@@ -26,12 +26,20 @@
#include "nm-setting.h"
#include "nm-setting-private.h"
-#include "nm-setting-connection.h"
#include "nm-utils.h"
#include "nm-core-internal.h"
#include "nm-utils-private.h"
#include "nm-property-compare.h"
+#include "nm-setting-connection.h"
+#include "nm-setting-bond.h"
+#include "nm-setting-bridge.h"
+#include "nm-setting-bridge-port.h"
+#include "nm-setting-pppoe.h"
+#include "nm-setting-team.h"
+#include "nm-setting-team-port.h"
+#include "nm-setting-vpn.h"
+
/**
* SECTION:nm-setting
* @short_description: Describes related configuration information
diff --git a/libnm-core/nm-setting.h b/libnm-core/nm-setting.h
index 68cb1d5e01..8f845b203e 100644
--- a/libnm-core/nm-setting.h
+++ b/libnm-core/nm-setting.h
@@ -27,10 +27,7 @@
#error "Only <NetworkManager.h> can be included directly."
#endif
-#include <glib.h>
-#include <glib-object.h>
-
-#include <nm-version.h>
+#include <nm-core-types.h>
G_BEGIN_DECLS
@@ -138,9 +135,9 @@ typedef enum {
* The NMSetting struct contains only private data.
* It should only be accessed through the functions described below.
*/
-typedef struct {
+struct _NMSetting {
GObject parent;
-} NMSetting;
+};
/**
diff --git a/libnm-core/nm-simple-connection.h b/libnm-core/nm-simple-connection.h
index aea04e3a67..da6030a882 100644
--- a/libnm-core/nm-simple-connection.h
+++ b/libnm-core/nm-simple-connection.h
@@ -36,9 +36,9 @@ G_BEGIN_DECLS
#define NM_IS_SIMPLE_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_SIMPLE_CONNECTION))
#define NM_SIMPLE_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SIMPLE_CONNECTION, NMSimpleConnectionClass))
-typedef struct {
+struct _NMSimpleConnection {
GObject parent;
-} NMSimpleConnection;
+};
typedef struct {
GObjectClass parent_class;
diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c
index 017c343b0d..dfa0d7cf81 100644
--- a/libnm-core/nm-utils.c
+++ b/libnm-core/nm-utils.c
@@ -33,6 +33,15 @@
#include "nm-setting-private.h"
#include "crypto.h"
+#include "nm-setting-bond.h"
+#include "nm-setting-bridge.h"
+#include "nm-setting-infiniband.h"
+#include "nm-setting-ip6-config.h"
+#include "nm-setting-team.h"
+#include "nm-setting-vlan.h"
+#include "nm-setting-wired.h"
+#include "nm-setting-wireless.h"
+
/**
* SECTION:nm-utils
* @short_description: Utility functions
diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h
index a94730793e..5dd3a84342 100644
--- a/libnm-core/nm-utils.h
+++ b/libnm-core/nm-utils.h
@@ -27,13 +27,15 @@
#include <glib.h>
+#include <netinet/in.h>
+
/* For ETH_ALEN and INFINIBAND_ALEN */
#include <linux/if_ether.h>
#include <linux/if_infiniband.h>
-#include "nm-connection.h"
-#include "nm-simple-connection.h"
+#include "nm-dbus-interface.h"
#include "nm-core-enum-types.h"
+#include "nm-setting-wireless-security.h"
G_BEGIN_DECLS
diff --git a/libnm-core/tests/test-general.c b/libnm-core/tests/test-general.c
index 88a296640e..bc8b0925ea 100644
--- a/libnm-core/tests/test-general.c
+++ b/libnm-core/tests/test-general.c
@@ -25,20 +25,35 @@
#include <nm-utils.h>
#include "nm-setting-private.h"
+#include "nm-utils.h"
+#include "nm-core-internal.h"
+
+#include "nm-setting-8021x.h"
+#include "nm-setting-adsl.h"
+#include "nm-setting-bluetooth.h"
+#include "nm-setting-bond.h"
+#include "nm-setting-bridge.h"
+#include "nm-setting-bridge-port.h"
+#include "nm-setting-cdma.h"
#include "nm-setting-connection.h"
-#include "nm-setting-vpn.h"
+#include "nm-setting-generic.h"
#include "nm-setting-gsm.h"
-#include "nm-setting-cdma.h"
-#include "nm-setting-wired.h"
-#include "nm-setting-wireless-security.h"
-#include "nm-setting-ip6-config.h"
+#include "nm-setting-infiniband.h"
#include "nm-setting-ip4-config.h"
+#include "nm-setting-ip6-config.h"
+#include "nm-setting-olpc-mesh.h"
+#include "nm-setting-ppp.h"
#include "nm-setting-pppoe.h"
#include "nm-setting-serial.h"
+#include "nm-setting-team.h"
+#include "nm-setting-team-port.h"
#include "nm-setting-vlan.h"
-#include "nm-setting-bond.h"
-#include "nm-utils.h"
-#include "nm-core-internal.h"
+#include "nm-setting-vpn.h"
+#include "nm-setting-wimax.h"
+#include "nm-setting-wired.h"
+#include "nm-setting-wireless.h"
+#include "nm-setting-wireless-security.h"
+#include "nm-simple-connection.h"
#include "nm-test-utils.h"
diff --git a/libnm-core/tests/test-secrets.c b/libnm-core/tests/test-secrets.c
index eec22524fd..b93a1ba155 100644
--- a/libnm-core/tests/test-secrets.c
+++ b/libnm-core/tests/test-secrets.c
@@ -22,17 +22,18 @@
#include <glib.h>
#include <string.h>
-#include "nm-setting-connection.h"
-#include "nm-setting-wired.h"
#include "nm-setting-8021x.h"
-#include "nm-setting-ip4-config.h"
-#include "nm-setting-wireless.h"
-#include "nm-setting-wireless-security.h"
#include "nm-setting-cdma.h"
+#include "nm-setting-connection.h"
#include "nm-setting-gsm.h"
+#include "nm-setting-ip4-config.h"
#include "nm-setting-ppp.h"
#include "nm-setting-pppoe.h"
#include "nm-setting-vpn.h"
+#include "nm-setting-wired.h"
+#include "nm-setting-wireless-security.h"
+#include "nm-setting-wireless.h"
+#include "nm-simple-connection.h"
#include "nm-utils.h"
#include "nm-test-utils.h"
diff --git a/libnm-core/tests/test-setting-dcb.c b/libnm-core/tests/test-setting-dcb.c
index 8e2872aeee..1b83a48d1d 100644
--- a/libnm-core/tests/test-setting-dcb.c
+++ b/libnm-core/tests/test-setting-dcb.c
@@ -24,6 +24,7 @@
#include <nm-utils.h>
#include <nm-glib-compat.h>
#include "nm-setting-dcb.h"
+#include "nm-connection.h"
#define DCB_FLAGS_ALL (NM_SETTING_DCB_FLAG_ENABLE | \
NM_SETTING_DCB_FLAG_ADVERTISE | \