[network-manager-openvpn/th/include-nm-default-bgo761198: 4/8] all: move libnm includes to nm-default.h
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn/th/include-nm-default-bgo761198: 4/8] all: move libnm includes to nm-default.h
- Date: Wed, 27 Jan 2016 20:17:13 +0000 (UTC)
commit 5907aad75f5dd063cc3e2294f39547b92e8b41ca
Author: Thomas Haller <thaller redhat com>
Date: Wed Jan 27 16:51:18 2016 +0100
all: move libnm includes to nm-default.h
auth-dialog/main.c | 1 -
common/utils.c | 6 ----
properties/auth-helpers.c | 19 ------------
properties/import-export.c | 26 -----------------
properties/nm-openvpn.c | 22 --------------
properties/tests/test-import-export.c | 2 -
shared/nm-default.h | 47 +++++++++++++++++++++++++++++++
src/nm-openvpn-service-openvpn-helper.c | 4 +--
src/nm-openvpn-service.c | 2 -
9 files changed, 48 insertions(+), 81 deletions(-)
---
diff --git a/auth-dialog/main.c b/auth-dialog/main.c
index 786e5c5..7c00493 100644
--- a/auth-dialog/main.c
+++ b/auth-dialog/main.c
@@ -34,7 +34,6 @@
#include "nm-default.h"
-#include <NetworkManager.h>
#include <nm-vpn-service-plugin.h>
#include <nma-vpn-password-dialog.h>
diff --git a/common/utils.c b/common/utils.c
index 239512e..4f5a558 100644
--- a/common/utils.c
+++ b/common/utils.c
@@ -24,12 +24,6 @@
#include <string.h>
#include "nm-default.h"
-
-#ifdef NM_OPENVPN_OLD
-#include <nm-setting-8021x.h>
-#else
-#include <NetworkManager.h>
-#endif
#include "utils.h"
gboolean
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index a980d0c..534ebd7 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -33,25 +33,6 @@
#include "nm-default.h"
-#ifdef NM_OPENVPN_OLD
-#define NM_VPN_LIBNM_COMPAT
-#include <nm-setting-connection.h>
-#include <nm-setting-8021x.h>
-#include <nm-utils.h>
-#include <nm-ui-utils.h>
-
-#define OPENVPN_EDITOR_PLUGIN_ERROR NM_SETTING_VPN_ERROR
-#define OPENVPN_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY NM_SETTING_VPN_ERROR_INVALID_PROPERTY
-
-#else /* !NM_OPENVPN_OLD */
-
-#include <NetworkManager.h>
-#include <nma-ui-utils.h>
-
-#define OPENVPN_EDITOR_PLUGIN_ERROR NM_CONNECTION_ERROR
-#define OPENVPN_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY NM_CONNECTION_ERROR_INVALID_PROPERTY
-#endif
-
#include "auth-helpers.h"
#include "nm-openvpn.h"
#include "../src/nm-openvpn-service-defines.h"
diff --git a/properties/import-export.c b/properties/import-export.c
index abe2783..2b85153 100644
--- a/properties/import-export.c
+++ b/properties/import-export.c
@@ -34,32 +34,6 @@
#include "nm-default.h"
-#ifdef NM_OPENVPN_OLD
-#define NM_VPN_LIBNM_COMPAT
-#include <nm-setting-vpn.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-ip4-config.h>
-#include <nm-utils.h>
-
-#define nm_simple_connection_new nm_connection_new
-#define NM_SETTING_IP_CONFIG NM_SETTING_IP4_CONFIG
-#define NM_SETTING_IP_CONFIG_METHOD NM_SETTING_IP4_CONFIG_METHOD
-#define NMSettingIPConfig NMSettingIP4Config
-
-#define OPENVPN_EDITOR_PLUGIN_ERROR NM_SETTING_VPN_ERROR
-#define OPENVPN_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN NM_SETTING_VPN_ERROR_UNKNOWN
-#define OPENVPN_EDITOR_PLUGIN_ERROR_FILE_NOT_READABLE NM_SETTING_VPN_ERROR_UNKNOWN
-
-#else /* !NM_OPENVPN_OLD */
-
-#include <NetworkManager.h>
-
-#define OPENVPN_EDITOR_PLUGIN_ERROR NM_CONNECTION_ERROR
-#define OPENVPN_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN NM_CONNECTION_ERROR_FAILED
-#define OPENVPN_EDITOR_PLUGIN_ERROR_FILE_NOT_READABLE NM_CONNECTION_ERROR_FAILED
-
-#endif
-
#include "import-export.h"
#include "nm-openvpn.h"
#include "../src/nm-openvpn-service-defines.h"
diff --git a/properties/nm-openvpn.c b/properties/nm-openvpn.c
index 7871a04..865c14b 100644
--- a/properties/nm-openvpn.c
+++ b/properties/nm-openvpn.c
@@ -36,28 +36,6 @@
#include "nm-default.h"
-#ifdef NM_OPENVPN_OLD
-#define NM_VPN_LIBNM_COMPAT
-#include <nm-vpn-plugin-ui-interface.h>
-#include <nm-setting-vpn.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-ip4-config.h>
-
-#define OPENVPN_EDITOR_PLUGIN_ERROR NM_SETTING_VPN_ERROR
-#define OPENVPN_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY NM_SETTING_VPN_ERROR_INVALID_PROPERTY
-#define OPENVPN_EDITOR_PLUGIN_ERROR_MISSING_PROPERTY NM_SETTING_VPN_ERROR_MISSING_PROPERTY
-#define OPENVPN_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN NM_SETTING_VPN_ERROR_UNKNOWN
-
-#else /* !NM_OPENVPN_OLD */
-
-#include <NetworkManager.h>
-
-#define OPENVPN_EDITOR_PLUGIN_ERROR NM_CONNECTION_ERROR
-#define OPENVPN_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY NM_CONNECTION_ERROR_INVALID_PROPERTY
-#define OPENVPN_EDITOR_PLUGIN_ERROR_MISSING_PROPERTY NM_CONNECTION_ERROR_MISSING_PROPERTY
-#define OPENVPN_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN NM_CONNECTION_ERROR_FAILED
-#endif
-
#include "../src/nm-openvpn-service-defines.h"
#include "nm-openvpn.h"
#include "auth-helpers.h"
diff --git a/properties/tests/test-import-export.c b/properties/tests/test-import-export.c
index d95a7f8..f66441e 100644
--- a/properties/tests/test-import-export.c
+++ b/properties/tests/test-import-export.c
@@ -27,8 +27,6 @@
#include "nm-default.h"
-#include <NetworkManager.h>
-
#include "nm-test-helpers.h"
#include "properties/nm-openvpn.h"
#include "src/nm-openvpn-service-defines.h"
diff --git a/shared/nm-default.h b/shared/nm-default.h
index de613af..968d8c6 100644
--- a/shared/nm-default.h
+++ b/shared/nm-default.h
@@ -56,6 +56,53 @@
/*****************************************************************************/
+#ifdef NM_OPENVPN_OLD
+
+#define NM_VPN_LIBNM_COMPAT
+#include <nm-setting-connection.h>
+#include <nm-setting-8021x.h>
+#include <nm-setting-ip4-config.h>
+#include <nm-setting-vpn.h>
+#include <nm-utils.h>
+#include <nm-vpn-plugin-ui-interface.h>
+
+#define nm_simple_connection_new nm_connection_new
+#define NM_SETTING_IP_CONFIG NM_SETTING_IP4_CONFIG
+#define NM_SETTING_IP_CONFIG_METHOD NM_SETTING_IP4_CONFIG_METHOD
+#define NMSettingIPConfig NMSettingIP4Config
+
+#define OPENVPN_EDITOR_PLUGIN_ERROR NM_SETTING_VPN_ERROR
+#define OPENVPN_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY NM_SETTING_VPN_ERROR_INVALID_PROPERTY
+#define OPENVPN_EDITOR_PLUGIN_ERROR_MISSING_PROPERTY NM_SETTING_VPN_ERROR_MISSING_PROPERTY
+#define OPENVPN_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN NM_SETTING_VPN_ERROR_UNKNOWN
+#define OPENVPN_EDITOR_PLUGIN_ERROR_FILE_NOT_READABLE NM_SETTING_VPN_ERROR_UNKNOWN
+
+#else /* !NM_OPENVPN_OLD */
+
+#include <NetworkManager.h>
+
+#define OPENVPN_EDITOR_PLUGIN_ERROR NM_CONNECTION_ERROR
+#define OPENVPN_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY NM_CONNECTION_ERROR_INVALID_PROPERTY
+#define OPENVPN_EDITOR_PLUGIN_ERROR_MISSING_PROPERTY NM_CONNECTION_ERROR_MISSING_PROPERTY
+#define OPENVPN_EDITOR_PLUGIN_ERROR_FILE_NOT_OPENVPN NM_CONNECTION_ERROR_FAILED
+#define OPENVPN_EDITOR_PLUGIN_ERROR_FILE_NOT_READABLE NM_CONNECTION_ERROR_FAILED
+
+#endif /* NM_OPENVPN_OLD */
+
+/*****************************************************************************/
+
+#if (NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB
+
+#ifdef NM_OPENVPN_OLD
+#include <nm-ui-utils.h>
+#else /* NM_OPENVPN_OLD */
+#include <nma-ui-utils.h>
+#endif /* NM_OPENVPN_OLD */
+
+#endif /* NM_NETWORKMANAGER_COMPILATION_LIB */
+
+/*****************************************************************************/
+
/**
* The boolean type _Bool is C99 while we mostly stick to C89. However, _Bool is too
* convinient to miss and is effectively available in gcc and clang. So, just use it.
diff --git a/src/nm-openvpn-service-openvpn-helper.c b/src/nm-openvpn-service-openvpn-helper.c
index 23088bb..a7052dd 100644
--- a/src/nm-openvpn-service-openvpn-helper.c
+++ b/src/nm-openvpn-service-openvpn-helper.c
@@ -23,7 +23,7 @@
* (C) Copyright 2005 Tim Niemueller
*
* $Id: nm-openvpn-service-openvpn-helper.c 4170 2008-10-11 14:44:45Z dcbw $
- *
+ *
*/
#include "config.h"
@@ -43,8 +43,6 @@
#include "nm-default.h"
-#include <NetworkManager.h>
-
#include "nm-openvpn-service.h"
#include "nm-utils.h"
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 2f9efbd..d506e61 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -45,9 +45,7 @@
#include "nm-default.h"
-#include <NetworkManager.h>
#include <nm-vpn-service-plugin.h>
-#include <nm-setting-vpn.h>
#include "nm-openvpn-service.h"
#include "nm-utils.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]