[network-manager-openconnect/danw/cleanup-bgo746693: 4/4] core: split out nm-openconnect-service-defines.h
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openconnect/danw/cleanup-bgo746693: 4/4] core: split out nm-openconnect-service-defines.h
- Date: Tue, 24 Mar 2015 15:27:01 +0000 (UTC)
commit a80627696511da94518edda8319e4de0ac7f5e2c
Author: Dan Winship <danw redhat com>
Date: Tue Nov 25 19:33:52 2014 -0500
core: split out nm-openconnect-service-defines.h
Split nm-openconnect-service-defines.h out of
nm-openconnect-service.h, so that the -defines.h file has no
dependency on either libnm or libnm-glib.
properties/Makefile.am | 1 +
properties/nm-openconnect.c | 2 +-
src/Makefile.am | 4 +-
src/nm-openconnect-service-defines.h | 47 ++++++++++++++++++++++++++++++++++
src/nm-openconnect-service.h | 21 +-------------
5 files changed, 53 insertions(+), 22 deletions(-)
---
diff --git a/properties/Makefile.am b/properties/Makefile.am
index ee86fc7..885cb24 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -15,6 +15,7 @@ libnm_openconnect_properties_la_CFLAGS = \
$(GTK_CFLAGS) \
$(NM_CFLAGS) \
$(OPENCONNECT_CFLAGS) \
+ -I$(top_srcdir)/src \
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DUIDIR=\""$(uidir)"\" \
-DG_DISABLE_DEPRECATED \
diff --git a/properties/nm-openconnect.c b/properties/nm-openconnect.c
index 114dbe1..00f4ce0 100644
--- a/properties/nm-openconnect.c
+++ b/properties/nm-openconnect.c
@@ -54,7 +54,7 @@
#include <nm-setting-connection.h>
#include <nm-setting-ip4-config.h>
-#include "../src/nm-openconnect-service.h"
+#include "nm-openconnect-service-defines.h"
#include "nm-openconnect.h"
#include "auth-helpers.h"
diff --git a/src/Makefile.am b/src/Makefile.am
index b6c6ff7..2a222a0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -19,8 +19,8 @@ libexec_PROGRAMS = \
nm_openconnect_service_SOURCES = \
nm-openconnect-service.c \
- nm-openconnect-service.h
-
+ nm-openconnect-service.h \
+ nm-openconnect-service-defines.h
nm_openconnect_service_LDADD = \
$(DBUS_LIBS) \
diff --git a/src/nm-openconnect-service-defines.h b/src/nm-openconnect-service-defines.h
new file mode 100644
index 0000000..38ca43f
--- /dev/null
+++ b/src/nm-openconnect-service-defines.h
@@ -0,0 +1,47 @@
+/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Copyright © 2008 - 2009 Intel Corporation.
+ *
+ * Based on nm-openconnect-vpnc.h:
+ * Copyright © 2005 - 2008 Red Hat, Inc.
+ * Copyright © 2007 - 2008 Novell, Inc.
+ */
+
+#ifndef NM_OPENCONNECT_SERVICE_DEFINES_H
+#define NM_OPENCONNECT_SERVICE_DEFINES_H
+
+#define NM_DBUS_SERVICE_OPENCONNECT "org.freedesktop.NetworkManager.openconnect"
+#define NM_DBUS_INTERFACE_OPENCONNECT "org.freedesktop.NetworkManager.openconnect"
+#define NM_DBUS_PATH_OPENCONNECT "/org/freedesktop/NetworkManager/openconnect"
+
+#define NM_OPENCONNECT_KEY_GATEWAY "gateway"
+#define NM_OPENCONNECT_KEY_COOKIE "cookie"
+#define NM_OPENCONNECT_KEY_GWCERT "gwcert"
+#define NM_OPENCONNECT_KEY_AUTHTYPE "authtype"
+#define NM_OPENCONNECT_KEY_USERCERT "usercert"
+#define NM_OPENCONNECT_KEY_CACERT "cacert"
+#define NM_OPENCONNECT_KEY_PRIVKEY "userkey"
+#define NM_OPENCONNECT_KEY_MTU "mtu"
+#define NM_OPENCONNECT_KEY_PEM_PASSPHRASE_FSID "pem_passphrase_fsid"
+#define NM_OPENCONNECT_KEY_PROXY "proxy"
+#define NM_OPENCONNECT_KEY_CSD_ENABLE "enable_csd_trojan"
+#define NM_OPENCONNECT_KEY_CSD_WRAPPER "csd_wrapper"
+#define NM_OPENCONNECT_KEY_TOKEN_MODE "stoken_source"
+#define NM_OPENCONNECT_KEY_TOKEN_SECRET "stoken_string"
+
+#endif /* NM_OPENCONNECT_SERVICE_DEFINES_H */
diff --git a/src/nm-openconnect-service.h b/src/nm-openconnect-service.h
index ed4978c..13b3019 100644
--- a/src/nm-openconnect-service.h
+++ b/src/nm-openconnect-service.h
@@ -28,6 +28,8 @@
#include <glib.h>
#include <nm-vpn-plugin.h>
+#include "nm-openconnect-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))
@@ -35,25 +37,6 @@
#define NM_IS_OPENCONNECT_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_OPENCONNECT_PLUGIN))
#define NM_OPENCONNECT_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_OPENCONNECT_PLUGIN,
NMOpenconnectPluginClass))
-#define NM_DBUS_SERVICE_OPENCONNECT "org.freedesktop.NetworkManager.openconnect"
-#define NM_DBUS_INTERFACE_OPENCONNECT "org.freedesktop.NetworkManager.openconnect"
-#define NM_DBUS_PATH_OPENCONNECT "/org/freedesktop/NetworkManager/openconnect"
-
-#define NM_OPENCONNECT_KEY_GATEWAY "gateway"
-#define NM_OPENCONNECT_KEY_COOKIE "cookie"
-#define NM_OPENCONNECT_KEY_GWCERT "gwcert"
-#define NM_OPENCONNECT_KEY_AUTHTYPE "authtype"
-#define NM_OPENCONNECT_KEY_USERCERT "usercert"
-#define NM_OPENCONNECT_KEY_CACERT "cacert"
-#define NM_OPENCONNECT_KEY_PRIVKEY "userkey"
-#define NM_OPENCONNECT_KEY_MTU "mtu"
-#define NM_OPENCONNECT_KEY_PEM_PASSPHRASE_FSID "pem_passphrase_fsid"
-#define NM_OPENCONNECT_KEY_PROXY "proxy"
-#define NM_OPENCONNECT_KEY_CSD_ENABLE "enable_csd_trojan"
-#define NM_OPENCONNECT_KEY_CSD_WRAPPER "csd_wrapper"
-#define NM_OPENCONNECT_KEY_TOKEN_MODE "stoken_source"
-#define NM_OPENCONNECT_KEY_TOKEN_SECRET "stoken_string"
-
typedef struct {
NMVPNPlugin parent;
} NMOpenconnectPlugin;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]