summaryrefslogtreecommitdiff
path: root/libnm-core
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 /libnm-core
parent3ddce74803c15db7a970c737e8d4c33fccccb558 (diff)
downloadNetworkManager-d0b05b34d5f1ad8f52a15fed48cc2c02d2251145.tar.gz
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.)
Diffstat (limited to 'libnm-core')
-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
59 files changed, 118 insertions, 28 deletions
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) \