summaryrefslogtreecommitdiff
path: root/examples/C
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 /examples/C
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 'examples/C')
-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
6 files changed, 6 insertions, 31 deletions
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 */