[network-manager-vpnc/danw/cleanup-bgo746693: 3/3] core: split out nm-vpnc-service-defines.h
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-vpnc/danw/cleanup-bgo746693: 3/3] core: split out nm-vpnc-service-defines.h
- Date: Tue, 24 Mar 2015 15:27:14 +0000 (UTC)
commit 92b647477deab221a69814d3a96e02e8d628a158
Author: Dan Winship <danw redhat com>
Date: Tue Mar 24 11:12:10 2015 -0400
core: split out nm-vpnc-service-defines.h
Split nm-vpnc-service-defines.h out of nm-vpnc-service.h, so that the
-defines.h file has no dependency on either libnm or libnm-glib.
properties/Makefile.am | 1 +
properties/nm-vpnc.c | 2 +-
src/Makefile.am | 1 +
src/nm-vpnc-service-defines.h | 72 +++++++++++++++++++++++++++++++++++++++++
src/nm-vpnc-service.h | 49 +--------------------------
5 files changed, 77 insertions(+), 48 deletions(-)
---
diff --git a/properties/Makefile.am b/properties/Makefile.am
index c2f6128..506cae4 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -16,6 +16,7 @@ libnm_vpnc_properties_la_CPPFLAGS = \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
$(NM_CFLAGS) \
+ -I$(top_srcdir)/src \
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DUIDIR=\""$(uidir)"\" \
-DG_DISABLE_DEPRECATED \
diff --git a/properties/nm-vpnc.c b/properties/nm-vpnc.c
index 58f49ee..3da9f4d 100644
--- a/properties/nm-vpnc.c
+++ b/properties/nm-vpnc.c
@@ -44,7 +44,7 @@
#include <nm-setting-connection.h>
#include <nm-setting-ip4-config.h>
-#include "src/nm-vpnc-service.h"
+#include "nm-vpnc-service-defines.h"
#include "nm-vpnc-helper.h"
#include "nm-vpnc.h"
diff --git a/src/Makefile.am b/src/Makefile.am
index 88a0a7a..4e2976e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -18,6 +18,7 @@ libexec_PROGRAMS = nm-vpnc-service nm-vpnc-service-vpnc-helper
nm_vpnc_service_SOURCES = \
nm-vpnc-service.c \
nm-vpnc-service.h \
+ nm-vpnc-service-defines.h \
utils.c \
utils.h
diff --git a/src/nm-vpnc-service-defines.h b/src/nm-vpnc-service-defines.h
new file mode 100644
index 0000000..dc807df
--- /dev/null
+++ b/src/nm-vpnc-service-defines.h
@@ -0,0 +1,72 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* 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 2005 - 2015 Red Hat, Inc.
+ * Copyright 2007 - 2008 Novell, Inc.
+ */
+
+#ifndef NM_VPNC_SERVICE_DEFINES_H
+#define NM_VPNC_SERVICE_DEFINES_H
+
+#define NM_DBUS_SERVICE_VPNC "org.freedesktop.NetworkManager.vpnc"
+#define NM_DBUS_INTERFACE_VPNC "org.freedesktop.NetworkManager.vpnc"
+#define NM_DBUS_PATH_VPNC "/org/freedesktop/NetworkManager/vpnc"
+
+#define NM_VPNC_KEY_GATEWAY "IPSec gateway"
+#define NM_VPNC_KEY_ID "IPSec ID"
+#define NM_VPNC_KEY_SECRET "IPSec secret"
+#define NM_VPNC_KEY_SECRET_TYPE "ipsec-secret-type"
+#define NM_VPNC_KEY_XAUTH_USER "Xauth username"
+#define NM_VPNC_KEY_XAUTH_PASSWORD "Xauth password"
+#define NM_VPNC_KEY_XAUTH_PASSWORD_TYPE "xauth-password-type"
+#define NM_VPNC_KEY_DOMAIN "Domain"
+#define NM_VPNC_KEY_DHGROUP "IKE DH Group"
+#define NM_VPNC_KEY_PERFECT_FORWARD "Perfect Forward Secrecy"
+#define NM_VPNC_KEY_VENDOR "Vendor"
+#define NM_VPNC_KEY_APP_VERSION "Application Version"
+#define NM_VPNC_KEY_SINGLE_DES "Enable Single DES"
+#define NM_VPNC_KEY_NO_ENCRYPTION "Enable no encryption"
+#define NM_VPNC_KEY_NAT_TRAVERSAL_MODE "NAT Traversal Mode"
+#define NM_VPNC_KEY_DPD_IDLE_TIMEOUT "DPD idle timeout (our side)"
+#define NM_VPNC_KEY_CISCO_UDP_ENCAPS_PORT "Cisco UDP Encapsulation Port"
+#define NM_VPNC_KEY_LOCAL_PORT "Local Port"
+#define NM_VPNC_KEY_AUTHMODE "IKE Authmode"
+#define NM_VPNC_KEY_CA_FILE "CA-File"
+
+#define NM_VPNC_NATT_MODE_NATT "natt"
+#define NM_VPNC_NATT_MODE_NONE "none"
+#define NM_VPNC_NATT_MODE_NATT_ALWAYS "force-natt"
+#define NM_VPNC_NATT_MODE_CISCO "cisco-udp"
+
+#define NM_VPNC_PW_TYPE_SAVE "save"
+#define NM_VPNC_PW_TYPE_ASK "ask"
+#define NM_VPNC_PW_TYPE_UNUSED "unused"
+
+#define NM_VPNC_DHGROUP_DH1 "dh1"
+#define NM_VPNC_DHGROUP_DH2 "dh2"
+#define NM_VPNC_DHGROUP_DH5 "dh5"
+
+#define NM_VPNC_PFS_SERVER "server"
+#define NM_VPNC_PFS_NOPFS "nopfs"
+#define NM_VPNC_PFS_DH1 "dh1"
+#define NM_VPNC_PFS_DH2 "dh2"
+#define NM_VPNC_PFS_DH5 "dh5"
+
+#define NM_VPNC_VENDOR_CISCO "cisco"
+#define NM_VPNC_VENDOR_NETSCREEN "netscreen"
+
+#endif /* NM_VPNC_SERVICE_DEFINES_H */
diff --git a/src/nm-vpnc-service.h b/src/nm-vpnc-service.h
index 579a7d0..f7ae9be 100644
--- a/src/nm-vpnc-service.h
+++ b/src/nm-vpnc-service.h
@@ -26,6 +26,8 @@
#include <glib-object.h>
#include <nm-vpn-plugin.h>
+#include "nm-vpnc-service-defines.h"
+
#define NM_TYPE_VPNC_PLUGIN (nm_vpnc_plugin_get_type ())
#define NM_VPNC_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_VPNC_PLUGIN,
NMVPNCPlugin))
#define NM_VPNC_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_VPNC_PLUGIN,
NMVPNCPluginClass))
@@ -33,53 +35,6 @@
#define NM_IS_VPNC_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_VPNC_PLUGIN))
#define NM_VPNC_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_VPNC_PLUGIN,
NMVPNCPluginClass))
-#define NM_DBUS_SERVICE_VPNC "org.freedesktop.NetworkManager.vpnc"
-#define NM_DBUS_INTERFACE_VPNC "org.freedesktop.NetworkManager.vpnc"
-#define NM_DBUS_PATH_VPNC "/org/freedesktop/NetworkManager/vpnc"
-
-#define NM_VPNC_KEY_GATEWAY "IPSec gateway"
-#define NM_VPNC_KEY_ID "IPSec ID"
-#define NM_VPNC_KEY_SECRET "IPSec secret"
-#define NM_VPNC_KEY_SECRET_TYPE "ipsec-secret-type"
-#define NM_VPNC_KEY_XAUTH_USER "Xauth username"
-#define NM_VPNC_KEY_XAUTH_PASSWORD "Xauth password"
-#define NM_VPNC_KEY_XAUTH_PASSWORD_TYPE "xauth-password-type"
-#define NM_VPNC_KEY_DOMAIN "Domain"
-#define NM_VPNC_KEY_DHGROUP "IKE DH Group"
-#define NM_VPNC_KEY_PERFECT_FORWARD "Perfect Forward Secrecy"
-#define NM_VPNC_KEY_VENDOR "Vendor"
-#define NM_VPNC_KEY_APP_VERSION "Application Version"
-#define NM_VPNC_KEY_SINGLE_DES "Enable Single DES"
-#define NM_VPNC_KEY_NO_ENCRYPTION "Enable no encryption"
-#define NM_VPNC_KEY_NAT_TRAVERSAL_MODE "NAT Traversal Mode"
-#define NM_VPNC_KEY_DPD_IDLE_TIMEOUT "DPD idle timeout (our side)"
-#define NM_VPNC_KEY_CISCO_UDP_ENCAPS_PORT "Cisco UDP Encapsulation Port"
-#define NM_VPNC_KEY_LOCAL_PORT "Local Port"
-#define NM_VPNC_KEY_AUTHMODE "IKE Authmode"
-#define NM_VPNC_KEY_CA_FILE "CA-File"
-
-#define NM_VPNC_NATT_MODE_NATT "natt"
-#define NM_VPNC_NATT_MODE_NONE "none"
-#define NM_VPNC_NATT_MODE_NATT_ALWAYS "force-natt"
-#define NM_VPNC_NATT_MODE_CISCO "cisco-udp"
-
-#define NM_VPNC_PW_TYPE_SAVE "save"
-#define NM_VPNC_PW_TYPE_ASK "ask"
-#define NM_VPNC_PW_TYPE_UNUSED "unused"
-
-#define NM_VPNC_DHGROUP_DH1 "dh1"
-#define NM_VPNC_DHGROUP_DH2 "dh2"
-#define NM_VPNC_DHGROUP_DH5 "dh5"
-
-#define NM_VPNC_PFS_SERVER "server"
-#define NM_VPNC_PFS_NOPFS "nopfs"
-#define NM_VPNC_PFS_DH1 "dh1"
-#define NM_VPNC_PFS_DH2 "dh2"
-#define NM_VPNC_PFS_DH5 "dh5"
-
-#define NM_VPNC_VENDOR_CISCO "cisco"
-#define NM_VPNC_VENDOR_NETSCREEN "netscreen"
-
typedef struct {
NMVPNPlugin parent;
} NMVPNCPlugin;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]