summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 fc8e94fc4c..1e7001c34e 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 c0d61877dd..c06178b225 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 a91ae2b27a..97b839b5f3 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 1397194f17..a1a45e3ad3 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 605de2e0cc..0c6d0e3a00 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 9cf8203d7d..65629a68ff 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 dc55100abd..cace83256f 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 d5076a6012..ab0455d473 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 163832eac7..5582b1d2ad 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 c952ecda96..6d49545787 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 709c8977fa..5960586512 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 e92952f331..ea59c4ed55 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 234eac9b0a..af40022b31 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 a7a32dd142..e1637f45d7 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 4ac0eb6413..96f35cc670 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 4b9ad5edbb..8d61d7525a 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 fffdc8ea4e..aadd74b395 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 de8b630554..47435ead55 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 2b959aaa85..d44126a869 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 35157e94dc..a359170a1b 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 d9a97102ee..8addabebd3 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 a991a7666a..db10b82a18 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 0dad12363b..b3ca8097fd 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 d22ec83459..2e1510f375 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 f6de671c85..c3bc7076b1 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 153aee7ca5..12b2f4e59d 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 e1040dffd9..9882c71389 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 70a9003b43..9b22f389dc 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 c2edf2ac5c..c5a70761d1 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 147e11957c..13a0927025 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 04b1581946..e7f6ef846b 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 d6b60be42a..459b944b9b 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 a86b8df57d..ca523ebbaf 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 2e59204b64..a564ff3685 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 35f8ccb9a9..795f663d93 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 3e462b1130..10b9c06ade 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 f5aba077cb..a50e8ba6c1 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 5bddf9f21f..59a51ba201 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 b89875c1a9..65df85b518 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 bc572ee166..aba22c6dd9 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 4c13a53bb2..608c666603 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 5338c6fceb..4dd178dbf6 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 f4e18a06ba..53805e27e2 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 3aa2bc9b05..2b52e7a340 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 6a17581d19..20027a9f0b 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 dc964a1364..3645157a2d 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 9fd1342277..9c3600330d 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 0a8eba7c0d..65bece0277 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 eb1f07d333..146c6e1af4 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 506ecbddee..57e4e656d4 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 d401fc4583..2184c4a774 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 3edb089211..38e1c46847 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 6aa94f2bab..093c9a3eb6 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 08dbab9760..243f4668dd 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 0bf2c791c7..423fa31acc 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 02457c13c5..0b9196c440 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 d06935cd3c..e0d75ccb75 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 976a59680a..8adc815193 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 938a110b8a..7b2fb3228e 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 75615a0494..2205bff199 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 6f219ccd44..ff7ab20995 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 713b37ea13..9bac022906 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 a1a200adb0..8448a6f3d6 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 827324fc67..ea323ac208 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 605cb23f82..9d9d501a64 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 6442d9890e..57fca83d8a 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 8e20285f7a..919af9e3d0 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 4e470e561b..42c1545a34 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 b58f33c292..6fa4fe2a92 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 df0ad5b3de..f3de89e98c 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 3572a1e3c8..5c1ed21fd0 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 11a7c29aab..0809bac32e 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 dae63bc0c5..b7433c22ff 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 44b9a85ba2..268413fd38 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 331bf72c7f..b6e45ce244 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 a6bdfb3f97..c71526cae4 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 d12e077da4..1fefb15528 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 d1d4fe8a00..97bf46981a 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 4a7ee89e65..0b8710b525 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 2a9377c422..8181430106 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 3280561837..cb8d00c38f 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 a9f3ff9325..527ac4bce1 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 0d8d4a1410..75305b1671 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 f33ec5b1c8..4ef04c24f3 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 bfb08c38aa..0cb1374719 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 9c37da36ef..3d777f7fe3 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 2366f17ee8..154345ab23 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 ba2f016704..09fcb60749 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 1a4a6ec384..60ab79f933 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 8e9df6accb..f5b49fd8ee 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 2b90bfa9b1..1147c7faec 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 947c89fc3a..f8d215ec2c 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 a93577bcfb..8d6d100550 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 ff07a91bed..92685cc1dd 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 f3473f4635..ce788dc800 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 1efd55e0fb..6ca9c87c39 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 d21256c873..a2842fa13a 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 62778edadc..57a921679e 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 4de0b96691..9be9077e25 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 38c2447849..4064b9c3f2 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 ab9cedded6..294b2afd95 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 b0ea01a2e4..1838d30904 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 0000000000..da0a4e3288
--- /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 9717b43ad9..e0ec118940 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 a66c30e341..5c67b325bd 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 830856d818..8fc676b8f2 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 34ec822e71..26af4a4416 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 0655c31f59..53312de702 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 73ae852cc9..056729de3c 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 f43d4e16ca..03a24be7af 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 d1ce3ce46c..05cafce9d3 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 96899ee712..4b2ead7602 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 22b9b7a72b..97d86c5f18 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 683685cbb5..423a82ee74 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 1b12b46ffc..5a22068758 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 2c63c8743f..c44adcc4a7 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 628a6d5cfe..6825abefc7 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 651a43c2f9..195c3328d0 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 cf368232d2..5853add41e 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 072d6465f6..085e14770c 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 1055e9e892..9b0c81078b 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 bc08b0aaf5..cef2a1a37e 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 4ded985534..5542486952 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 00b77421a9..a1793fd25d 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 6fcd589e12..e3e0d739f3 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 c5912e44f8..23964a51b2 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 9ce5e81ab6..aebd2c0c83 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 ad315d7fce..84ddaaa9d0 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 170e8a36d4..9fcef32e1f 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 d38ebcc39b..a7abc8c534 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 cc3c4943bd..11f44b3761 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 d87ef16aa4..acab12f38f 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 46e69e7033..839cfb08c4 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 920bda6a90..48f89fa15b 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 cda638a83f..40763d0109 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 16e2620b30..f41d170eef 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 646069ca0b..07a8f9eeb9 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 f5cc542d5f..07c8f01024 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 57f3c19781..6fea9b3f90 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 73fb71e795..230c00acc4 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 8db3938c56..09c6401fef 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 f0fcb291eb..555b5ff2e3 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 bdb4e49b07..7e5b190bf3 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 150b001ece..9d6e7b97b4 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 5884efcf73..c6ce1cdafc 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 55766a62da..b297e63b2c 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 4e2b2f5f37..aef3f418ae 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 d53acc6d2f..e6fe136968 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 ac9b6c6d2e..8fc4aa92b1 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 c7f8c51482..10064812d0 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 4cee2b52cb..f01dac4832 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 12e49ff653..46204d7da7 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 2c9d97127f..02b5207b8e 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 7f3960bdd1..90d7243020 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 87cac68d5b..0ca543e344 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 25033c16d2..14a58f87e5 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 70749944f3..bf89b06796 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 668f433e6e..1cd6ab91cd 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 cc53bcf3ff..28accaa8bd 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 2d9410c156..452ccdc1f7 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 d1654fb891..aca9b3cc8f 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 33d01815ee..66009c877b 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) \