libnm: include "nm-vpn-service-plugin.h" in "NetworkManager.h"
authorThomas Haller <thaller@redhat.com>
Wed, 27 Jan 2016 16:02:03 +0000 (17:02 +0100)
committerThomas Haller <thaller@redhat.com>
Wed, 27 Jan 2016 16:20:09 +0000 (17:20 +0100)
"nm-vpn-service-plugin.h" includes "nm-connection.h", so there is already no
way to use "nm-vpn-service-plugin.h" without also pulling in all "NetworkManager.h".

On the other hand, we might not include "nm-vpn-service-plugin.h" in
"NetworkManager.h" to keep the overall headers small (by default).
But let's just include it too. We already opted for convenience
over small-include by having one top-level header file.

libnm/NetworkManager.h
libnm/nm-vpn-service-plugin.h

index 35cd07a..b5dab8f 100644 (file)
@@ -88,6 +88,7 @@
 #include <nm-vpn-editor.h>
 #include <nm-vpn-editor-plugin.h>
 #include <nm-vpn-plugin-info.h>
+#include <nm-vpn-service-plugin.h>
 #include <nm-wimax-nsp.h>
 
 #undef __NETWORKMANAGER_H_INSIDE__
index f8b4ff8..2931918 100644 (file)
 #ifndef __NM_VPN_SERVICE_PLUGIN_H__
 #define __NM_VPN_SERVICE_PLUGIN_H__
 
+#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
+#error "Only <NetworkManager.h> can be included directly."
+#endif
+
 #include <gio/gio.h>
 #include <nm-vpn-dbus-interface.h>
 #include <nm-connection.h>