summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-07-06 16:53:02 -0400
committerDan Winship <danw@gnome.org>2014-08-01 14:34:40 -0400
commitd0b05b34d5f1ad8f52a15fed48cc2c02d2251145 (patch)
tree66943c391845d6c8fb2b4a26524c6d46c17a8e15
parent3ddce74803c15db7a970c737e8d4c33fccccb558 (diff)
libnm: add NetworkManager.h, disallow including individual headers
Add NetworkManager.h, which includes all of the other NM header, and require all external users of libnm to use that rather than the individual headers. (An exception is made for nm-dbus-interface.h, nm-vpn-dbus-interface.h, and nm-version.h, which can be included separately.)
-rw-r--r--callouts/Makefile.am1
-rw-r--r--callouts/tests/Makefile.am1
-rw-r--r--callouts/tests/test-dispatcher-envp.c1
-rw-r--r--clients/cli/common.h8
-rw-r--r--clients/cli/connections.c19
-rw-r--r--clients/cli/devices.c33
-rw-r--r--clients/cli/network-manager.c2
-rw-r--r--clients/cli/nmcli.c3
-rw-r--r--clients/cli/nmcli.h5
-rw-r--r--clients/cli/settings.c1
-rw-r--r--clients/cli/settings.h24
-rw-r--r--clients/cli/utils.h2
-rw-r--r--clients/nm-online.c2
-rw-r--r--clients/tui/nm-editor-bindings.h5
-rw-r--r--clients/tui/nm-editor-utils.c11
-rw-r--r--clients/tui/nm-editor-utils.h3
-rw-r--r--clients/tui/nmt-connect-connection-list.c4
-rw-r--r--clients/tui/nmt-device-entry.c4
-rw-r--r--clients/tui/nmt-device-entry.h3
-rw-r--r--clients/tui/nmt-edit-connection-list.h2
-rw-r--r--clients/tui/nmt-editor-page.h2
-rw-r--r--clients/tui/nmt-editor.h2
-rw-r--r--clients/tui/nmt-mac-entry.c2
-rw-r--r--clients/tui/nmt-page-main.c3
-rw-r--r--clients/tui/nmt-page-vlan.c2
-rw-r--r--clients/tui/nmt-page-wifi.c1
-rw-r--r--clients/tui/nmt-route-editor.h2
-rw-r--r--clients/tui/nmt-route-entry.c3
-rw-r--r--clients/tui/nmt-route-table.c3
-rw-r--r--clients/tui/nmt-secret-agent.c2
-rw-r--r--clients/tui/nmt-secret-agent.h2
-rw-r--r--clients/tui/nmt-slave-list.c3
-rw-r--r--clients/tui/nmtui-connect.c1
-rw-r--r--clients/tui/nmtui-edit.c2
-rw-r--r--clients/tui/nmtui.c5
-rw-r--r--clients/tui/nmtui.h3
-rw-r--r--examples/C/glib/add-connection-dbus-glib.c7
-rw-r--r--examples/C/glib/add-connection-libnm.c8
-rw-r--r--examples/C/glib/get-active-connections-dbus-glib.c7
-rw-r--r--examples/C/glib/get-ap-info-libnm.c7
-rw-r--r--examples/C/glib/list-connections-dbus-glib.c2
-rw-r--r--examples/C/glib/list-connections-libnm.c6
-rw-r--r--libnm-core/Makefile.am1
-rw-r--r--libnm-core/nm-connection.c1
-rw-r--r--libnm-core/nm-connection.h4
-rw-r--r--libnm-core/nm-setting-8021x.c1
-rw-r--r--libnm-core/nm-setting-8021x.h4
-rw-r--r--libnm-core/nm-setting-adsl.c1
-rw-r--r--libnm-core/nm-setting-adsl.h4
-rw-r--r--libnm-core/nm-setting-bluetooth.c1
-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.c1
-rw-r--r--libnm-core/nm-setting-bridge-port.h4
-rw-r--r--libnm-core/nm-setting-bridge.c1
-rw-r--r--libnm-core/nm-setting-bridge.h4
-rw-r--r--libnm-core/nm-setting-cdma.c1
-rw-r--r--libnm-core/nm-setting-cdma.h4
-rw-r--r--libnm-core/nm-setting-connection.c1
-rw-r--r--libnm-core/nm-setting-connection.h4
-rw-r--r--libnm-core/nm-setting-dcb.c1
-rw-r--r--libnm-core/nm-setting-dcb.h4
-rw-r--r--libnm-core/nm-setting-generic.c1
-rw-r--r--libnm-core/nm-setting-generic.h4
-rw-r--r--libnm-core/nm-setting-gsm.c1
-rw-r--r--libnm-core/nm-setting-gsm.h4
-rw-r--r--libnm-core/nm-setting-infiniband.c1
-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.c1
-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.c1
-rw-r--r--libnm-core/nm-setting-ppp.h4
-rw-r--r--libnm-core/nm-setting-pppoe.c1
-rw-r--r--libnm-core/nm-setting-pppoe.h4
-rw-r--r--libnm-core/nm-setting-serial.c1
-rw-r--r--libnm-core/nm-setting-serial.h4
-rw-r--r--libnm-core/nm-setting-team-port.c1
-rw-r--r--libnm-core/nm-setting-team-port.h4
-rw-r--r--libnm-core/nm-setting-team.c1
-rw-r--r--libnm-core/nm-setting-team.h4
-rw-r--r--libnm-core/nm-setting-vlan.c1
-rw-r--r--libnm-core/nm-setting-vlan.h4
-rw-r--r--libnm-core/nm-setting-vpn.c1
-rw-r--r--libnm-core/nm-setting-vpn.h4
-rw-r--r--libnm-core/nm-setting-wimax.c1
-rw-r--r--libnm-core/nm-setting-wimax.h4
-rw-r--r--libnm-core/nm-setting-wired.c1
-rw-r--r--libnm-core/nm-setting-wired.h4
-rw-r--r--libnm-core/nm-setting-wireless-security.c1
-rw-r--r--libnm-core/nm-setting-wireless-security.h4
-rw-r--r--libnm-core/nm-setting-wireless.c1
-rw-r--r--libnm-core/nm-setting-wireless.h4
-rw-r--r--libnm-core/nm-setting.c1
-rw-r--r--libnm-core/nm-setting.h4
-rw-r--r--libnm-core/nm-utils.c1
-rw-r--r--libnm-core/nm-utils.h4
-rw-r--r--libnm-core/tests/Makefile.am1
-rw-r--r--libnm/Makefile.am2
-rw-r--r--libnm/NetworkManager.h91
-rw-r--r--libnm/nm-access-point.h4
-rw-r--r--libnm/nm-active-connection.h4
-rw-r--r--libnm/nm-client.h4
-rw-r--r--libnm/nm-device-adsl.h4
-rw-r--r--libnm/nm-device-bond.h4
-rw-r--r--libnm/nm-device-bridge.h4
-rw-r--r--libnm/nm-device-bt.h4
-rw-r--r--libnm/nm-device-ethernet.h4
-rw-r--r--libnm/nm-device-generic.h4
-rw-r--r--libnm/nm-device-infiniband.h4
-rw-r--r--libnm/nm-device-modem.h4
-rw-r--r--libnm/nm-device-olpc-mesh.h4
-rw-r--r--libnm/nm-device-team.h4
-rw-r--r--libnm/nm-device-vlan.h4
-rw-r--r--libnm/nm-device-wifi.h4
-rw-r--r--libnm/nm-device-wimax.h4
-rw-r--r--libnm/nm-device.h4
-rw-r--r--libnm/nm-dhcp4-config.h4
-rw-r--r--libnm/nm-dhcp6-config.h4
-rw-r--r--libnm/nm-ip4-config.h4
-rw-r--r--libnm/nm-ip6-config.h4
-rw-r--r--libnm/nm-object.h4
-rw-r--r--libnm/nm-remote-connection.h4
-rw-r--r--libnm/nm-remote-settings.h4
-rw-r--r--libnm/nm-secret-agent.h4
-rw-r--r--libnm/nm-types.h4
-rw-r--r--libnm/nm-vpn-connection.h4
-rw-r--r--libnm/nm-vpn-plugin-ui-interface.h4
-rw-r--r--libnm/nm-vpn-plugin-utils.h4
-rw-r--r--libnm/nm-vpn-plugin.h4
-rw-r--r--libnm/nm-wimax-nsp.h4
-rw-r--r--libnm/tests/Makefile.am1
-rw-r--r--src/Makefile.am1
-rw-r--r--src/devices/adsl/Makefile.am1
-rw-r--r--src/devices/bluetooth/Makefile.am1
-rw-r--r--src/devices/team/Makefile.am1
-rw-r--r--src/devices/wifi/Makefile.am1
-rw-r--r--src/devices/wifi/tests/Makefile.am1
-rw-r--r--src/devices/wimax/Makefile.am1
-rw-r--r--src/devices/wwan/Makefile.am1
-rw-r--r--src/dhcp-manager/tests/Makefile.am1
-rw-r--r--src/dnsmasq-manager/tests/Makefile.am1
-rw-r--r--src/platform/tests/Makefile.am1
-rw-r--r--src/ppp-manager/Makefile.am1
-rw-r--r--src/rdisc/tests/Makefile.am1
-rw-r--r--src/settings/plugins/example/Makefile.am1
-rw-r--r--src/settings/plugins/ifcfg-rh/Makefile.am1
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/Makefile.am1
-rw-r--r--src/settings/plugins/ifcfg-suse/Makefile.am1
-rw-r--r--src/settings/plugins/ifnet/Makefile.am1
-rw-r--r--src/settings/plugins/ifnet/tests/Makefile.am1
-rw-r--r--src/settings/plugins/ifupdown/Makefile.am1
-rw-r--r--src/settings/plugins/ifupdown/tests/Makefile.am1
-rw-r--r--src/settings/plugins/keyfile/Makefile.am1
-rw-r--r--src/settings/plugins/keyfile/tests/Makefile.am1
-rw-r--r--src/settings/tests/Makefile.am1
-rw-r--r--src/supplicant-manager/tests/Makefile.am1
-rw-r--r--src/tests/Makefile.am1
-rw-r--r--src/tests/config/Makefile.am1
162 files changed, 394 insertions, 206 deletions
diff --git a/callouts/Makefile.am b/callouts/Makefile.am
index fc8e94fc4..1e7001c34 100644
--- a/callouts/Makefile.am
+++ b/callouts/Makefile.am
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
-I${top_builddir}/libnm-core \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
-DNMCONFDIR=\"$(nmconfdir)\" \
-DSYSCONFDIR=\"$(sysconfdir)\" \
diff --git a/callouts/tests/Makefile.am b/callouts/tests/Makefile.am
index c0d61877d..c06178b22 100644
--- a/callouts/tests/Makefile.am
+++ b/callouts/tests/Makefile.am
@@ -5,6 +5,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/libnm-core \
-I$(top_builddir)/libnm-core \
-I$(top_srcdir)/callouts \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS)
diff --git a/callouts/tests/test-dispatcher-envp.c b/callouts/tests/test-dispatcher-envp.c
index a91ae2b27..97b839b5f 100644
--- a/callouts/tests/test-dispatcher-envp.c
+++ b/callouts/tests/test-dispatcher-envp.c
@@ -31,6 +31,7 @@
#include "nm-dbus-glib-types.h"
#include "nm-dispatcher-api.h"
#include "nm-utils.h"
+#include "nm-utils-private.h"
/*******************************************/
diff --git a/clients/cli/common.h b/clients/cli/common.h
index 1397194f1..a1a45e3ad 100644
--- a/clients/cli/common.h
+++ b/clients/cli/common.h
@@ -22,14 +22,6 @@
#ifndef NMC_COMMON_H
#define NMC_COMMON_H
-#include <glib.h>
-
-#include <nm-ip4-config.h>
-#include <nm-ip6-config.h>
-#include <nm-dhcp4-config.h>
-#include <nm-dhcp6-config.h>
-#include <nm-device.h>
-
#include "nmcli.h"
gboolean print_ip4_config (NMIP4Config *cfg4, NmCli *nmc, const char *group_prefix, const char *one_field);
diff --git a/clients/cli/connections.c b/clients/cli/connections.c
index 605de2e0c..0c6d0e3a0 100644
--- a/clients/cli/connections.c
+++ b/clients/cli/connections.c
@@ -33,25 +33,6 @@
#include <readline/readline.h>
#include <readline/history.h>
-#include <nm-client.h>
-#include <nm-device-ethernet.h>
-#include <nm-device-adsl.h>
-#include <nm-device-wifi.h>
-#if WITH_WIMAX
-#include <nm-device-wimax.h>
-#endif
-#include <nm-device-modem.h>
-#include <nm-device-bt.h>
-#include <nm-device-olpc-mesh.h>
-#include <nm-device-infiniband.h>
-#include <nm-device-bond.h>
-#include <nm-device-team.h>
-#include <nm-device-bridge.h>
-#include <nm-device-vlan.h>
-#include <nm-remote-settings.h>
-#include <nm-vpn-connection.h>
-#include <nm-utils.h>
-
#include "utils.h"
#include "common.h"
#include "settings.h"
diff --git a/clients/cli/devices.c b/clients/cli/devices.c
index 9cf8203d7..65629a68f 100644
--- a/clients/cli/devices.c
+++ b/clients/cli/devices.c
@@ -29,39 +29,6 @@
#include <glib.h>
#include <glib/gi18n.h>
-#include <nm-client.h>
-#include <nm-device.h>
-#include <nm-device-ethernet.h>
-#include <nm-device-adsl.h>
-#include <nm-device-wifi.h>
-#include <nm-device-modem.h>
-#include <nm-device-bt.h>
-#include <nm-device-olpc-mesh.h>
-#if WITH_WIMAX
-#include <nm-device-wimax.h>
-#endif
-#include <nm-device-infiniband.h>
-#include <nm-device-bond.h>
-#include <nm-device-bridge.h>
-#include <nm-device-vlan.h>
-#include <nm-utils.h>
-#include <nm-setting-ip4-config.h>
-#include <nm-setting-ip6-config.h>
-#include <nm-vpn-connection.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-wired.h>
-#include <nm-setting-adsl.h>
-#include <nm-setting-pppoe.h>
-#include <nm-setting-wireless.h>
-#include <nm-setting-gsm.h>
-#include <nm-setting-cdma.h>
-#include <nm-setting-bluetooth.h>
-#include <nm-setting-olpc-mesh.h>
-#if WITH_WIMAX
-#include <nm-setting-wimax.h>
-#endif
-#include <nm-setting-infiniband.h>
-
#include "utils.h"
#include "common.h"
#include "devices.h"
diff --git a/clients/cli/network-manager.c b/clients/cli/network-manager.c
index dc55100ab..cace83256 100644
--- a/clients/cli/network-manager.c
+++ b/clients/cli/network-manager.c
@@ -25,8 +25,6 @@
#include <glib.h>
#include <glib/gi18n.h>
-#include <nm-client.h>
-#include <nm-setting-connection.h>
#include "utils.h"
#include "network-manager.h"
diff --git a/clients/cli/nmcli.c b/clients/cli/nmcli.c
index d5076a601..ab0455d47 100644
--- a/clients/cli/nmcli.c
+++ b/clients/cli/nmcli.c
@@ -33,9 +33,6 @@
#include <glib.h>
#include <glib/gi18n.h>
-#include <nm-client.h>
-#include <nm-setting-connection.h>
-#include <nm-remote-settings.h>
#include "nmcli.h"
#include "utils.h"
diff --git a/clients/cli/nmcli.h b/clients/cli/nmcli.h
index 163832eac..5582b1d2a 100644
--- a/clients/cli/nmcli.h
+++ b/clients/cli/nmcli.h
@@ -20,10 +20,7 @@
#ifndef NMC_NMCLI_H
#define NMC_NMCLI_H
-#include <glib.h>
-
-#include <nm-client.h>
-#include <nm-remote-settings.h>
+#include <NetworkManager.h>
/* nmcli exit codes */
typedef enum {
diff --git a/clients/cli/settings.c b/clients/cli/settings.c
index c952ecda9..6d4954578 100644
--- a/clients/cli/settings.c
+++ b/clients/cli/settings.c
@@ -25,7 +25,6 @@
#include <glib.h>
#include <glib/gi18n.h>
-#include <nm-utils.h>
#include "utils.h"
#include "common.h"
diff --git a/clients/cli/settings.h b/clients/cli/settings.h
index 709c8977f..596058651 100644
--- a/clients/cli/settings.h
+++ b/clients/cli/settings.h
@@ -20,30 +20,6 @@
#ifndef NMC_SETTINGS_H
#define NMC_SETTINGS_H
-#include <nm-setting-connection.h>
-#include <nm-setting-wired.h>
-#include <nm-setting-adsl.h>
-#include <nm-setting-8021x.h>
-#include <nm-setting-wireless.h>
-#include <nm-setting-wireless-security.h>
-#include <nm-setting-ip4-config.h>
-#include <nm-setting-ip6-config.h>
-#include <nm-setting-serial.h>
-#include <nm-setting-ppp.h>
-#include <nm-setting-pppoe.h>
-#include <nm-setting-gsm.h>
-#include <nm-setting-cdma.h>
-#include <nm-setting-bluetooth.h>
-#include <nm-setting-olpc-mesh.h>
-#include <nm-setting-vpn.h>
-#include <nm-setting-wimax.h>
-#include <nm-setting-infiniband.h>
-#include <nm-setting-bond.h>
-#include <nm-setting-bridge.h>
-#include <nm-setting-bridge-port.h>
-#include <nm-setting-vlan.h>
-#include <nm-setting-dcb.h>
-
#include "nmcli.h"
#include "utils.h"
diff --git a/clients/cli/utils.h b/clients/cli/utils.h
index e92952f33..ea59c4ed5 100644
--- a/clients/cli/utils.h
+++ b/clients/cli/utils.h
@@ -20,8 +20,6 @@
#ifndef NMC_UTILS_H
#define NMC_UTILS_H
-#include <glib.h>
-
#include "nmcli.h"
/* === Types === */
diff --git a/clients/nm-online.c b/clients/nm-online.c
index 234eac9b0..af40022b3 100644
--- a/clients/nm-online.c
+++ b/clients/nm-online.c
@@ -40,7 +40,7 @@
#include <glib/gi18n.h>
-#include "nm-client.h"
+#include <NetworkManager.h>
#define PROGRESS_STEPS 15
#define WAIT_STARTUP_TAG "wait-startup"
diff --git a/clients/tui/nm-editor-bindings.h b/clients/tui/nm-editor-bindings.h
index a7a32dd14..e1637f45d 100644
--- a/clients/tui/nm-editor-bindings.h
+++ b/clients/tui/nm-editor-bindings.h
@@ -19,10 +19,7 @@
#ifndef NM_EDITOR_BINDINGS_H
#define NM_EDITOR_BINDINGS_H
-#include <glib-object.h>
-#include <nm-connection.h>
-#include <nm-setting-wireless-security.h>
-#include <nm-setting-vlan.h>
+#include <NetworkManager.h>
G_BEGIN_DECLS
diff --git a/clients/tui/nm-editor-utils.c b/clients/tui/nm-editor-utils.c
index 4ac0eb641..96f35cc67 100644
--- a/clients/tui/nm-editor-utils.c
+++ b/clients/tui/nm-editor-utils.c
@@ -28,16 +28,7 @@
#include "config.h"
#include <glib/gi18n.h>
-#include <nm-utils.h>
-
-#include <nm-device-bond.h>
-#include <nm-device-bridge.h>
-#include <nm-device-team.h>
-#include <nm-device-ethernet.h>
-#include <nm-device-infiniband.h>
-#include <nm-device-team.h>
-#include <nm-device-vlan.h>
-#include <nm-device-wifi.h>
+#include <NetworkManager.h>
#include "nm-editor-utils.h"
#if 0
diff --git a/clients/tui/nm-editor-utils.h b/clients/tui/nm-editor-utils.h
index 4b9ad5edb..8d61d7525 100644
--- a/clients/tui/nm-editor-utils.h
+++ b/clients/tui/nm-editor-utils.h
@@ -19,8 +19,7 @@
#ifndef NM_EDITOR_UTILS_H
#define NM_EDITOR_UTILS_H
-#include <glib-object.h>
-#include <nm-remote-settings.h>
+#include <NetworkManager.h>
G_BEGIN_DECLS
diff --git a/clients/tui/nmt-connect-connection-list.c b/clients/tui/nmt-connect-connection-list.c
index fffdc8ea4..aadd74b39 100644
--- a/clients/tui/nmt-connect-connection-list.c
+++ b/clients/tui/nmt-connect-connection-list.c
@@ -29,9 +29,7 @@
#include <stdlib.h>
#include <glib/gi18n-lib.h>
-#include <nm-access-point.h>
-#include <nm-device-wifi.h>
-#include <nm-utils.h>
+#include <NetworkManager.h>
#include "nmtui.h"
#include "nmt-connect-connection-list.h"
diff --git a/clients/tui/nmt-device-entry.c b/clients/tui/nmt-device-entry.c
index de8b63055..47435ead5 100644
--- a/clients/tui/nmt-device-entry.c
+++ b/clients/tui/nmt-device-entry.c
@@ -41,9 +41,7 @@
#include <linux/if_arp.h>
#include <glib/gi18n-lib.h>
-#include <nm-device.h>
-#include <nm-device-infiniband.h>
-#include <nm-utils.h>
+#include <NetworkManager.h>
#include "nmtui.h"
#include "nmt-device-entry.h"
diff --git a/clients/tui/nmt-device-entry.h b/clients/tui/nmt-device-entry.h
index 2b959aaa8..d44126a86 100644
--- a/clients/tui/nmt-device-entry.h
+++ b/clients/tui/nmt-device-entry.h
@@ -21,8 +21,7 @@
#include "nmt-page-grid.h"
-#include <nm-connection.h>
-#include <nm-device.h>
+#include <NetworkManager.h>
G_BEGIN_DECLS
diff --git a/clients/tui/nmt-edit-connection-list.h b/clients/tui/nmt-edit-connection-list.h
index 35157e94d..a359170a1 100644
--- a/clients/tui/nmt-edit-connection-list.h
+++ b/clients/tui/nmt-edit-connection-list.h
@@ -21,7 +21,7 @@
#include "nmt-newt.h"
-#include <nm-remote-connection.h>
+#include <NetworkManager.h>
G_BEGIN_DECLS
diff --git a/clients/tui/nmt-editor-page.h b/clients/tui/nmt-editor-page.h
index d9a97102e..8addabebd 100644
--- a/clients/tui/nmt-editor-page.h
+++ b/clients/tui/nmt-editor-page.h
@@ -19,7 +19,7 @@
#ifndef NMT_EDITOR_PAGE_H
#define NMT_EDITOR_PAGE_H
-#include <nm-connection.h>
+#include <NetworkManager.h>
#include "nmt-page-grid.h"
diff --git a/clients/tui/nmt-editor.h b/clients/tui/nmt-editor.h
index a991a7666..db10b82a1 100644
--- a/clients/tui/nmt-editor.h
+++ b/clients/tui/nmt-editor.h
@@ -19,7 +19,7 @@
#ifndef NMT_EDITOR_H
#define NMT_EDITOR_H
-#include <nm-connection.h>
+#include <NetworkManager.h>
#include "nmt-newt.h"
diff --git a/clients/tui/nmt-mac-entry.c b/clients/tui/nmt-mac-entry.c
index 0dad12363..b3ca8097f 100644
--- a/clients/tui/nmt-mac-entry.c
+++ b/clients/tui/nmt-mac-entry.c
@@ -31,7 +31,7 @@
#include <string.h>
#include <dbus/dbus-glib.h>
-#include <nm-utils.h>
+#include <NetworkManager.h>
#include "nmt-mac-entry.h"
diff --git a/clients/tui/nmt-page-main.c b/clients/tui/nmt-page-main.c
index d22ec8345..2e1510f37 100644
--- a/clients/tui/nmt-page-main.c
+++ b/clients/tui/nmt-page-main.c
@@ -30,8 +30,7 @@
#include <glib.h>
#include <glib/gi18n-lib.h>
-#include <nm-device.h>
-#include <nm-utils.h>
+#include <NetworkManager.h>
#include "nmt-page-main.h"
#include "nmt-device-entry.h"
diff --git a/clients/tui/nmt-page-vlan.c b/clients/tui/nmt-page-vlan.c
index f6de671c8..c3bc7076b 100644
--- a/clients/tui/nmt-page-vlan.c
+++ b/clients/tui/nmt-page-vlan.c
@@ -26,8 +26,6 @@
#include <glib.h>
#include <glib/gi18n-lib.h>
-#include <nm-device-ethernet.h>
-
#include "nm-editor-bindings.h"
#include "nmt-page-vlan.h"
diff --git a/clients/tui/nmt-page-wifi.c b/clients/tui/nmt-page-wifi.c
index 153aee7ca..12b2f4e59 100644
--- a/clients/tui/nmt-page-wifi.c
+++ b/clients/tui/nmt-page-wifi.c
@@ -31,7 +31,6 @@
#include <glib.h>
#include <glib/gi18n-lib.h>
-#include <nm-utils.h>
#include "nmt-page-wifi.h"
#include "nmt-mac-entry.h"
diff --git a/clients/tui/nmt-route-editor.h b/clients/tui/nmt-route-editor.h
index e1040dffd..9882c7138 100644
--- a/clients/tui/nmt-route-editor.h
+++ b/clients/tui/nmt-route-editor.h
@@ -19,7 +19,7 @@
#ifndef NMT_ROUTE_EDITOR_H
#define NMT_ROUTE_EDITOR_H
-#include <nm-connection.h>
+#include <NetworkManager.h>
#include "nmt-newt.h"
diff --git a/clients/tui/nmt-route-entry.c b/clients/tui/nmt-route-entry.c
index 70a9003b4..9b22f389d 100644
--- a/clients/tui/nmt-route-entry.c
+++ b/clients/tui/nmt-route-entry.c
@@ -33,8 +33,7 @@
#include <stdlib.h>
#include <glib/gi18n-lib.h>
-#include <nm-setting-ip4-config.h>
-#include <nm-setting-ip6-config.h>
+#include <NetworkManager.h>
#include "nmt-route-entry.h"
#include "nmt-ip-entry.h"
diff --git a/clients/tui/nmt-route-table.c b/clients/tui/nmt-route-table.c
index c2edf2ac5..c5a70761d 100644
--- a/clients/tui/nmt-route-table.c
+++ b/clients/tui/nmt-route-table.c
@@ -32,7 +32,8 @@
#include <glib/gi18n-lib.h>
#include <dbus/dbus-glib.h>
-#include <nm-utils.h>
+#include <NetworkManager.h>
+#include <nm-utils-private.h>
#include "nmt-route-table.h"
#include "nmt-route-entry.h"
diff --git a/clients/tui/nmt-secret-agent.c b/clients/tui/nmt-secret-agent.c
index 147e11957..13a092702 100644
--- a/clients/tui/nmt-secret-agent.c
+++ b/clients/tui/nmt-secret-agent.c
@@ -35,8 +35,6 @@
#include <dbus/dbus-glib.h>
#include <glib/gi18n-lib.h>
-#include <nm-utils.h>
-
#include "nmt-secret-agent.h"
#include "nmt-newt.h"
diff --git a/clients/tui/nmt-secret-agent.h b/clients/tui/nmt-secret-agent.h
index 04b158194..e7f6ef846 100644
--- a/clients/tui/nmt-secret-agent.h
+++ b/clients/tui/nmt-secret-agent.h
@@ -19,7 +19,7 @@
#ifndef NMT_SECRET_AGENT_H
#define NMT_SECRET_AGENT_H
-#include <nm-secret-agent.h>
+#include <NetworkManager.h>
G_BEGIN_DECLS
diff --git a/clients/tui/nmt-slave-list.c b/clients/tui/nmt-slave-list.c
index d6b60be42..459b944b9 100644
--- a/clients/tui/nmt-slave-list.c
+++ b/clients/tui/nmt-slave-list.c
@@ -27,8 +27,7 @@
#include "config.h"
#include <glib/gi18n-lib.h>
-
-#include <nm-remote-connection.h>
+#include <NetworkManager.h>
#include "nmt-slave-list.h"
diff --git a/clients/tui/nmtui-connect.c b/clients/tui/nmtui-connect.c
index a86b8df57..ca523ebba 100644
--- a/clients/tui/nmtui-connect.c
+++ b/clients/tui/nmtui-connect.c
@@ -32,7 +32,6 @@
#include <stdlib.h>
#include <glib/gi18n-lib.h>
-#include <nm-utils.h>
#include "nmt-newt.h"
diff --git a/clients/tui/nmtui-edit.c b/clients/tui/nmtui-edit.c
index 2e59204b6..a564ff368 100644
--- a/clients/tui/nmtui-edit.c
+++ b/clients/tui/nmtui-edit.c
@@ -28,7 +28,7 @@
#include <stdlib.h>
#include <glib/gi18n-lib.h>
-#include <nm-utils.h>
+#include <NetworkManager.h>
#include "nmtui.h"
#include "nmtui-edit.h"
diff --git a/clients/tui/nmtui.c b/clients/tui/nmtui.c
index 35f8ccb9a..795f663d9 100644
--- a/clients/tui/nmtui.c
+++ b/clients/tui/nmtui.c
@@ -33,10 +33,7 @@
#include <glib.h>
#include <glib/gi18n-lib.h>
-#include <nm-client.h>
-#include <nm-connection.h>
-#include <nm-remote-settings.h>
-#include <nm-utils.h>
+#include <NetworkManager.h>
#include "nmt-newt.h"
#include "nm-editor-bindings.h"
diff --git a/clients/tui/nmtui.h b/clients/tui/nmtui.h
index 3e462b113..10b9c06ad 100644
--- a/clients/tui/nmtui.h
+++ b/clients/tui/nmtui.h
@@ -19,8 +19,7 @@
#ifndef NMTUI_H
#define NMTUI_H
-#include <nm-client.h>
-#include <nm-remote-settings.h>
+#include <NetworkManager.h>
G_BEGIN_DECLS
diff --git a/examples/C/glib/add-connection-dbus-glib.c b/examples/C/glib/add-connection-dbus-glib.c
index f5aba077c..a50e8ba6c 100644
--- a/examples/C/glib/add-connection-dbus-glib.c
+++ b/examples/C/glib/add-connection-dbus-glib.c
@@ -29,12 +29,7 @@
#include <glib.h>
#include <dbus/dbus-glib.h>
-#include <nm-connection.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-wired.h>
-#include <nm-setting-ip4-config.h>
-#include <nm-dbus-interface.h>
-#include <nm-utils.h>
+#include <NetworkManager.h>
#define DBUS_TYPE_G_MAP_OF_VARIANT (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))
#define DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, DBUS_TYPE_G_MAP_OF_VARIANT))
diff --git a/examples/C/glib/add-connection-libnm.c b/examples/C/glib/add-connection-libnm.c
index 5bddf9f21..59a51ba20 100644
--- a/examples/C/glib/add-connection-libnm.c
+++ b/examples/C/glib/add-connection-libnm.c
@@ -28,13 +28,7 @@
*/
#include <glib.h>
-#include <nm-remote-settings.h>
-
-#include <nm-connection.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-wired.h>
-#include <nm-setting-ip4-config.h>
-#include <nm-utils.h>
+#include <NetworkManager.h>
static void
added_cb (NMRemoteSettings *settings,
diff --git a/examples/C/glib/get-active-connections-dbus-glib.c b/examples/C/glib/get-active-connections-dbus-glib.c
index b89875c1a..65df85b51 100644
--- a/examples/C/glib/get-active-connections-dbus-glib.c
+++ b/examples/C/glib/get-active-connections-dbus-glib.c
@@ -30,12 +30,7 @@
#include <glib.h>
#include <dbus/dbus-glib.h>
-#include <nm-connection.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-wired.h>
-#include <nm-setting-ip4-config.h>
-#include <nm-dbus-interface.h>
-#include <nm-utils.h>
+#include <NetworkManager.h>
#define DBUS_TYPE_G_MAP_OF_VARIANT (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))
#define DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, DBUS_TYPE_G_MAP_OF_VARIANT))
diff --git a/examples/C/glib/get-ap-info-libnm.c b/examples/C/glib/get-ap-info-libnm.c
index bc572ee16..aba22c6dd 100644
--- a/examples/C/glib/get-ap-info-libnm.c
+++ b/examples/C/glib/get-ap-info-libnm.c
@@ -29,12 +29,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <nm-client.h>
-#include <nm-device.h>
-#include <nm-device-wifi.h>
-#include <nm-access-point.h>
-#include <nm-dbus-interface.h>
-#include <nm-utils.h>
+#include <NetworkManager.h>
/* Convert flags to string */
static char *
diff --git a/examples/C/glib/list-connections-dbus-glib.c b/examples/C/glib/list-connections-dbus-glib.c
index 4c13a53bb..608c66660 100644
--- a/examples/C/glib/list-connections-dbus-glib.c
+++ b/examples/C/glib/list-connections-dbus-glib.c
@@ -29,7 +29,7 @@
#include <dbus/dbus-glib.h>
#include <stdio.h>
-#include <nm-dbus-interface.h>
+#include <NetworkManager.h>
#define DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH))
diff --git a/examples/C/glib/list-connections-libnm.c b/examples/C/glib/list-connections-libnm.c
index 5338c6fce..4dd178dbf 100644
--- a/examples/C/glib/list-connections-libnm.c
+++ b/examples/C/glib/list-connections-libnm.c
@@ -29,11 +29,7 @@
#include <stdlib.h>
#include <signal.h>
-#include <nm-connection.h>
-#include <nm-setting-connection.h>
-#include <nm-dbus-interface.h>
-#include <nm-utils.h>
-#include <nm-remote-settings.h>
+#include <NetworkManager.h>
/* Global variables */
diff --git a/libnm-core/Makefile.am b/libnm-core/Makefile.am
index f4e18a06b..53805e27e 100644
--- a/libnm-core/Makefile.am
+++ b/libnm-core/Makefile.am
@@ -5,6 +5,7 @@ SUBDIRS = . tests
AM_CPPFLAGS = \
-I${top_srcdir}/include \
-DG_LOG_DOMAIN=\""libnm"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS)
diff --git a/libnm-core/nm-connection.c b/libnm-core/nm-connection.c
index 3aa2bc9b0..2b52e7a34 100644
--- a/libnm-core/nm-connection.c
+++ b/libnm-core/nm-connection.c
@@ -58,7 +58,6 @@
/**
* SECTION:nm-connection
* @short_description: Describes a connection to specific network or provider
- * @include: nm-connection.h
*
* An #NMConnection describes all the settings and configuration values that
* are necessary to configure network devices for operation on a specific
diff --git a/libnm-core/nm-connection.h b/libnm-core/nm-connection.h
index 6a17581d1..20027a9f0 100644
--- a/libnm-core/nm-connection.h
+++ b/libnm-core/nm-connection.h
@@ -23,6 +23,10 @@
#ifndef NM_CONNECTION_H
#define NM_CONNECTION_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <glib.h>
#include <glib-object.h>
#include <nm-setting.h>
diff --git a/libnm-core/nm-setting-8021x.c b/libnm-core/nm-setting-8021x.c
index dc964a136..3645157a2 100644
--- a/libnm-core/nm-setting-8021x.c
+++ b/libnm-core/nm-setting-8021x.c
@@ -35,7 +35,6 @@
/**
* SECTION:nm-setting-8021x
* @short_description: Describes 802.1x-authenticated connection properties
- * @include: nm-setting-8021x.h
*
* The #NMSetting8021x object is a #NMSetting subclass that describes
* properties necessary for connection to 802.1x-authenticated networks, such as
diff --git a/libnm-core/nm-setting-8021x.h b/libnm-core/nm-setting-8021x.h
index 9fd134227..9c3600330 100644
--- a/libnm-core/nm-setting-8021x.h
+++ b/libnm-core/nm-setting-8021x.h
@@ -23,6 +23,10 @@
#ifndef NM_SETTING_8021X_H
#define NM_SETTING_8021X_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-adsl.c b/libnm-core/nm-setting-adsl.c
index 0a8eba7c0..65bece027 100644
--- a/libnm-core/nm-setting-adsl.c
+++ b/libnm-core/nm-setting-adsl.c
@@ -30,7 +30,6 @@
/**
* SECTION:nm-setting-adsl
* @short_description: Describes ADSL-based properties
- * @include: nm-setting-adsl.h
*
* The #NMSettingAdsl object is a #NMSetting subclass that describes
* properties of ADSL connections.
diff --git a/libnm-core/nm-setting-adsl.h b/libnm-core/nm-setting-adsl.h
index eb1f07d33..146c6e1af 100644
--- a/libnm-core/nm-setting-adsl.h
+++ b/libnm-core/nm-setting-adsl.h
@@ -22,6 +22,10 @@
#ifndef NM_SETTING_ADSL_H
#define NM_SETTING_ADSL_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-bluetooth.c b/libnm-core/nm-setting-bluetooth.c
index 506ecbdde..57e4e656d 100644
--- a/libnm-core/nm-setting-bluetooth.c
+++ b/libnm-core/nm-setting-bluetooth.c
@@ -34,7 +34,6 @@
/**
* SECTION:nm-setting-bluetooth
* @short_description: Describes Bluetooth connection properties
- * @include: nm-setting-bluetooth.h
*
* The #NMSettingBluetooth object is a #NMSetting subclass that describes
* properties necessary for connection to devices that provide network
diff --git a/libnm-core/nm-setting-bluetooth.h b/libnm-core/nm-setting-bluetooth.h
index d401fc458..2184c4a77 100644
--- a/libnm-core/nm-setting-bluetooth.h
+++ b/libnm-core/nm-setting-bluetooth.h
@@ -23,6 +23,10 @@
#ifndef NM_SETTING_BLUETOOTH_H
#define NM_SETTING_BLUETOOTH_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include "nm-setting.h"
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-bond.c b/libnm-core/nm-setting-bond.c
index 3edb08921..38e1c4684 100644
--- a/libnm-core/nm-setting-bond.c
+++ b/libnm-core/nm-setting-bond.c
@@ -37,7 +37,6 @@
/**
* SECTION:nm-setting-bond
* @short_description: Describes connection properties for bonds
- * @include: nm-setting-bond.h
*
* The #NMSettingBond object is a #NMSetting subclass that describes properties
* necessary for bond connections.
diff --git a/libnm-core/nm-setting-bond.h b/libnm-core/nm-setting-bond.h
index 6aa94f2ba..093c9a3eb 100644
--- a/libnm-core/nm-setting-bond.h
+++ b/libnm-core/nm-setting-bond.h
@@ -22,6 +22,10 @@
#ifndef NM_SETTING_BOND_H
#define NM_SETTING_BOND_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-bridge-port.c b/libnm-core/nm-setting-bridge-port.c
index 08dbab976..243f4668d 100644
--- a/libnm-core/nm-setting-bridge-port.c
+++ b/libnm-core/nm-setting-bridge-port.c
@@ -33,7 +33,6 @@
/**
* SECTION:nm-setting-bridge-port
* @short_description: Describes connection properties for bridge ports
- * @include: nm-setting-bridge-port.h
*
* The #NMSettingBridgePort object is a #NMSetting subclass that describes
* optional properties that apply to bridge ports.
diff --git a/libnm-core/nm-setting-bridge-port.h b/libnm-core/nm-setting-bridge-port.h
index 0bf2c791c..423fa31ac 100644
--- a/libnm-core/nm-setting-bridge-port.h
+++ b/libnm-core/nm-setting-bridge-port.h
@@ -22,6 +22,10 @@
#ifndef NM_SETTING_BRIDGE_PORT_H
#define NM_SETTING_BRIDGE_PORT_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-bridge.c b/libnm-core/nm-setting-bridge.c
index 02457c13c..0b9196c44 100644
--- a/libnm-core/nm-setting-bridge.c
+++ b/libnm-core/nm-setting-bridge.c
@@ -36,7 +36,6 @@
/**
* SECTION:nm-setting-bridge
* @short_description: Describes connection properties for bridges
- * @include: nm-setting-bridge.h
*
* The #NMSettingBridge object is a #NMSetting subclass that describes properties
* necessary for bridging connections.
diff --git a/libnm-core/nm-setting-bridge.h b/libnm-core/nm-setting-bridge.h
index d06935cd3..e0d75ccb7 100644
--- a/libnm-core/nm-setting-bridge.h
+++ b/libnm-core/nm-setting-bridge.h
@@ -22,6 +22,10 @@
#ifndef NM_SETTING_BRIDGE_H
#define NM_SETTING_BRIDGE_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-cdma.c b/libnm-core/nm-setting-cdma.c
index 976a59680..8adc81519 100644
--- a/libnm-core/nm-setting-cdma.c
+++ b/libnm-core/nm-setting-cdma.c
@@ -29,7 +29,6 @@
/**
* SECTION:nm-setting-cdma
* @short_description: Describes CDMA-based mobile broadband properties
- * @include: nm-setting-cdma.h
*
* The #NMSettingCdma object is a #NMSetting subclass that describes
* properties that allow connections to IS-95-based mobile broadband
diff --git a/libnm-core/nm-setting-cdma.h b/libnm-core/nm-setting-cdma.h
index 938a110b8..7b2fb3228 100644
--- a/libnm-core/nm-setting-cdma.h
+++ b/libnm-core/nm-setting-cdma.h
@@ -23,6 +23,10 @@
#ifndef NM_SETTING_CDMA_H
#define NM_SETTING_CDMA_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-connection.c b/libnm-core/nm-setting-connection.c
index 75615a049..2205bff19 100644
--- a/libnm-core/nm-setting-connection.c
+++ b/libnm-core/nm-setting-connection.c
@@ -32,7 +32,6 @@
/**
* SECTION:nm-setting-connection
* @short_description: Describes general connection properties
- * @include: nm-setting-connection.h
*
* The #NMSettingConnection object is a #NMSetting subclass that describes
* properties that apply to all #NMConnection objects, regardless of what type
diff --git a/libnm-core/nm-setting-connection.h b/libnm-core/nm-setting-connection.h
index 6f219ccd4..ff7ab2099 100644
--- a/libnm-core/nm-setting-connection.h
+++ b/libnm-core/nm-setting-connection.h
@@ -23,6 +23,10 @@
#ifndef NM_SETTING_CONNECTION_H
#define NM_SETTING_CONNECTION_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include "nm-setting.h"
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-dcb.c b/libnm-core/nm-setting-dcb.c
index 713b37ea1..9bac02290 100644
--- a/libnm-core/nm-setting-dcb.c
+++ b/libnm-core/nm-setting-dcb.c
@@ -33,7 +33,6 @@
/**
* SECTION:nm-setting-dcb
* @short_description: Connection properties for Data Center Bridging
- * @include: nm-setting-dcb.h
*
* The #NMSettingDcb object is a #NMSetting subclass that describes properties
* for enabling and using Data Center Bridging (DCB) on Ethernet networks.
diff --git a/libnm-core/nm-setting-dcb.h b/libnm-core/nm-setting-dcb.h
index a1a200adb..8448a6f3d 100644
--- a/libnm-core/nm-setting-dcb.h
+++ b/libnm-core/nm-setting-dcb.h
@@ -22,6 +22,10 @@
#ifndef NM_SETTING_DCB_H
#define NM_SETTING_DCB_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-generic.c b/libnm-core/nm-setting-generic.c
index 827324fc6..ea323ac20 100644
--- a/libnm-core/nm-setting-generic.c
+++ b/libnm-core/nm-setting-generic.c
@@ -27,7 +27,6 @@
/**
* SECTION:nm-setting-generic
* @short_description: Describes connection properties for generic devices
- * @include: nm-setting-generic.h
*
* The #NMSettingGeneric object is a #NMSetting subclass that describes
* optional properties that apply to "generic" devices (ie, devices that
diff --git a/libnm-core/nm-setting-generic.h b/libnm-core/nm-setting-generic.h
index 605cb23f8..9d9d501a6 100644
--- a/libnm-core/nm-setting-generic.h
+++ b/libnm-core/nm-setting-generic.h
@@ -22,6 +22,10 @@
#ifndef NM_SETTING_GENERIC_H
#define NM_SETTING_GENERIC_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-gsm.c b/libnm-core/nm-setting-gsm.c
index 6442d9890..57fca83d8 100644
--- a/libnm-core/nm-setting-gsm.c
+++ b/libnm-core/nm-setting-gsm.c
@@ -30,7 +30,6 @@
/**
* SECTION:nm-setting-gsm
* @short_description: Describes GSM/3GPP-based mobile broadband properties
- * @include: nm-setting-gsm.h
*
* The #NMSettingGsm object is a #NMSetting subclass that describes
* properties that allow connections to 3GPP-based mobile broadband
diff --git a/libnm-core/nm-setting-gsm.h b/libnm-core/nm-setting-gsm.h
index 8e20285f7..919af9e3d 100644
--- a/libnm-core/nm-setting-gsm.h
+++ b/libnm-core/nm-setting-gsm.h
@@ -23,6 +23,10 @@
#ifndef NM_SETTING_GSM_H
#define NM_SETTING_GSM_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-infiniband.c b/libnm-core/nm-setting-infiniband.c
index 4e470e561..42c1545a3 100644
--- a/libnm-core/nm-setting-infiniband.c
+++ b/libnm-core/nm-setting-infiniband.c
@@ -34,7 +34,6 @@
/**
* SECTION:nm-setting-infiniband
* @short_description: Describes connection properties for IP-over-InfiniBand networks
- * @include: nm-setting-infiniband.h
*
* The #NMSettingInfiniband object is a #NMSetting subclass that describes properties
* necessary for connection to IP-over-InfiniBand networks.
diff --git a/libnm-core/nm-setting-infiniband.h b/libnm-core/nm-setting-infiniband.h
index b58f33c29..6fa4fe2a9 100644
--- a/libnm-core/nm-setting-infiniband.h
+++ b/libnm-core/nm-setting-infiniband.h
@@ -22,6 +22,10 @@
#ifndef NM_SETTING_INFINIBAND_H
#define NM_SETTING_INFINIBAND_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-ip4-config.c b/libnm-core/nm-setting-ip4-config.c
index df0ad5b3d..f3de89e98 100644
--- a/libnm-core/nm-setting-ip4-config.c
+++ b/libnm-core/nm-setting-ip4-config.c
@@ -35,7 +35,6 @@
/**
* SECTION:nm-setting-ip4-config
* @short_description: Describes IPv4 addressing, routing, and name service properties
- * @include: nm-setting-ip4-config.h
*
* The #NMSettingIP4Config object is a #NMSetting subclass that describes
* properties related to IPv4 addressing, routing, and Domain Name Service
diff --git a/libnm-core/nm-setting-ip4-config.h b/libnm-core/nm-setting-ip4-config.h
index 3572a1e3c..5c1ed21fd 100644
--- a/libnm-core/nm-setting-ip4-config.h
+++ b/libnm-core/nm-setting-ip4-config.h
@@ -23,6 +23,10 @@
#ifndef NM_SETTING_IP4_CONFIG_H
#define NM_SETTING_IP4_CONFIG_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include "nm-setting.h"
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-ip6-config.c b/libnm-core/nm-setting-ip6-config.c
index 11a7c29aa..0809bac32 100644
--- a/libnm-core/nm-setting-ip6-config.c
+++ b/libnm-core/nm-setting-ip6-config.c
@@ -33,7 +33,6 @@
/**
* SECTION:nm-setting-ip6-config
* @short_description: Describes IPv6 addressing, routing, and name service properties
- * @include: nm-setting-ip6-config.h
*
* The #NMSettingIP6Config object is a #NMSetting subclass that describes
* properties related to IPv6 addressing, routing, and Domain Name Service
diff --git a/libnm-core/nm-setting-ip6-config.h b/libnm-core/nm-setting-ip6-config.h
index dae63bc0c..b7433c22f 100644
--- a/libnm-core/nm-setting-ip6-config.h
+++ b/libnm-core/nm-setting-ip6-config.h
@@ -22,6 +22,10 @@
#ifndef NM_SETTING_IP6_CONFIG_H
#define NM_SETTING_IP6_CONFIG_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <arpa/inet.h>
#include "nm-setting.h"
diff --git a/libnm-core/nm-setting-olpc-mesh.h b/libnm-core/nm-setting-olpc-mesh.h
index 44b9a85ba..268413fd3 100644
--- a/libnm-core/nm-setting-olpc-mesh.h
+++ b/libnm-core/nm-setting-olpc-mesh.h
@@ -23,6 +23,10 @@
#ifndef NM_SETTING_OLPC_MESH_H
#define NM_SETTING_OLPC_MESH_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-ppp.c b/libnm-core/nm-setting-ppp.c
index 331bf72c7..b6e45ce24 100644
--- a/libnm-core/nm-setting-ppp.c
+++ b/libnm-core/nm-setting-ppp.c
@@ -29,7 +29,6 @@
* SECTION:nm-setting-ppp
* @short_description: Describes connection properties for devices/networks
* that require PPP to deliver IP capability
- * @include: nm-setting-ppp.h
*
* The #NMSettingPpp object is a #NMSetting subclass that describes properties
* necessary for connection to networks that require PPP transport, like PPPoE
diff --git a/libnm-core/nm-setting-ppp.h b/libnm-core/nm-setting-ppp.h
index a6bdfb3f9..c71526cae 100644
--- a/libnm-core/nm-setting-ppp.h
+++ b/libnm-core/nm-setting-ppp.h
@@ -23,6 +23,10 @@
#ifndef NM_SETTING_PPP_H
#define NM_SETTING_PPP_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-pppoe.c b/libnm-core/nm-setting-pppoe.c
index d12e077da..1fefb1552 100644
--- a/libnm-core/nm-setting-pppoe.c
+++ b/libnm-core/nm-setting-pppoe.c
@@ -30,7 +30,6 @@
/**
* SECTION:nm-setting-pppoe
* @short_description: Describes PPPoE connection properties
- * @include: nm-setting-pppoe.h
*
* The #NMSettingPppoe object is a #NMSetting subclass that describes
* properties necessary for connection to networks that require PPPoE connections
diff --git a/libnm-core/nm-setting-pppoe.h b/libnm-core/nm-setting-pppoe.h
index d1d4fe8a0..97bf46981 100644
--- a/libnm-core/nm-setting-pppoe.h
+++ b/libnm-core/nm-setting-pppoe.h
@@ -23,6 +23,10 @@
#ifndef NM_SETTING_PPPOE_H
#define NM_SETTING_PPPOE_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-serial.c b/libnm-core/nm-setting-serial.c
index 4a7ee89e6..0b8710b52 100644
--- a/libnm-core/nm-setting-serial.c
+++ b/libnm-core/nm-setting-serial.c
@@ -30,7 +30,6 @@
* SECTION:nm-setting-serial
* @short_description: Describes connection properties for devices that use
* serial communications
- * @include: nm-setting-serial.h
*
* The #NMSettingSerial object is a #NMSetting subclass that describes
* properties necessary for connections that may use serial communications,
diff --git a/libnm-core/nm-setting-serial.h b/libnm-core/nm-setting-serial.h
index 2a9377c42..818143010 100644
--- a/libnm-core/nm-setting-serial.h
+++ b/libnm-core/nm-setting-serial.h
@@ -23,6 +23,10 @@
#ifndef NM_SETTING_SERIAL_H
#define NM_SETTING_SERIAL_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-team-port.c b/libnm-core/nm-setting-team-port.c
index 328056183..cb8d00c38 100644
--- a/libnm-core/nm-setting-team-port.c
+++ b/libnm-core/nm-setting-team-port.c
@@ -32,7 +32,6 @@
/**
* SECTION:nm-setting-team-port
* @short_description: Describes connection properties for team ports
- * @include: nm-setting-team-port.h
*
* The #NMSettingTeamPort object is a #NMSetting subclass that describes
* optional properties that apply to team ports.
diff --git a/libnm-core/nm-setting-team-port.h b/libnm-core/nm-setting-team-port.h
index a9f3ff932..527ac4bce 100644
--- a/libnm-core/nm-setting-team-port.h
+++ b/libnm-core/nm-setting-team-port.h
@@ -21,6 +21,10 @@
#ifndef NM_SETTING_TEAM_PORT_H
#define NM_SETTING_TEAM_PORT_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-team.c b/libnm-core/nm-setting-team.c
index 0d8d4a141..75305b167 100644
--- a/libnm-core/nm-setting-team.c
+++ b/libnm-core/nm-setting-team.c
@@ -33,7 +33,6 @@
/**
* SECTION:nm-setting-team
* @short_description: Describes connection properties for teams
- * @include: nm-setting-team.h
*
* The #NMSettingTeam object is a #NMSetting subclass that describes properties
* necessary for team connections.
diff --git a/libnm-core/nm-setting-team.h b/libnm-core/nm-setting-team.h
index f33ec5b1c..4ef04c24f 100644
--- a/libnm-core/nm-setting-team.h
+++ b/libnm-core/nm-setting-team.h
@@ -21,6 +21,10 @@
#ifndef NM_SETTING_TEAM_H
#define NM_SETTING_TEAM_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-vlan.c b/libnm-core/nm-setting-vlan.c
index bfb08c38a..0cb137471 100644
--- a/libnm-core/nm-setting-vlan.c
+++ b/libnm-core/nm-setting-vlan.c
@@ -34,7 +34,6 @@
/**
* SECTION:nm-setting-vlan
* @short_description: Describes connection properties for VLAN interfaces
- * @include: nm-setting-vlan.h
*
* The #NMSettingVlan object is a #NMSetting subclass that describes properties
* necessary for connection to VLAN interfaces.
diff --git a/libnm-core/nm-setting-vlan.h b/libnm-core/nm-setting-vlan.h
index 9c37da36e..3d777f7fe 100644
--- a/libnm-core/nm-setting-vlan.h
+++ b/libnm-core/nm-setting-vlan.h
@@ -22,6 +22,10 @@
#ifndef NM_SETTING_VLAN_H
#define NM_SETTING_VLAN_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include "nm-setting.h"
#include <linux/if_vlan.h>
diff --git a/libnm-core/nm-setting-vpn.c b/libnm-core/nm-setting-vpn.c
index 2366f17ee..154345ab2 100644
--- a/libnm-core/nm-setting-vpn.c
+++ b/libnm-core/nm-setting-vpn.c
@@ -34,7 +34,6 @@
/**
* SECTION:nm-setting-vpn
* @short_description: Describes connection properties for Virtual Private Networks
- * @include: nm-setting-vpn.h
*
* The #NMSettingVpn object is a #NMSetting subclass that describes properties
* necessary for connection to Virtual Private Networks. NetworkManager uses
diff --git a/libnm-core/nm-setting-vpn.h b/libnm-core/nm-setting-vpn.h
index ba2f01670..09fcb6074 100644
--- a/libnm-core/nm-setting-vpn.h
+++ b/libnm-core/nm-setting-vpn.h
@@ -23,6 +23,10 @@
#ifndef NM_SETTING_VPN_H
#define NM_SETTING_VPN_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-wimax.c b/libnm-core/nm-setting-wimax.c
index 1a4a6ec38..60ab79f93 100644
--- a/libnm-core/nm-setting-wimax.c
+++ b/libnm-core/nm-setting-wimax.c
@@ -32,7 +32,6 @@
/**
* SECTION:nm-setting-wimax
* @short_description: Describes 802.16e Mobile WiMAX connection properties
- * @include: nm-setting-wimax.h
*
* The #NMSettingWimax object is a #NMSetting subclass that describes properties
* necessary for connection to 802.16e Mobile WiMAX networks.
diff --git a/libnm-core/nm-setting-wimax.h b/libnm-core/nm-setting-wimax.h
index 8e9df6acc..f5b49fd8e 100644
--- a/libnm-core/nm-setting-wimax.h
+++ b/libnm-core/nm-setting-wimax.h
@@ -22,6 +22,10 @@
#ifndef NM_SETTING_WIMAX_H
#define NM_SETTING_WIMAX_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-wired.c b/libnm-core/nm-setting-wired.c
index 2b90bfa9b..1147c7fae 100644
--- a/libnm-core/nm-setting-wired.c
+++ b/libnm-core/nm-setting-wired.c
@@ -36,7 +36,6 @@
/**
* SECTION:nm-setting-wired
* @short_description: Describes connection properties for Ethernet-based networks
- * @include: nm-setting-wired.h
*
* The #NMSettingWired object is a #NMSetting subclass that describes properties
* necessary for connection to Ethernet networks.
diff --git a/libnm-core/nm-setting-wired.h b/libnm-core/nm-setting-wired.h
index 947c89fc3..f8d215ec2 100644
--- a/libnm-core/nm-setting-wired.h
+++ b/libnm-core/nm-setting-wired.h
@@ -23,6 +23,10 @@
#ifndef NM_SETTING_WIRED_H
#define NM_SETTING_WIRED_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-wireless-security.c b/libnm-core/nm-setting-wireless-security.c
index a93577bcf..8d6d10055 100644
--- a/libnm-core/nm-setting-wireless-security.c
+++ b/libnm-core/nm-setting-wireless-security.c
@@ -37,7 +37,6 @@
* SECTION:nm-setting-wireless-security
* @short_description: Describes connection properties for Wi-Fi networks that
* use WEP, LEAP, WPA or WPA2/RSN security
- * @include: nm-setting-wireless-security.h
*
* The #NMSettingWirelessSecurity object is a #NMSetting subclass that describes
* properties necessary for connection to encrypted Wi-Fi networks.
diff --git a/libnm-core/nm-setting-wireless-security.h b/libnm-core/nm-setting-wireless-security.h
index ff07a91be..92685cc1d 100644
--- a/libnm-core/nm-setting-wireless-security.h
+++ b/libnm-core/nm-setting-wireless-security.h
@@ -23,6 +23,10 @@
#ifndef NM_SETTING_WIRELESS_SECURITY_H
#define NM_SETTING_WIRELESS_SECURITY_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
G_BEGIN_DECLS
diff --git a/libnm-core/nm-setting-wireless.c b/libnm-core/nm-setting-wireless.c
index f3473f463..ce788dc80 100644
--- a/libnm-core/nm-setting-wireless.c
+++ b/libnm-core/nm-setting-wireless.c
@@ -37,7 +37,6 @@
/**
* SECTION:nm-setting-wireless
* @short_description: Describes connection properties for 802.11 Wi-Fi networks
- * @include: nm-setting-wireless.h
*
* The #NMSettingWireless object is a #NMSetting subclass that describes properties
* necessary for connection to 802.11 Wi-Fi networks.
diff --git a/libnm-core/nm-setting-wireless.h b/libnm-core/nm-setting-wireless.h
index 1efd55e0f..6ca9c87c3 100644
--- a/libnm-core/nm-setting-wireless.h
+++ b/libnm-core/nm-setting-wireless.h
@@ -23,6 +23,10 @@
#ifndef NM_SETTING_WIRELESS_H
#define NM_SETTING_WIRELESS_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-setting.h>
#include <nm-setting-wireless-security.h>
#include <nm-dbus-interface.h>
diff --git a/libnm-core/nm-setting.c b/libnm-core/nm-setting.c
index d21256c87..a2842fa13 100644
--- a/libnm-core/nm-setting.c
+++ b/libnm-core/nm-setting.c
@@ -32,7 +32,6 @@
/**
* SECTION:nm-setting
* @short_description: Describes related configuration information
- * @include: nm-setting.h
*
* Each #NMSetting contains properties that describe configuration that applies
* to a specific network layer (like IPv4 or IPv6 configuration) or device type
diff --git a/libnm-core/nm-setting.h b/libnm-core/nm-setting.h
index 62778edad..57a921679 100644
--- a/libnm-core/nm-setting.h
+++ b/libnm-core/nm-setting.h
@@ -23,6 +23,10 @@
#ifndef NM_SETTING_H
#define NM_SETTING_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <glib.h>
#include <glib-object.h>
diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c
index 4de0b9669..9be9077e2 100644
--- a/libnm-core/nm-utils.c
+++ b/libnm-core/nm-utils.c
@@ -37,7 +37,6 @@
/**
* SECTION:nm-utils
* @short_description: Utility functions
- * @include: nm-utils.h
*
* A collection of utility functions for working with SSIDs, IP addresses, Wi-Fi
* access points and devices, among other things.
diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h
index 38c244784..4064b9c3f 100644
--- a/libnm-core/nm-utils.h
+++ b/libnm-core/nm-utils.h
@@ -21,6 +21,10 @@
#ifndef NM_UTILS_H
#define NM_UTILS_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <glib.h>
#include "nm-connection.h"
diff --git a/libnm-core/tests/Makefile.am b/libnm-core/tests/Makefile.am
index ab9cedded..294b2afd9 100644
--- a/libnm-core/tests/Makefile.am
+++ b/libnm-core/tests/Makefile.am
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
-I${top_srcdir}/include \
-I$(top_srcdir)/libnm-core \
-I$(top_builddir)/libnm-core \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \
diff --git a/libnm/Makefile.am b/libnm/Makefile.am
index b0ea01a2e..1838d3090 100644
--- a/libnm/Makefile.am
+++ b/libnm/Makefile.am
@@ -9,6 +9,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/libnm \
-I$(top_builddir)/libnm \
-DG_LOG_DOMAIN=\""libnm"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE
include $(top_srcdir)/libnm-core/Makefile.libnm-core
@@ -26,6 +27,7 @@ libnm_la_CFLAGS = \
libnmincludedir = $(includedir)/libnm
libnminclude_HEADERS = \
+ NetworkManager.h \
nm-access-point.h \
nm-active-connection.h \
nm-client.h \
diff --git a/libnm/NetworkManager.h b/libnm/NetworkManager.h
new file mode 100644
index 000000000..da0a4e328
--- /dev/null
+++ b/libnm/NetworkManager.h
@@ -0,0 +1,91 @@
+/* -*- 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 2014 Red Hat, Inc.
+ */
+
+#ifndef NETWORKMANAGER_H
+#define NETWORKMANAGER_H
+
+#define __NETWORKMANAGER_H_INSIDE__
+
+#include <nm-access-point.h>
+#include <nm-active-connection.h>
+#include <nm-client.h>
+#include <nm-connection.h>
+#include <nm-core-enum-types.h>
+#include <nm-dbus-interface.h>
+#include <nm-device-adsl.h>
+#include <nm-device-bond.h>
+#include <nm-device-bridge.h>
+#include <nm-device-bt.h>
+#include <nm-device-ethernet.h>
+#include <nm-device-generic.h>
+#include <nm-device-infiniband.h>
+#include <nm-device-modem.h>
+#include <nm-device-olpc-mesh.h>
+#include <nm-device-team.h>
+#include <nm-device-vlan.h>
+#include <nm-device-wifi.h>
+#include <nm-device-wimax.h>
+#include <nm-device.h>
+#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-object.h>
+#include <nm-remote-connection.h>
+#include <nm-remote-settings.h>
+#include <nm-secret-agent.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-port.h>
+#include <nm-setting-bridge.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-team-port.h>
+#include <nm-setting-team.h>
+#include <nm-setting-vlan.h>
+#include <nm-setting-vpn.h>
+#include <nm-setting-wimax.h>
+#include <nm-setting-wired.h>
+#include <nm-setting-wireless-security.h>
+#include <nm-setting-wireless.h>
+#include <nm-setting.h>
+#include <nm-types.h>
+#include <nm-utils.h>
+#include <nm-version.h>
+#include <nm-vpn-connection.h>
+#include <nm-vpn-dbus-interface.h>
+#include <nm-wimax-nsp.h>
+
+#undef __NETWORKMANAGER_H_INSIDE__
+
+#endif /* NETWORKMANAGER_H */
diff --git a/libnm/nm-access-point.h b/libnm/nm-access-point.h
index 9717b43ad..e0ec11894 100644
--- a/libnm/nm-access-point.h
+++ b/libnm/nm-access-point.h
@@ -22,6 +22,10 @@
#ifndef NM_ACCESS_POINT_H
#define NM_ACCESS_POINT_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <glib.h>
#include <glib-object.h>
#include <nm-dbus-interface.h>
diff --git a/libnm/nm-active-connection.h b/libnm/nm-active-connection.h
index a66c30e34..5c67b325b 100644
--- a/libnm/nm-active-connection.h
+++ b/libnm/nm-active-connection.h
@@ -22,6 +22,10 @@
#ifndef NM_ACTIVE_CONNECTION_H
#define NM_ACTIVE_CONNECTION_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <glib.h>
#include <glib-object.h>
#include "nm-object.h"
diff --git a/libnm/nm-client.h b/libnm/nm-client.h
index 830856d81..8fc676b8f 100644
--- a/libnm/nm-client.h
+++ b/libnm/nm-client.h
@@ -22,6 +22,10 @@
#ifndef NM_CLIENT_H
#define NM_CLIENT_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
diff --git a/libnm/nm-device-adsl.h b/libnm/nm-device-adsl.h
index 34ec822e7..26af4a441 100644
--- a/libnm/nm-device-adsl.h
+++ b/libnm/nm-device-adsl.h
@@ -21,6 +21,10 @@
#ifndef NM_DEVICE_ADSL_H
#define NM_DEVICE_ADSL_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include "nm-device.h"
G_BEGIN_DECLS
diff --git a/libnm/nm-device-bond.h b/libnm/nm-device-bond.h
index 0655c31f5..53312de70 100644
--- a/libnm/nm-device-bond.h
+++ b/libnm/nm-device-bond.h
@@ -21,6 +21,10 @@
#ifndef NM_DEVICE_BOND_H
#define NM_DEVICE_BOND_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include "nm-device.h"
G_BEGIN_DECLS
diff --git a/libnm/nm-device-bridge.h b/libnm/nm-device-bridge.h
index 73ae852cc..056729de3 100644
--- a/libnm/nm-device-bridge.h
+++ b/libnm/nm-device-bridge.h
@@ -21,6 +21,10 @@
#ifndef NM_DEVICE_BRIDGE_H
#define NM_DEVICE_BRIDGE_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include "nm-device.h"
G_BEGIN_DECLS
diff --git a/libnm/nm-device-bt.h b/libnm/nm-device-bt.h
index f43d4e16c..03a24be7a 100644
--- a/libnm/nm-device-bt.h
+++ b/libnm/nm-device-bt.h
@@ -22,6 +22,10 @@
#ifndef NM_DEVICE_BT_H
#define NM_DEVICE_BT_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include "nm-dbus-interface.h"
#include "nm-device.h"
diff --git a/libnm/nm-device-ethernet.h b/libnm/nm-device-ethernet.h
index d1ce3ce46..05cafce9d 100644
--- a/libnm/nm-device-ethernet.h
+++ b/libnm/nm-device-ethernet.h
@@ -22,6 +22,10 @@
#ifndef NM_DEVICE_ETHERNET_H
#define NM_DEVICE_ETHERNET_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include "nm-device.h"
G_BEGIN_DECLS
diff --git a/libnm/nm-device-generic.h b/libnm/nm-device-generic.h
index 96899ee71..4b2ead760 100644
--- a/libnm/nm-device-generic.h
+++ b/libnm/nm-device-generic.h
@@ -21,6 +21,10 @@
#ifndef NM_DEVICE_GENERIC_H
#define NM_DEVICE_GENERIC_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include "nm-device.h"
G_BEGIN_DECLS
diff --git a/libnm/nm-device-infiniband.h b/libnm/nm-device-infiniband.h
index 22b9b7a72..97d86c5f1 100644
--- a/libnm/nm-device-infiniband.h
+++ b/libnm/nm-device-infiniband.h
@@ -21,6 +21,10 @@
#ifndef NM_DEVICE_INFINIBAND_H
#define NM_DEVICE_INFINIBAND_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include "nm-device.h"
G_BEGIN_DECLS
diff --git a/libnm/nm-device-modem.h b/libnm/nm-device-modem.h
index 683685cbb..423a82ee7 100644
--- a/libnm/nm-device-modem.h
+++ b/libnm/nm-device-modem.h
@@ -22,6 +22,10 @@
#ifndef NM_DEVICE_MODEM_H
#define NM_DEVICE_MODEM_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include "nm-device.h"
G_BEGIN_DECLS
diff --git a/libnm/nm-device-olpc-mesh.h b/libnm/nm-device-olpc-mesh.h
index 1b12b46ff..5a2206875 100644
--- a/libnm/nm-device-olpc-mesh.h
+++ b/libnm/nm-device-olpc-mesh.h
@@ -21,6 +21,10 @@
#ifndef NM_DEVICE_OLPC_MESH_H
#define NM_DEVICE_OLPC_MESH_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include "nm-device.h"
#include "nm-device-wifi.h"
diff --git a/libnm/nm-device-team.h b/libnm/nm-device-team.h
index 2c63c8743..c44adcc4a 100644
--- a/libnm/nm-device-team.h
+++ b/libnm/nm-device-team.h
@@ -21,6 +21,10 @@
#ifndef NM_DEVICE_TEAM_H
#define NM_DEVICE_TEAM_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include "nm-device.h"
G_BEGIN_DECLS
diff --git a/libnm/nm-device-vlan.h b/libnm/nm-device-vlan.h
index 628a6d5cf..6825abefc 100644
--- a/libnm/nm-device-vlan.h
+++ b/libnm/nm-device-vlan.h
@@ -21,6 +21,10 @@
#ifndef NM_DEVICE_VLAN_H
#define NM_DEVICE_VLAN_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include "nm-device.h"
G_BEGIN_DECLS
diff --git a/libnm/nm-device-wifi.h b/libnm/nm-device-wifi.h
index 651a43c2f..195c3328d 100644
--- a/libnm/nm-device-wifi.h
+++ b/libnm/nm-device-wifi.h
@@ -22,6 +22,10 @@
#ifndef NM_DEVICE_WIFI_H
#define NM_DEVICE_WIFI_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include "nm-device.h"
#include "nm-access-point.h"
diff --git a/libnm/nm-device-wimax.h b/libnm/nm-device-wimax.h
index cf368232d..5853add41 100644
--- a/libnm/nm-device-wimax.h
+++ b/libnm/nm-device-wimax.h
@@ -22,6 +22,10 @@
#ifndef NM_DEVICE_WIMAX_H
#define NM_DEVICE_WIMAX_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include "nm-device.h"
#include "nm-wimax-nsp.h"
diff --git a/libnm/nm-device.h b/libnm/nm-device.h
index 072d6465f..085e14770 100644
--- a/libnm/nm-device.h
+++ b/libnm/nm-device.h
@@ -22,6 +22,10 @@
#ifndef NM_DEVICE_H
#define NM_DEVICE_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <glib.h>
#include <glib-object.h>
#include <dbus/dbus-glib.h>
diff --git a/libnm/nm-dhcp4-config.h b/libnm/nm-dhcp4-config.h
index 1055e9e89..9b0c81078 100644
--- a/libnm/nm-dhcp4-config.h
+++ b/libnm/nm-dhcp4-config.h
@@ -22,6 +22,10 @@
#ifndef NM_DHCP4_CONFIG_H
#define NM_DHCP4_CONFIG_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <glib.h>
#include <glib-object.h>
#include <dbus/dbus-glib.h>
diff --git a/libnm/nm-dhcp6-config.h b/libnm/nm-dhcp6-config.h
index bc08b0aaf..cef2a1a37 100644
--- a/libnm/nm-dhcp6-config.h
+++ b/libnm/nm-dhcp6-config.h
@@ -22,6 +22,10 @@
#ifndef NM_DHCP6_CONFIG_H
#define NM_DHCP6_CONFIG_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <glib.h>
#include <glib-object.h>
#include <dbus/dbus-glib.h>
diff --git a/libnm/nm-ip4-config.h b/libnm/nm-ip4-config.h
index 4ded98553..554248695 100644
--- a/libnm/nm-ip4-config.h
+++ b/libnm/nm-ip4-config.h
@@ -22,6 +22,10 @@
#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 <glib.h>
#include <glib-object.h>
#include <dbus/dbus-glib.h>
diff --git a/libnm/nm-ip6-config.h b/libnm/nm-ip6-config.h
index 00b77421a..a1793fd25 100644
--- a/libnm/nm-ip6-config.h
+++ b/libnm/nm-ip6-config.h
@@ -22,6 +22,10 @@
#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 <glib.h>
#include <glib-object.h>
#include <dbus/dbus-glib.h>
diff --git a/libnm/nm-object.h b/libnm/nm-object.h
index 6fcd589e1..e3e0d739f 100644
--- a/libnm/nm-object.h
+++ b/libnm/nm-object.h
@@ -22,6 +22,10 @@
#ifndef NM_OBJECT_H
#define NM_OBJECT_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <glib.h>
#include <glib-object.h>
#include <dbus/dbus-glib.h>
diff --git a/libnm/nm-remote-connection.h b/libnm/nm-remote-connection.h
index c5912e44f..23964a51b 100644
--- a/libnm/nm-remote-connection.h
+++ b/libnm/nm-remote-connection.h
@@ -22,6 +22,10 @@
#ifndef __NM_REMOTE_CONNECTION_H__
#define __NM_REMOTE_CONNECTION_H__
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <glib-object.h>
#include <dbus/dbus-glib.h>
diff --git a/libnm/nm-remote-settings.h b/libnm/nm-remote-settings.h
index 9ce5e81ab..aebd2c0c8 100644
--- a/libnm/nm-remote-settings.h
+++ b/libnm/nm-remote-settings.h
@@ -22,6 +22,10 @@
#ifndef NM_REMOTE_SETTINGS_H
#define NM_REMOTE_SETTINGS_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <gio/gio.h>
#include <nm-connection.h>
#include <nm-remote-connection.h>
diff --git a/libnm/nm-secret-agent.h b/libnm/nm-secret-agent.h
index ad315d7fc..84ddaaa9d 100644
--- a/libnm/nm-secret-agent.h
+++ b/libnm/nm-secret-agent.h
@@ -21,6 +21,10 @@
#ifndef NM_SECRET_AGENT_H
#define NM_SECRET_AGENT_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <nm-connection.h>
G_BEGIN_DECLS
diff --git a/libnm/nm-types.h b/libnm/nm-types.h
index 170e8a36d..9fcef32e1 100644
--- a/libnm/nm-types.h
+++ b/libnm/nm-types.h
@@ -21,6 +21,10 @@
#ifndef NM_TYPES_H
#define NM_TYPES_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <glib.h>
#include <glib-object.h>
diff --git a/libnm/nm-vpn-connection.h b/libnm/nm-vpn-connection.h
index d38ebcc39..a7abc8c53 100644
--- a/libnm/nm-vpn-connection.h
+++ b/libnm/nm-vpn-connection.h
@@ -22,6 +22,10 @@
#ifndef NM_VPN_CONNECTION_H
#define NM_VPN_CONNECTION_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <glib.h>
#include <glib-object.h>
#include <dbus/dbus-glib.h>
diff --git a/libnm/nm-vpn-plugin-ui-interface.h b/libnm/nm-vpn-plugin-ui-interface.h
index cc3c4943b..11f44b376 100644
--- a/libnm/nm-vpn-plugin-ui-interface.h
+++ b/libnm/nm-vpn-plugin-ui-interface.h
@@ -22,6 +22,10 @@
#ifndef NM_VPN_PLUGIN_UI_INTERFACE_H
#define NM_VPN_PLUGIN_UI_INTERFACE_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <glib.h>
#include <glib-object.h>
#include <nm-connection.h>
diff --git a/libnm/nm-vpn-plugin-utils.h b/libnm/nm-vpn-plugin-utils.h
index d87ef16aa..acab12f38 100644
--- a/libnm/nm-vpn-plugin-utils.h
+++ b/libnm/nm-vpn-plugin-utils.h
@@ -21,6 +21,10 @@
#ifndef NM_VPN_PLUGIN_UTILS_H
#define NM_VPN_PLUGIN_UTILS_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <glib.h>
#include <nm-setting.h>
diff --git a/libnm/nm-vpn-plugin.h b/libnm/nm-vpn-plugin.h
index 46e69e703..839cfb08c 100644
--- a/libnm/nm-vpn-plugin.h
+++ b/libnm/nm-vpn-plugin.h
@@ -22,6 +22,10 @@
#ifndef NM_VPN_PLUGIN_H
#define NM_VPN_PLUGIN_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <glib.h>
#include <glib-object.h>
#include <dbus/dbus-glib.h>
diff --git a/libnm/nm-wimax-nsp.h b/libnm/nm-wimax-nsp.h
index 920bda6a9..48f89fa15 100644
--- a/libnm/nm-wimax-nsp.h
+++ b/libnm/nm-wimax-nsp.h
@@ -22,6 +22,10 @@
#ifndef NM_WIMAX_NSP_H
#define NM_WIMAX_NSP_H
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
#include <glib.h>
#include <glib-object.h>
#include <nm-dbus-interface.h>
diff --git a/libnm/tests/Makefile.am b/libnm/tests/Makefile.am
index cda638a83..40763d010 100644
--- a/libnm/tests/Makefile.am
+++ b/libnm/tests/Makefile.am
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
-I$(top_builddir)/libnm \
-I$(top_srcdir)/libnm-core \
-I$(top_builddir)/libnm-core \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
-DTEST_NM_SERVICE=\"$(abs_top_srcdir)/tools/test-networkmanager-service.py\" \
$(GLIB_CFLAGS) \
diff --git a/src/Makefile.am b/src/Makefile.am
index 16e2620b3..f41d170ee 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -41,6 +41,7 @@ AM_CPPFLAGS = \
-I$(top_builddir)/libnm-core \
-I$(top_srcdir)/callouts \
-DG_LOG_DOMAIN=\""NetworkManager"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE
# add each subdirectory that contains a libNM source file. $(sort) is being used
diff --git a/src/devices/adsl/Makefile.am b/src/devices/adsl/Makefile.am
index 646069ca0..07a8f9eeb 100644
--- a/src/devices/adsl/Makefile.am
+++ b/src/devices/adsl/Makefile.am
@@ -11,6 +11,7 @@ AM_CPPFLAGS = \
-I${top_builddir}/libnm-core \
-I${top_srcdir}/libnm-core \
-DG_LOG_DOMAIN=\""NetworkManager-adsl"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS) \
$(GUDEV_CFLAGS)
diff --git a/src/devices/bluetooth/Makefile.am b/src/devices/bluetooth/Makefile.am
index f5cc542d5..07c8f0102 100644
--- a/src/devices/bluetooth/Makefile.am
+++ b/src/devices/bluetooth/Makefile.am
@@ -13,6 +13,7 @@ AM_CPPFLAGS = \
-I${top_builddir}/libnm-core \
-I${top_srcdir}/libnm-core \
-DG_LOG_DOMAIN=\""NetworkManager-bluetooth"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS)
diff --git a/src/devices/team/Makefile.am b/src/devices/team/Makefile.am
index 57f3c1978..6fea9b3f9 100644
--- a/src/devices/team/Makefile.am
+++ b/src/devices/team/Makefile.am
@@ -11,6 +11,7 @@ AM_CPPFLAGS = \
-I${top_builddir}/libnm-core \
-I${top_srcdir}/libnm-core \
-DG_LOG_DOMAIN=\""NetworkManager-team"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS)
diff --git a/src/devices/wifi/Makefile.am b/src/devices/wifi/Makefile.am
index 73fb71e79..230c00acc 100644
--- a/src/devices/wifi/Makefile.am
+++ b/src/devices/wifi/Makefile.am
@@ -15,6 +15,7 @@ AM_CPPFLAGS = \
-I${top_builddir}/libnm-core \
-I${top_srcdir}/libnm-core \
-DG_LOG_DOMAIN=\""NetworkManager-wifi"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS)
diff --git a/src/devices/wifi/tests/Makefile.am b/src/devices/wifi/tests/Makefile.am
index 8db3938c5..09c6401fe 100644
--- a/src/devices/wifi/tests/Makefile.am
+++ b/src/devices/wifi/tests/Makefile.am
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/devices/wifi \
-I$(top_builddir)/src \
-DG_LOG_DOMAIN=\""NetworkManager-wifi"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS)
diff --git a/src/devices/wimax/Makefile.am b/src/devices/wimax/Makefile.am
index f0fcb291e..555b5ff2e 100644
--- a/src/devices/wimax/Makefile.am
+++ b/src/devices/wimax/Makefile.am
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
-I${top_builddir}/libnm-core \
-I${top_srcdir}/libnm-core \
-DG_LOG_DOMAIN=\""NetworkManager-wimax"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS) \
$(IWMX_SDK_CFLAGS)
diff --git a/src/devices/wwan/Makefile.am b/src/devices/wwan/Makefile.am
index bdb4e49b0..7e5b190bf 100644
--- a/src/devices/wwan/Makefile.am
+++ b/src/devices/wwan/Makefile.am
@@ -12,6 +12,7 @@ AM_CPPFLAGS = \
-I${top_builddir}/libnm-core \
-I${top_srcdir}/libnm-core \
-DG_LOG_DOMAIN=\""NetworkManager-wwan"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS) \
$(MM_GLIB_CFLAGS)
diff --git a/src/dhcp-manager/tests/Makefile.am b/src/dhcp-manager/tests/Makefile.am
index 150b001ec..9d6e7b97b 100644
--- a/src/dhcp-manager/tests/Makefile.am
+++ b/src/dhcp-manager/tests/Makefile.am
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/platform \
-DG_LOG_DOMAIN=\""NetworkManager"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
-DTESTDIR="\"$(abs_srcdir)\""
diff --git a/src/dnsmasq-manager/tests/Makefile.am b/src/dnsmasq-manager/tests/Makefile.am
index 5884efcf7..c6ce1cdaf 100644
--- a/src/dnsmasq-manager/tests/Makefile.am
+++ b/src/dnsmasq-manager/tests/Makefile.am
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/platform \
-DG_LOG_DOMAIN=\""NetworkManager"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
-DTESTDIR="\"$(abs_srcdir)\""
diff --git a/src/platform/tests/Makefile.am b/src/platform/tests/Makefile.am
index 55766a62d..b297e63b2 100644
--- a/src/platform/tests/Makefile.am
+++ b/src/platform/tests/Makefile.am
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
-I${top_builddir}/libnm-core \
-I${srcdir}/.. \
-DG_LOG_DOMAIN=\""NetworkManager"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
$(GUDEV_CFLAGS) \
diff --git a/src/ppp-manager/Makefile.am b/src/ppp-manager/Makefile.am
index 4e2b2f5f3..aef3f418a 100644
--- a/src/ppp-manager/Makefile.am
+++ b/src/ppp-manager/Makefile.am
@@ -5,6 +5,7 @@ AM_CPPFLAGS = \
-I${top_srcdir}/libnm-core \
-I${top_builddir}/libnm-core \
-DG_LOG_DOMAIN=\""nm-pppd-plugin"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS) \
$(GLIB_CFLAGS)
diff --git a/src/rdisc/tests/Makefile.am b/src/rdisc/tests/Makefile.am
index d53acc6d2..e6fe13696 100644
--- a/src/rdisc/tests/Makefile.am
+++ b/src/rdisc/tests/Makefile.am
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
-I${top_builddir}/libnm-core \
-I${srcdir}/.. \
-DG_LOG_DOMAIN=\""NetworkManager"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
$(LIBNDP_CFLAGS)
diff --git a/src/settings/plugins/example/Makefile.am b/src/settings/plugins/example/Makefile.am
index ac9b6c6d2..8fc4aa92b 100644
--- a/src/settings/plugins/example/Makefile.am
+++ b/src/settings/plugins/example/Makefile.am
@@ -5,6 +5,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/libnm-core \
-I$(top_builddir)/libnm-core \
-DG_LOG_DOMAIN=\""NetworkManager-example"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \
diff --git a/src/settings/plugins/ifcfg-rh/Makefile.am b/src/settings/plugins/ifcfg-rh/Makefile.am
index c7f8c5148..10064812d 100644
--- a/src/settings/plugins/ifcfg-rh/Makefile.am
+++ b/src/settings/plugins/ifcfg-rh/Makefile.am
@@ -31,6 +31,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/libnm-core \
-I$(top_builddir)/libnm-core \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \
diff --git a/src/settings/plugins/ifcfg-rh/tests/Makefile.am b/src/settings/plugins/ifcfg-rh/tests/Makefile.am
index 4cee2b52c..f01dac483 100644
--- a/src/settings/plugins/ifcfg-rh/tests/Makefile.am
+++ b/src/settings/plugins/ifcfg-rh/tests/Makefile.am
@@ -15,6 +15,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/settings \
-I$(srcdir)/../ \
-DG_LOG_DOMAIN=\""NetworkManager-ifcfg-rh"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
-DTEST_IFCFG_DIR=\"$(abs_srcdir)\" \
-DTEST_SCRATCH_DIR=\"$(abs_builddir)/\" \
diff --git a/src/settings/plugins/ifcfg-suse/Makefile.am b/src/settings/plugins/ifcfg-suse/Makefile.am
index 12e49ff65..46204d7da 100644
--- a/src/settings/plugins/ifcfg-suse/Makefile.am
+++ b/src/settings/plugins/ifcfg-suse/Makefile.am
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/libnm-core \
-I$(top_builddir)/libnm-core \
-DG_LOG_DOMAIN=\""NetworkManager-ifcfg-suse"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
-DSYSCONFDIR=\"$(sysconfdir)\"
diff --git a/src/settings/plugins/ifnet/Makefile.am b/src/settings/plugins/ifnet/Makefile.am
index 2c9d97127..02b5207b8 100644
--- a/src/settings/plugins/ifnet/Makefile.am
+++ b/src/settings/plugins/ifnet/Makefile.am
@@ -10,6 +10,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/libnm-core \
-I$(top_builddir)/libnm-core \
-DG_LOG_DOMAIN=\""NetworkManager-ifnet"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
-DSYSCONFDIR=\"$(sysconfdir)\"
diff --git a/src/settings/plugins/ifnet/tests/Makefile.am b/src/settings/plugins/ifnet/tests/Makefile.am
index 7f3960bdd..90d724302 100644
--- a/src/settings/plugins/ifnet/tests/Makefile.am
+++ b/src/settings/plugins/ifnet/tests/Makefile.am
@@ -11,6 +11,7 @@ AM_CPPFLAGS= \
-I$(top_srcdir)/src/settings \
-I$(top_srcdir)/src/platform \
-DG_LOG_DOMAIN=\""NetworkManager-ifnet"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(CHECK_CFLAGS) \
$(GLIB_CFLAGS) \
diff --git a/src/settings/plugins/ifupdown/Makefile.am b/src/settings/plugins/ifupdown/Makefile.am
index 87cac68d5..0ca543e34 100644
--- a/src/settings/plugins/ifupdown/Makefile.am
+++ b/src/settings/plugins/ifupdown/Makefile.am
@@ -9,6 +9,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/libnm-core \
-I$(top_builddir)/libnm-core \
-DG_LOG_DOMAIN=\""NetworkManager-ifupdown"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
$(GUDEV_CFLAGS) \
diff --git a/src/settings/plugins/ifupdown/tests/Makefile.am b/src/settings/plugins/ifupdown/tests/Makefile.am
index 25033c16d..14a58f87e 100644
--- a/src/settings/plugins/ifupdown/tests/Makefile.am
+++ b/src/settings/plugins/ifupdown/tests/Makefile.am
@@ -8,6 +8,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/settings \
-I$(srcdir)/../ \
-DG_LOG_DOMAIN=\""NetworkManager-ifupdown"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
-DTEST_ENI_DIR=\"$(abs_srcdir)\"
diff --git a/src/settings/plugins/keyfile/Makefile.am b/src/settings/plugins/keyfile/Makefile.am
index 70749944f..bf89b0679 100644
--- a/src/settings/plugins/keyfile/Makefile.am
+++ b/src/settings/plugins/keyfile/Makefile.am
@@ -9,6 +9,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/libnm-core \
-I$(top_builddir)/libnm-core \
-DG_LOG_DOMAIN=\""NetworkManager-keyfile"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \
diff --git a/src/settings/plugins/keyfile/tests/Makefile.am b/src/settings/plugins/keyfile/tests/Makefile.am
index 668f433e6..1cd6ab91c 100644
--- a/src/settings/plugins/keyfile/tests/Makefile.am
+++ b/src/settings/plugins/keyfile/tests/Makefile.am
@@ -15,6 +15,7 @@ AM_CPPFLAGS = \
$(DBUS_CFLAGS) \
$(CODE_COVERAGE_CFLAGS) \
-DG_LOG_DOMAIN=\""NetworkManager-keyfile"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
-DTEST_KEYFILES_DIR=\"$(abs_srcdir)/keyfiles\" \
-DTEST_SCRATCH_DIR=\"$(abs_builddir)/keyfiles\" \
diff --git a/src/settings/tests/Makefile.am b/src/settings/tests/Makefile.am
index cc53bcf3f..28accaa8b 100644
--- a/src/settings/tests/Makefile.am
+++ b/src/settings/tests/Makefile.am
@@ -4,6 +4,7 @@ AM_CPPFLAGS = \
-I$(top_builddir)/libnm-core \
-I$(top_srcdir)/src/settings \
-DG_LOG_DOMAIN=\""NetworkManager"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS)
diff --git a/src/supplicant-manager/tests/Makefile.am b/src/supplicant-manager/tests/Makefile.am
index 2d9410c15..452ccdc1f 100644
--- a/src/supplicant-manager/tests/Makefile.am
+++ b/src/supplicant-manager/tests/Makefile.am
@@ -5,6 +5,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/supplicant-manager \
-DG_LOG_DOMAIN=\""NetworkManager"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS)
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index d1654fb89..aca9b3cc8 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -9,6 +9,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src \
-I$(top_builddir)/src \
-DG_LOG_DOMAIN=\""NetworkManager"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS)
diff --git a/src/tests/config/Makefile.am b/src/tests/config/Makefile.am
index 33d01815e..66009c877 100644
--- a/src/tests/config/Makefile.am
+++ b/src/tests/config/Makefile.am
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/devices \
-I${top_srcdir}/src/platform \
-DG_LOG_DOMAIN=\""NetworkManager"\" \
+ -DNETWORKMANAGER_COMPILATION \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \