[network-manager-openconnect/th/vpn-editor-split-bgo767690: 7/14] shared: use "nm-default.h" header
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openconnect/th/vpn-editor-split-bgo767690: 7/14] shared: use "nm-default.h" header
- Date: Wed, 15 Jun 2016 13:23:02 +0000 (UTC)
commit bcd72d0e2ba0c3558df58ebded520c56749f916e
Author: Thomas Haller <thaller redhat com>
Date: Tue Jun 14 22:44:11 2016 +0200
shared: use "nm-default.h" header
auth-dialog/main.c | 10 +------
properties/Makefile.am | 1 -
properties/auth-helpers.c | 10 ++-----
properties/auth-helpers.h | 9 ------
properties/nm-openconnect.c | 32 ++--------------------
properties/nm-openconnect.h | 4 +--
src/nm-openconnect-service-openconnect-helper.c | 7 +---
src/nm-openconnect-service.c | 10 ++-----
src/nm-openconnect-service.h | 6 ----
9 files changed, 13 insertions(+), 76 deletions(-)
---
diff --git a/auth-dialog/main.c b/auth-dialog/main.c
index 43f8d88..fc632ce 100644
--- a/auth-dialog/main.c
+++ b/auth-dialog/main.c
@@ -23,9 +23,7 @@
* Boston, MA 02110-1301 USA
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "nm-default.h"
#include <string.h>
#include <errno.h>
@@ -37,17 +35,11 @@
#include <libxml/tree.h>
#include <gtk/gtk.h>
-#include <glib/gi18n.h>
#include <glib-unix.h>
-#include <NetworkManager.h>
-#include <nm-vpn-service-plugin.h>
-
#define SECRET_API_SUBJECT_TO_CHANGE
#include <libsecret/secret.h>
-#include "nm-service-defines.h"
-
#include "openconnect.h"
#if !OPENCONNECT_CHECK_VER(2,1)
diff --git a/properties/Makefile.am b/properties/Makefile.am
index 67e0423..a7b2d8e 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -19,7 +19,6 @@ common_CFLAGS = \
$(GTK_CFLAGS) \
$(OPENCONNECT_CFLAGS) \
-I$(top_srcdir)/shared \
- -I$(top_srcdir)/src \
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DUIDIR=\""$(uidir)"\" \
-DLOCALEDIR=\"$(datadir)/locale\"
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index 5fa3384..e60d16f 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -21,9 +21,9 @@
*
**************************************************************************/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "nm-default.h"
+
+#include "auth-helpers.h"
#include <string.h>
#include <sys/types.h>
@@ -33,11 +33,7 @@
#include <unistd.h>
#include <errno.h>
-#include <glib/gi18n-lib.h>
-
-#include "auth-helpers.h"
#include "nm-openconnect.h"
-#include "nm-service-defines.h"
void
tls_pw_init_auth_widget (GtkBuilder *builder,
diff --git a/properties/auth-helpers.h b/properties/auth-helpers.h
index 4f754ed..1175c9b 100644
--- a/properties/auth-helpers.h
+++ b/properties/auth-helpers.h
@@ -23,17 +23,8 @@
#ifndef _AUTH_HELPERS_H_
#define _AUTH_HELPERS_H_
-#include <glib.h>
#include <gtk/gtk.h>
-#ifdef NM_VPN_OLD
-#define NM_VPN_LIBNM_COMPAT
-#include <nm-connection.h>
-#include <nm-setting-vpn.h>
-#else /* !NM_VPN_OLD */
-#include <NetworkManager.h>
-#endif
-
typedef void (*ChangedCallback) (GtkWidget *widget, gpointer user_data);
void tls_pw_init_auth_widget (GtkBuilder *builder,
diff --git a/properties/nm-openconnect.c b/properties/nm-openconnect.c
index 15f550b..7551785 100644
--- a/properties/nm-openconnect.c
+++ b/properties/nm-openconnect.c
@@ -24,15 +24,14 @@
*
**************************************************************************/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "nm-default.h"
+
+#include "nm-openconnect.h"
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
#include <stdlib.h>
-#include <glib/gi18n-lib.h>
#include <string.h>
#include <gtk/gtk.h>
@@ -49,31 +48,6 @@
#define openconnect_has_oath_support() 0
#endif
-#ifdef NM_VPN_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 nm_simple_connection_new nm_connection_new
-
-#define NMV_EDITOR_PLUGIN_ERROR NM_SETTING_VPN_ERROR
-#define NMV_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY NM_SETTING_VPN_ERROR_INVALID_PROPERTY
-
-#define NMV_EDITOR_PLUGIN_ERROR NM_SETTING_VPN_ERROR
-#define NMV_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY NM_SETTING_VPN_ERROR_INVALID_PROPERTY
-
-#else /* !NM_VPN_OLD */
-
-#include <NetworkManager.h>
-
-#define NMV_EDITOR_PLUGIN_ERROR NM_CONNECTION_ERROR
-#define NMV_EDITOR_PLUGIN_ERROR_INVALID_PROPERTY NM_CONNECTION_ERROR_INVALID_PROPERTY
-#endif
-
-#include "nm-service-defines.h"
-#include "nm-openconnect.h"
#include "auth-helpers.h"
#ifndef NM_VPN_OLD
diff --git a/properties/nm-openconnect.h b/properties/nm-openconnect.h
index f8c2b9d..a392b73 100644
--- a/properties/nm-openconnect.h
+++ b/properties/nm-openconnect.h
@@ -23,8 +23,6 @@
#ifndef _NM_OPENCONNECT_H_
#define _NM_OPENCONNECT_H_
-#include <glib-object.h>
-
#define OPENCONNECT_TYPE_EDITOR_PLUGIN (openconnect_editor_plugin_get_type ())
#define OPENCONNECT_EDITOR_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
OPENCONNECT_TYPE_EDITOR_PLUGIN, OpenconnectEditorPlugin))
#define OPENCONNECT_EDITOR_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
OPENCONNECT_TYPE_EDITOR_PLUGIN, OpenconnectEditorPluginClass))
@@ -66,5 +64,5 @@ struct _OpenconnectEditorClass {
GType openconnect_editor_get_type (void);
-#endif /* _NM_OPENCONNECT_H_ */
+#endif /* _NM_OPENCONNECT_H_ */
diff --git a/src/nm-openconnect-service-openconnect-helper.c b/src/nm-openconnect-service-openconnect-helper.c
index 11da4f3..f4ef10c 100644
--- a/src/nm-openconnect-service-openconnect-helper.c
+++ b/src/nm-openconnect-service-openconnect-helper.c
@@ -22,7 +22,8 @@
* Copyright © 2007 - 2008 Novell, Inc.
*/
-#include <glib.h>
+#include "nm-default.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -30,10 +31,6 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
-#include <NetworkManager.h>
-
-#include "nm-openconnect-service.h"
-#include "nm-utils.h"
static void
helper_failed (GDBusProxy *proxy, const char *reason)
diff --git a/src/nm-openconnect-service.c b/src/nm-openconnect-service.c
index 4fccba2..f3e0f05 100644
--- a/src/nm-openconnect-service.c
+++ b/src/nm-openconnect-service.c
@@ -22,9 +22,9 @@
* Copyright © 2007 - 2008 Novell, Inc.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "nm-default.h"
+
+#include "nm-openconnect-service.h"
#include <stdio.h>
#include <string.h>
@@ -41,10 +41,6 @@
#include <pwd.h>
#include <grp.h>
#include <locale.h>
-#include <glib/gi18n.h>
-
-#include "nm-openconnect-service.h"
-#include "nm-utils.h"
#if !defined(DIST_VERSION)
# define DIST_VERSION VERSION
diff --git a/src/nm-openconnect-service.h b/src/nm-openconnect-service.h
index a674843..14bab5c 100644
--- a/src/nm-openconnect-service.h
+++ b/src/nm-openconnect-service.h
@@ -25,12 +25,6 @@
#ifndef NM_OPENCONNECT_PLUGIN_H
#define NM_OPENCONNECT_PLUGIN_H
-#include <glib.h>
-#include <NetworkManager.h>
-#include <nm-vpn-service-plugin.h>
-
-#include "nm-service-defines.h"
-
#define NM_TYPE_OPENCONNECT_PLUGIN (nm_openconnect_plugin_get_type ())
#define NM_OPENCONNECT_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
NM_TYPE_OPENCONNECT_PLUGIN, NMOpenconnectPlugin))
#define NM_OPENCONNECT_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_OPENCONNECT_PLUGIN,
NMOpenconnectPluginClass))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]