summaryrefslogtreecommitdiff
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
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.
-rw-r--r--callouts/tests/test-dispatcher-envp.c4
-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
-rw-r--r--libnm/nm-device-adsl.c1
-rw-r--r--libnm/nm-device-generic.c1
-rw-r--r--libnm/nm-device-vlan.c1
-rw-r--r--libnm/nm-device.c1
-rw-r--r--libnm/nm-vpn-plugin-old.c1
-rw-r--r--src/devices/bluetooth/nm-bluez-device.c4
-rw-r--r--src/devices/nm-device-bond.c2
-rw-r--r--src/devices/nm-device-bridge.c2
-rw-r--r--src/devices/nm-device-ethernet.c7
-rw-r--r--src/devices/nm-device-generic.c2
-rw-r--r--src/devices/nm-device-gre.c1
-rw-r--r--src/devices/nm-device-infiniband.c2
-rw-r--r--src/devices/nm-device-vlan.c2
-rw-r--r--src/devices/nm-device.c4
-rw-r--r--src/devices/team/nm-device-team.c2
-rw-r--r--src/devices/team/nm-team-factory.c1
-rw-r--r--src/devices/wifi/tests/test-wifi-ap-utils.c6
-rw-r--r--src/devices/wwan/nm-device-modem.c1
-rw-r--r--src/devices/wwan/nm-modem-broadband.c3
-rw-r--r--src/nm-manager.c5
-rw-r--r--src/ppp-manager/nm-ppp-manager.c8
-rw-r--r--src/settings/nm-settings-connection.c5
-rw-r--r--src/settings/plugins/ibft/reader.c8
-rw-r--r--src/settings/plugins/ibft/tests/test-ibft.c7
-rw-r--r--src/settings/plugins/ifcfg-rh/utils.c3
-rw-r--r--src/settings/plugins/ifnet/connection_parser.c14
-rw-r--r--src/settings/plugins/ifupdown/parser.c16
-rw-r--r--src/settings/plugins/ifupdown/tests/test-ifupdown.c3
-rw-r--r--src/settings/plugins/keyfile/reader.c11
-rw-r--r--src/settings/plugins/keyfile/tests/test-keyfile.c15
-rw-r--r--src/supplicant-manager/tests/test-supplicant-config.c8
-rw-r--r--src/tests/test-general.c2
-rw-r--r--src/vpn-manager/nm-vpn-connection.c8
79 files changed, 225 insertions, 253 deletions
diff --git a/callouts/tests/test-dispatcher-envp.c b/callouts/tests/test-dispatcher-envp.c
index c2f1b41df7..a8c65f8413 100644
--- a/callouts/tests/test-dispatcher-envp.c
+++ b/callouts/tests/test-dispatcher-envp.c
@@ -25,11 +25,9 @@
#include <glib.h>
#include <glib-object.h>
-#include "nm-connection.h"
-#include "nm-setting-connection.h"
+#include "nm-core-internal.h"
#include "nm-dispatcher-utils.h"
#include "nm-dispatcher-api.h"
-#include "nm-utils.h"
/*******************************************/
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 | \
diff --git a/libnm/nm-device-adsl.c b/libnm/nm-device-adsl.c
index dbf1cb406f..af0afa52d1 100644
--- a/libnm/nm-device-adsl.c
+++ b/libnm/nm-device-adsl.c
@@ -24,6 +24,7 @@
#include "nm-object-private.h"
#include "nm-setting-adsl.h"
+#include "nm-setting-connection.h"
#include <string.h>
#include <glib/gi18n.h>
diff --git a/libnm/nm-device-generic.c b/libnm/nm-device-generic.c
index 999bb802dd..a2a4935361 100644
--- a/libnm/nm-device-generic.c
+++ b/libnm/nm-device-generic.c
@@ -27,6 +27,7 @@
#include "nm-device-private.h"
#include "nm-object-private.h"
#include "nm-setting-generic.h"
+#include "nm-setting-connection.h"
G_DEFINE_TYPE (NMDeviceGeneric, nm_device_generic, NM_TYPE_DEVICE)
diff --git a/libnm/nm-device-vlan.c b/libnm/nm-device-vlan.c
index 9796c4523d..51bf901364 100644
--- a/libnm/nm-device-vlan.c
+++ b/libnm/nm-device-vlan.c
@@ -26,6 +26,7 @@
#include <nm-setting-connection.h>
#include <nm-setting-vlan.h>
+#include <nm-setting-wired.h>
#include <nm-utils.h>
#include "nm-device-vlan.h"
diff --git a/libnm/nm-device.c b/libnm/nm-device.c
index bf7cbe9357..90df14035f 100644
--- a/libnm/nm-device.c
+++ b/libnm/nm-device.c
@@ -52,6 +52,7 @@
#include "nm-glib-compat.h"
#include "nm-utils.h"
#include "nm-dbus-helpers.h"
+#include "nm-setting-connection.h"
#include "nmdbus-device.h"
diff --git a/libnm/nm-vpn-plugin-old.c b/libnm/nm-vpn-plugin-old.c
index 28e6b7a587..e43dbacb1f 100644
--- a/libnm/nm-vpn-plugin-old.c
+++ b/libnm/nm-vpn-plugin-old.c
@@ -37,6 +37,7 @@
#include "nm-connection.h"
#include "nm-dbus-helpers.h"
#include "nm-core-internal.h"
+#include "nm-simple-connection.h"
#include "nmdbus-vpn-plugin.h"
diff --git a/src/devices/bluetooth/nm-bluez-device.c b/src/devices/bluetooth/nm-bluez-device.c
index 6c1693533c..74a89a5f64 100644
--- a/src/devices/bluetooth/nm-bluez-device.c
+++ b/src/devices/bluetooth/nm-bluez-device.c
@@ -24,13 +24,11 @@
#include <gio/gio.h>
#include <string.h>
-#include "nm-dbus-interface.h"
-#include "nm-setting-bluetooth.h"
+#include "nm-core-internal.h"
#include "nm-bluez-common.h"
#include "nm-bluez-device.h"
#include "nm-logging.h"
-#include "nm-utils.h"
#include "nm-settings-connection.h"
#include "nm-bluez5-dun.h"
#include "NetworkManagerUtils.h"
diff --git a/src/devices/nm-device-bond.c b/src/devices/nm-device-bond.c
index e029aafa06..9d9fe426b2 100644
--- a/src/devices/nm-device-bond.c
+++ b/src/devices/nm-device-bond.c
@@ -29,7 +29,6 @@
#include "gsystem-local-alloc.h"
#include "nm-device-bond.h"
#include "nm-logging.h"
-#include "nm-utils.h"
#include "NetworkManagerUtils.h"
#include "nm-device-private.h"
#include "nm-platform.h"
@@ -37,6 +36,7 @@
#include "nm-dbus-manager.h"
#include "nm-enum-types.h"
#include "nm-device-factory.h"
+#include "nm-core-internal.h"
#include "nm-device-bond-glue.h"
diff --git a/src/devices/nm-device-bridge.c b/src/devices/nm-device-bridge.c
index 7a3c373c47..a70cfd9571 100644
--- a/src/devices/nm-device-bridge.c
+++ b/src/devices/nm-device-bridge.c
@@ -28,7 +28,6 @@
#include "gsystem-local-alloc.h"
#include "nm-device-bridge.h"
#include "nm-logging.h"
-#include "nm-utils.h"
#include "NetworkManagerUtils.h"
#include "nm-device-private.h"
#include "nm-dbus-glib-types.h"
@@ -36,6 +35,7 @@
#include "nm-enum-types.h"
#include "nm-platform.h"
#include "nm-device-factory.h"
+#include "nm-core-internal.h"
#include "nm-device-bridge-glue.h"
diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c
index 1ee689261c..eb1f75b455 100644
--- a/src/devices/nm-device-ethernet.c
+++ b/src/devices/nm-device-ethernet.c
@@ -42,14 +42,8 @@
#include "nm-supplicant-manager.h"
#include "nm-supplicant-interface.h"
#include "nm-supplicant-config.h"
-#include "nm-setting-connection.h"
-#include "nm-setting-wired.h"
-#include "nm-setting-8021x.h"
-#include "nm-setting-pppoe.h"
-#include "nm-setting-bond.h"
#include "ppp-manager/nm-ppp-manager.h"
#include "nm-logging.h"
-#include "nm-utils.h"
#include "nm-enum-types.h"
#include "nm-dbus-manager.h"
#include "nm-platform.h"
@@ -59,6 +53,7 @@
#include "nm-device-ethernet-utils.h"
#include "nm-connection-provider.h"
#include "nm-device-factory.h"
+#include "nm-core-internal.h"
#include "nm-device-ethernet-glue.h"
diff --git a/src/devices/nm-device-generic.c b/src/devices/nm-device-generic.c
index c5aadb8f20..f103ef8303 100644
--- a/src/devices/nm-device-generic.c
+++ b/src/devices/nm-device-generic.c
@@ -24,9 +24,9 @@
#include "nm-device-private.h"
#include "nm-enum-types.h"
#include "nm-platform.h"
-#include "nm-utils.h"
#include "nm-glib-compat.h"
#include "nm-dbus-manager.h"
+#include "nm-core-internal.h"
#include "nm-device-generic-glue.h"
diff --git a/src/devices/nm-device-gre.c b/src/devices/nm-device-gre.c
index 2f432c18f0..e7df12e3f8 100644
--- a/src/devices/nm-device-gre.c
+++ b/src/devices/nm-device-gre.c
@@ -29,6 +29,7 @@
#include "nm-manager.h"
#include "nm-platform.h"
#include "nm-device-factory.h"
+#include "nm-core-internal.h"
#include "nm-device-gre-glue.h"
diff --git a/src/devices/nm-device-infiniband.c b/src/devices/nm-device-infiniband.c
index 69cdc6715e..e1af899507 100644
--- a/src/devices/nm-device-infiniband.c
+++ b/src/devices/nm-device-infiniband.c
@@ -27,7 +27,6 @@
#include "nm-device-infiniband.h"
#include "nm-logging.h"
-#include "nm-utils.h"
#include "NetworkManagerUtils.h"
#include "nm-device-private.h"
#include "nm-enum-types.h"
@@ -36,6 +35,7 @@
#include "nm-ip4-config.h"
#include "nm-platform.h"
#include "nm-device-factory.h"
+#include "nm-core-internal.h"
#include "nm-device-infiniband-glue.h"
diff --git a/src/devices/nm-device-vlan.c b/src/devices/nm-device-vlan.c
index 1c78dd1ea2..555180f4e7 100644
--- a/src/devices/nm-device-vlan.c
+++ b/src/devices/nm-device-vlan.c
@@ -37,9 +37,9 @@
#include "nm-activation-request.h"
#include "nm-ip4-config.h"
#include "nm-platform.h"
-#include "nm-utils.h"
#include "nm-device-factory.h"
#include "nm-manager.h"
+#include "nm-core-internal.h"
#include "nm-device-vlan-glue.h"
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index c31536e614..af5e52750c 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -48,14 +48,10 @@
#include "nm-lndp-rdisc.h"
#include "nm-dhcp-manager.h"
#include "nm-dbus-manager.h"
-#include "nm-utils.h"
#include "nm-logging.h"
#include "nm-activation-request.h"
-#include "nm-setting-ip4-config.h"
#include "nm-ip4-config.h"
-#include "nm-setting-ip6-config.h"
#include "nm-ip6-config.h"
-#include "nm-setting-connection.h"
#include "nm-dnsmasq-manager.h"
#include "nm-dhcp4-config.h"
#include "nm-dhcp6-config.h"
diff --git a/src/devices/team/nm-device-team.c b/src/devices/team/nm-device-team.c
index 6778d46dc6..df27562019 100644
--- a/src/devices/team/nm-device-team.c
+++ b/src/devices/team/nm-device-team.c
@@ -32,7 +32,6 @@
#include "nm-device-team.h"
#include "nm-logging.h"
-#include "nm-utils.h"
#include "NetworkManagerUtils.h"
#include "nm-device-private.h"
#include "nm-platform.h"
@@ -41,6 +40,7 @@
#include "nm-enum-types.h"
#include "nm-team-enum-types.h"
#include "nm-posix-signals.h"
+#include "nm-core-internal.h"
#include "nm-device-team-glue.h"
diff --git a/src/devices/team/nm-team-factory.c b/src/devices/team/nm-team-factory.c
index 6743660015..8f6930aa23 100644
--- a/src/devices/team/nm-team-factory.c
+++ b/src/devices/team/nm-team-factory.c
@@ -27,6 +27,7 @@
#include "nm-device-team.h"
#include "nm-logging.h"
#include "nm-platform.h"
+#include "nm-core-internal.h"
static GType nm_team_factory_get_type (void);
diff --git a/src/devices/wifi/tests/test-wifi-ap-utils.c b/src/devices/wifi/tests/test-wifi-ap-utils.c
index 8a17722935..35920e932e 100644
--- a/src/devices/wifi/tests/test-wifi-ap-utils.c
+++ b/src/devices/wifi/tests/test-wifi-ap-utils.c
@@ -24,11 +24,7 @@
#include "nm-wifi-ap-utils.h"
#include "nm-dbus-glib-types.h"
-#include "nm-setting-connection.h"
-#include "nm-setting-wireless.h"
-#include "nm-setting-wireless-security.h"
-#include "nm-setting-8021x.h"
-#include "nm-utils.h"
+#include "nm-core-internal.h"
#define DEBUG 1
diff --git a/src/devices/wwan/nm-device-modem.c b/src/devices/wwan/nm-device-modem.c
index ea331a7948..3eb570c465 100644
--- a/src/devices/wwan/nm-device-modem.c
+++ b/src/devices/wwan/nm-device-modem.c
@@ -32,6 +32,7 @@
#include "nm-settings-connection.h"
#include "nm-modem-broadband.h"
#include "NetworkManagerUtils.h"
+#include "nm-core-internal.h"
#include "nm-device-logging.h"
_LOG_DECLARE_SELF(NMDeviceModem);
diff --git a/src/devices/wwan/nm-modem-broadband.c b/src/devices/wwan/nm-modem-broadband.c
index a9ed5d5a82..e896cbc10a 100644
--- a/src/devices/wwan/nm-modem-broadband.c
+++ b/src/devices/wwan/nm-modem-broadband.c
@@ -21,8 +21,9 @@
#include <glib/gi18n.h>
#include <string.h>
#include <libmm-glib.h>
+
#include "nm-modem-broadband.h"
-#include "nm-setting-connection.h"
+#include "nm-core-internal.h"
#include "nm-logging.h"
#include "NetworkManagerUtils.h"
#include "nm-device-private.h"
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 9012e0be2e..63ef38822e 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -40,9 +40,6 @@
#include "nm-vpn-manager.h"
#include "nm-device.h"
#include "nm-device-generic.h"
-#include "nm-setting-connection.h"
-#include "nm-setting-wireless.h"
-#include "nm-setting-vpn.h"
#include "nm-dbus-glib-types.h"
#include "nm-platform.h"
#include "nm-rfkill-manager.h"
@@ -52,7 +49,6 @@
#include "nm-auth-utils.h"
#include "nm-auth-manager.h"
#include "NetworkManagerUtils.h"
-#include "nm-utils.h"
#include "nm-device-factory.h"
#include "nm-enum-types.h"
#include "nm-sleep-monitor.h"
@@ -61,6 +57,7 @@
#include "nm-connection-provider.h"
#include "nm-session-monitor.h"
#include "nm-activation-request.h"
+#include "nm-core-internal.h"
#define NM_AUTOIP_DBUS_SERVICE "org.freedesktop.nm_avahi_autoipd"
#define NM_AUTOIP_DBUS_IFACE "org.freedesktop.nm_avahi_autoipd"
diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c
index a7bb62569e..2118589ffe 100644
--- a/src/ppp-manager/nm-ppp-manager.c
+++ b/src/ppp-manager/nm-ppp-manager.c
@@ -40,20 +40,14 @@
#endif
#include <linux/if_ppp.h>
-#include "nm-dbus-interface.h"
#include "NetworkManagerUtils.h"
#include "nm-glib-compat.h"
#include "nm-ppp-manager.h"
-#include "nm-setting-connection.h"
-#include "nm-setting-ppp.h"
-#include "nm-setting-pppoe.h"
-#include "nm-setting-adsl.h"
-#include "nm-setting-gsm.h"
-#include "nm-setting-cdma.h"
#include "nm-dbus-manager.h"
#include "nm-logging.h"
#include "nm-posix-signals.h"
#include "nm-platform.h"
+#include "nm-core-internal.h"
static void impl_ppp_manager_need_secrets (NMPPPManager *manager,
DBusGMethodInvocation *context);
diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c
index 6fc158b182..6a71c02036 100644
--- a/src/settings/nm-settings-connection.c
+++ b/src/settings/nm-settings-connection.c
@@ -25,10 +25,6 @@
#include <nm-dbus-interface.h>
#include <dbus/dbus-glib-lowlevel.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-vpn.h>
-#include <nm-setting-wireless.h>
-#include <nm-utils.h>
#include "nm-settings-connection.h"
#include "nm-session-monitor.h"
@@ -40,6 +36,7 @@
#include "nm-agent-manager.h"
#include "NetworkManagerUtils.h"
#include "nm-properties-changed-signal.h"
+#include "nm-core-internal.h"
#define SETTINGS_TIMESTAMPS_FILE NMSTATEDIR "/timestamps"
#define SETTINGS_SEEN_BSSIDS_FILE NMSTATEDIR "/seen-bssids"
diff --git a/src/settings/plugins/ibft/reader.c b/src/settings/plugins/ibft/reader.c
index f7e845231f..aac7715a7a 100644
--- a/src/settings/plugins/ibft/reader.c
+++ b/src/settings/plugins/ibft/reader.c
@@ -32,14 +32,8 @@
#include <glib.h>
#include <glib/gi18n.h>
-#include <nm-connection.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-ip4-config.h>
-#include <nm-setting-ip6-config.h>
-#include <nm-setting-vlan.h>
-#include <nm-setting-wired.h>
-#include <nm-utils.h>
+#include "nm-core-internal.h"
#include "nm-platform.h"
#include "nm-posix-signals.h"
#include "NetworkManagerUtils.h"
diff --git a/src/settings/plugins/ibft/tests/test-ibft.c b/src/settings/plugins/ibft/tests/test-ibft.c
index 8cf705a05a..3fb64ac4bd 100644
--- a/src/settings/plugins/ibft/tests/test-ibft.c
+++ b/src/settings/plugins/ibft/tests/test-ibft.c
@@ -27,12 +27,7 @@
#include <arpa/inet.h>
#include <sys/socket.h>
-#include <nm-utils.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-wired.h>
-#include <nm-setting-ip4-config.h>
-#include <nm-setting-vlan.h>
-
+#include "nm-core-internal.h"
#include "NetworkManagerUtils.h"
#include "reader.h"
diff --git a/src/settings/plugins/ifcfg-rh/utils.c b/src/settings/plugins/ifcfg-rh/utils.c
index 8ec7c0a131..919a048438 100644
--- a/src/settings/plugins/ifcfg-rh/utils.c
+++ b/src/settings/plugins/ifcfg-rh/utils.c
@@ -21,6 +21,9 @@
#include <glib.h>
#include <stdlib.h>
#include <string.h>
+
+#include "nm-core-internal.h"
+
#include "utils.h"
#include "shvar.h"
diff --git a/src/settings/plugins/ifnet/connection_parser.c b/src/settings/plugins/ifnet/connection_parser.c
index 8fcc6a62b8..380fc4d3b4 100644
--- a/src/settings/plugins/ifnet/connection_parser.c
+++ b/src/settings/plugins/ifnet/connection_parser.c
@@ -27,17 +27,9 @@
#include <errno.h>
#include <glib/gi18n.h>
-#include <nm-setting-connection.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-wired.h>
-#include <nm-setting-wireless.h>
-#include <nm-setting-8021x.h>
-#include <nm-system-config-interface.h>
-#include <nm-logging.h>
-#include <nm-utils.h>
+#include "nm-system-config-interface.h"
+#include "nm-logging.h"
+#include "nm-core-internal.h"
#include "net_utils.h"
#include "wpa_parser.h"
diff --git a/src/settings/plugins/ifupdown/parser.c b/src/settings/plugins/ifupdown/parser.c
index 18b8932494..415cfcc755 100644
--- a/src/settings/plugins/ifupdown/parser.c
+++ b/src/settings/plugins/ifupdown/parser.c
@@ -25,20 +25,12 @@
#include <arpa/inet.h>
#include <stdlib.h>
#include <errno.h>
-
-#include <nm-connection.h>
-#include <nm-dbus-interface.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-ip4-config.h>
-#include <nm-setting-ppp.h>
-#include <nm-setting-wired.h>
-#include <nm-setting-wireless.h>
-#include <nm-setting-8021x.h>
-#include <nm-system-config-interface.h>
-#include <nm-utils.h>
-#include <nm-logging.h>
#include <ctype.h>
+#include "nm-core-internal.h"
+#include "nm-system-config-interface.h"
+#include "nm-logging.h"
+
#include "parser.h"
#include "plugin.h"
diff --git a/src/settings/plugins/ifupdown/tests/test-ifupdown.c b/src/settings/plugins/ifupdown/tests/test-ifupdown.c
index 10c07f1ca9..8100676d79 100644
--- a/src/settings/plugins/ifupdown/tests/test-ifupdown.c
+++ b/src/settings/plugins/ifupdown/tests/test-ifupdown.c
@@ -21,8 +21,7 @@
#include <glib.h>
#include <string.h>
-#include <nm-utils.h>
-
+#include "nm-core-internal.h"
#include "nm-logging.h"
#include "interface_parser.h"
#include "parser.h"
diff --git a/src/settings/plugins/keyfile/reader.c b/src/settings/plugins/keyfile/reader.c
index 4be044c716..ac7c36ecf6 100644
--- a/src/settings/plugins/keyfile/reader.c
+++ b/src/settings/plugins/keyfile/reader.c
@@ -24,19 +24,10 @@
#include <sys/stat.h>
#include <unistd.h>
#include <sys/types.h>
-#include <nm-setting.h>
-#include <nm-setting-ip4-config.h>
-#include <nm-setting-ip6-config.h>
-#include <nm-setting-vpn.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-wired.h>
-#include <nm-setting-wireless.h>
-#include <nm-setting-bluetooth.h>
-#include <nm-setting-8021x.h>
-#include <nm-utils.h>
#include <arpa/inet.h>
#include <string.h>
+#include "nm-core-internal.h"
#include "nm-dbus-glib-types.h"
#include "nm-glib-compat.h"
#include "nm-system-config-interface.h"
diff --git a/src/settings/plugins/keyfile/tests/test-keyfile.c b/src/settings/plugins/keyfile/tests/test-keyfile.c
index ceb48fc42e..a0d6e3b2c4 100644
--- a/src/settings/plugins/keyfile/tests/test-keyfile.c
+++ b/src/settings/plugins/keyfile/tests/test-keyfile.c
@@ -26,19 +26,8 @@
#include <arpa/inet.h>
#include <sys/socket.h>
-#include <nm-utils.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-wired.h>
-#include <nm-setting-wireless.h>
-#include <nm-setting-ip4-config.h>
-#include <nm-setting-ip6-config.h>
-#include <nm-setting-bluetooth.h>
-#include <nm-setting-serial.h>
-#include <nm-setting-ppp.h>
-#include <nm-setting-gsm.h>
-#include <nm-setting-8021x.h>
-#include <nm-setting-infiniband.h>
-#include <nm-logging.h>
+#include "nm-core-internal.h"
+#include "nm-logging.h"
#include "reader.h"
#include "writer.h"
diff --git a/src/supplicant-manager/tests/test-supplicant-config.c b/src/supplicant-manager/tests/test-supplicant-config.c
index 93de8bb5c8..2d16eecfd6 100644
--- a/src/supplicant-manager/tests/test-supplicant-config.c
+++ b/src/supplicant-manager/tests/test-supplicant-config.c
@@ -30,13 +30,7 @@
#include <dbus/dbus-glib.h>
-#include <nm-utils.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-wired.h>
-#include <nm-setting-wireless.h>
-#include <nm-setting-wireless-security.h>
-#include <nm-setting-ip4-config.h>
-#include <nm-setting-8021x.h>
+#include "nm-core-internal.h"
#include "nm-supplicant-config.h"
#include "nm-supplicant-settings-verify.h"
diff --git a/src/tests/test-general.c b/src/tests/test-general.c
index f61732bb47..93a2500650 100644
--- a/src/tests/test-general.c
+++ b/src/tests/test-general.c
@@ -24,7 +24,7 @@
#include "NetworkManagerUtils.h"
#include "nm-logging.h"
-#include "nm-utils.h"
+#include "nm-core-internal.h"
#include "nm-test-utils.h"
diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c
index 5ddf22e771..45ddb79bba 100644
--- a/src/vpn-manager/nm-vpn-connection.c
+++ b/src/vpn-manager/nm-vpn-connection.c
@@ -27,19 +27,12 @@
#include <errno.h>
#include <stdlib.h>
-#include "nm-dbus-interface.h"
-#include "nm-vpn-dbus-interface.h"
#include "nm-vpn-connection.h"
-#include "nm-setting-connection.h"
-#include "nm-setting-vpn.h"
-#include "nm-setting-ip4-config.h"
#include "nm-ip4-config.h"
-#include "nm-setting-ip6-config.h"
#include "nm-ip6-config.h"
#include "nm-dbus-manager.h"
#include "nm-platform.h"
#include "nm-logging.h"
-#include "nm-utils.h"
#include "nm-active-connection.h"
#include "nm-dbus-glib-types.h"
#include "NetworkManagerUtils.h"
@@ -47,6 +40,7 @@
#include "settings/nm-settings-connection.h"
#include "nm-dispatcher.h"
#include "nm-agent-manager.h"
+#include "nm-core-internal.h"
#include "nm-vpn-connection-glue.h"