[network-manager-openvpn/danw/cleanup-bgo746693: 3/3] core: split out nm-openvpn-service-defines.h
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn/danw/cleanup-bgo746693: 3/3] core: split out nm-openvpn-service-defines.h
- Date: Tue, 24 Mar 2015 15:27:05 +0000 (UTC)
commit 7c249c5046b6c3cb6144bdfa4d02aa3af32f86dd
Author: Dan Winship <danw redhat com>
Date: Tue Nov 25 19:43:06 2014 -0500
core: split out nm-openvpn-service-defines.h
Split nm-openvpn-service-defines.h out of nm-openvpn-service.h, so
that the -defines.h file has no dependency on either libnm or
libnm-glib.
properties/nm-openvpn.c | 2 +-
src/Makefile.am | 3 +-
src/nm-openvpn-service-defines.h | 92 ++++++++++++++++++++++++++++++++++++++
src/nm-openvpn-service.h | 68 +---------------------------
4 files changed, 97 insertions(+), 68 deletions(-)
---
diff --git a/properties/nm-openvpn.c b/properties/nm-openvpn.c
index 3116aac..deb6df1 100644
--- a/properties/nm-openvpn.c
+++ b/properties/nm-openvpn.c
@@ -42,7 +42,7 @@
#include <nm-setting-connection.h>
#include <nm-setting-ip4-config.h>
-#include "nm-openvpn-service.h"
+#include "nm-openvpn-service-defines.h"
#include "nm-openvpn.h"
#include "auth-helpers.h"
#include "import-export.h"
diff --git a/src/Makefile.am b/src/Makefile.am
index 2dfeb05..b5ef6cf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -17,7 +17,8 @@ libexec_PROGRAMS = nm-openvpn-service nm-openvpn-service-openvpn-helper
nm_openvpn_service_SOURCES = \
nm-openvpn-service.c \
- nm-openvpn-service.h
+ nm-openvpn-service.h \
+ nm-openvpn-service-defines.h
nm_openvpn_service_LDADD = \
$(NM_LIBS) \
diff --git a/src/nm-openvpn-service-defines.h b/src/nm-openvpn-service-defines.h
new file mode 100644
index 0000000..8abdaf5
--- /dev/null
+++ b/src/nm-openvpn-service-defines.h
@@ -0,0 +1,92 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* nm-openvpn-service - openvpn integration with NetworkManager
+ *
+ * Copyright (C) 2005 - 2008 Tim Niemueller <tim niemueller de>
+ * Copyright (C) 2005 - 2008 Dan Williams <dcbw redhat com>
+ *
+ * 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.
+ *
+ */
+
+#ifndef NM_OPENVPN_SERVICE_DEFINES_H
+#define NM_OPENVPN_SERVICE_DEFINES_H
+
+#define NM_DBUS_SERVICE_OPENVPN "org.freedesktop.NetworkManager.openvpn"
+#define NM_DBUS_INTERFACE_OPENVPN "org.freedesktop.NetworkManager.openvpn"
+#define NM_DBUS_PATH_OPENVPN "/org/freedesktop/NetworkManager/openvpn"
+
+#define NM_OPENVPN_KEY_AUTH "auth"
+#define NM_OPENVPN_KEY_CA "ca"
+#define NM_OPENVPN_KEY_CERT "cert"
+#define NM_OPENVPN_KEY_CIPHER "cipher"
+#define NM_OPENVPN_KEY_KEYSIZE "keysize"
+#define NM_OPENVPN_KEY_COMP_LZO "comp-lzo"
+#define NM_OPENVPN_KEY_CONNECTION_TYPE "connection-type"
+#define NM_OPENVPN_KEY_FRAGMENT_SIZE "fragment-size"
+#define NM_OPENVPN_KEY_KEY "key"
+#define NM_OPENVPN_KEY_LOCAL_IP "local-ip" /* ??? */
+#define NM_OPENVPN_KEY_MSSFIX "mssfix"
+#define NM_OPENVPN_KEY_PORT "port"
+#define NM_OPENVPN_KEY_PROTO_TCP "proto-tcp"
+#define NM_OPENVPN_KEY_PROXY_TYPE "proxy-type"
+#define NM_OPENVPN_KEY_PROXY_SERVER "proxy-server"
+#define NM_OPENVPN_KEY_PROXY_PORT "proxy-port"
+#define NM_OPENVPN_KEY_PROXY_RETRY "proxy-retry"
+#define NM_OPENVPN_KEY_HTTP_PROXY_USERNAME "http-proxy-username"
+#define NM_OPENVPN_KEY_REMOTE "remote"
+#define NM_OPENVPN_KEY_REMOTE_RANDOM "remote-random"
+#define NM_OPENVPN_KEY_REMOTE_IP "remote-ip"
+#define NM_OPENVPN_KEY_STATIC_KEY "static-key"
+#define NM_OPENVPN_KEY_STATIC_KEY_DIRECTION "static-key-direction"
+#define NM_OPENVPN_KEY_TA "ta"
+#define NM_OPENVPN_KEY_TA_DIR "ta-dir"
+#define NM_OPENVPN_KEY_TUNNEL_MTU "tunnel-mtu"
+#define NM_OPENVPN_KEY_USERNAME "username"
+#define NM_OPENVPN_KEY_TAP_DEV "tap-dev"
+#define NM_OPENVPN_KEY_DEV "dev"
+#define NM_OPENVPN_KEY_DEV_TYPE "dev-type"
+#define NM_OPENVPN_KEY_TLS_REMOTE "tls-remote"
+#define NM_OPENVPN_KEY_REMOTE_CERT_TLS "remote-cert-tls"
+
+#define NM_OPENVPN_KEY_PASSWORD "password"
+#define NM_OPENVPN_KEY_CERTPASS "cert-pass"
+#define NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD "http-proxy-password"
+/* Internal auth-dialog -> service token indicating that no secrets are
+ * required for the connection.
+ */
+#define NM_OPENVPN_KEY_NOSECRET "no-secret"
+
+#define NM_OPENVPN_KEY_RENEG_SECONDS "reneg-seconds"
+
+#define NM_OPENVPN_AUTH_NONE "none"
+#define NM_OPENVPN_AUTH_RSA_MD4 "RSA-MD4"
+#define NM_OPENVPN_AUTH_MD5 "MD5"
+#define NM_OPENVPN_AUTH_SHA1 "SHA1"
+#define NM_OPENVPN_AUTH_SHA224 "SHA224"
+#define NM_OPENVPN_AUTH_SHA256 "SHA256"
+#define NM_OPENVPN_AUTH_SHA384 "SHA384"
+#define NM_OPENVPN_AUTH_SHA512 "SHA512"
+#define NM_OPENVPN_AUTH_RIPEMD160 "RIPEMD160"
+
+#define NM_OPENVPN_CONTYPE_TLS "tls"
+#define NM_OPENVPN_CONTYPE_STATIC_KEY "static-key"
+#define NM_OPENVPN_CONTYPE_PASSWORD "password"
+#define NM_OPENVPN_CONTYPE_PASSWORD_TLS "password-tls"
+
+/* arguments of "--remote-cert-tls" */
+#define NM_OPENVPN_REM_CERT_TLS_CLIENT "client"
+#define NM_OPENVPN_REM_CERT_TLS_SERVER "server"
+
+#endif /* NM_OPENVPN_SERVICE_DEFINES_H */
diff --git a/src/nm-openvpn-service.h b/src/nm-openvpn-service.h
index 5493cf5..d4b5710 100644
--- a/src/nm-openvpn-service.h
+++ b/src/nm-openvpn-service.h
@@ -27,6 +27,8 @@
#include <glib-object.h>
#include <nm-vpn-plugin.h>
+#include "nm-openvpn-service-defines.h"
+
#define NM_TYPE_OPENVPN_PLUGIN (nm_openvpn_plugin_get_type ())
#define NM_OPENVPN_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_OPENVPN_PLUGIN,
NMOpenvpnPlugin))
#define NM_OPENVPN_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_OPENVPN_PLUGIN,
NMOpenvpnPluginClass))
@@ -34,72 +36,6 @@
#define NM_IS_OPENVPN_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_OPENVPN_PLUGIN))
#define NM_OPENVPN_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_OPENVPN_PLUGIN,
NMOpenvpnPluginClass))
-#define NM_DBUS_SERVICE_OPENVPN "org.freedesktop.NetworkManager.openvpn"
-#define NM_DBUS_INTERFACE_OPENVPN "org.freedesktop.NetworkManager.openvpn"
-#define NM_DBUS_PATH_OPENVPN "/org/freedesktop/NetworkManager/openvpn"
-
-#define NM_OPENVPN_KEY_AUTH "auth"
-#define NM_OPENVPN_KEY_CA "ca"
-#define NM_OPENVPN_KEY_CERT "cert"
-#define NM_OPENVPN_KEY_CIPHER "cipher"
-#define NM_OPENVPN_KEY_KEYSIZE "keysize"
-#define NM_OPENVPN_KEY_COMP_LZO "comp-lzo"
-#define NM_OPENVPN_KEY_CONNECTION_TYPE "connection-type"
-#define NM_OPENVPN_KEY_FRAGMENT_SIZE "fragment-size"
-#define NM_OPENVPN_KEY_KEY "key"
-#define NM_OPENVPN_KEY_LOCAL_IP "local-ip" /* ??? */
-#define NM_OPENVPN_KEY_MSSFIX "mssfix"
-#define NM_OPENVPN_KEY_PORT "port"
-#define NM_OPENVPN_KEY_PROTO_TCP "proto-tcp"
-#define NM_OPENVPN_KEY_PROXY_TYPE "proxy-type"
-#define NM_OPENVPN_KEY_PROXY_SERVER "proxy-server"
-#define NM_OPENVPN_KEY_PROXY_PORT "proxy-port"
-#define NM_OPENVPN_KEY_PROXY_RETRY "proxy-retry"
-#define NM_OPENVPN_KEY_HTTP_PROXY_USERNAME "http-proxy-username"
-#define NM_OPENVPN_KEY_REMOTE "remote"
-#define NM_OPENVPN_KEY_REMOTE_RANDOM "remote-random"
-#define NM_OPENVPN_KEY_REMOTE_IP "remote-ip"
-#define NM_OPENVPN_KEY_STATIC_KEY "static-key"
-#define NM_OPENVPN_KEY_STATIC_KEY_DIRECTION "static-key-direction"
-#define NM_OPENVPN_KEY_TA "ta"
-#define NM_OPENVPN_KEY_TA_DIR "ta-dir"
-#define NM_OPENVPN_KEY_TUNNEL_MTU "tunnel-mtu"
-#define NM_OPENVPN_KEY_USERNAME "username"
-#define NM_OPENVPN_KEY_TAP_DEV "tap-dev"
-#define NM_OPENVPN_KEY_DEV "dev"
-#define NM_OPENVPN_KEY_DEV_TYPE "dev-type"
-#define NM_OPENVPN_KEY_TLS_REMOTE "tls-remote"
-#define NM_OPENVPN_KEY_REMOTE_CERT_TLS "remote-cert-tls"
-
-#define NM_OPENVPN_KEY_PASSWORD "password"
-#define NM_OPENVPN_KEY_CERTPASS "cert-pass"
-#define NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD "http-proxy-password"
-/* Internal auth-dialog -> service token indicating that no secrets are
- * required for the connection.
- */
-#define NM_OPENVPN_KEY_NOSECRET "no-secret"
-
-#define NM_OPENVPN_KEY_RENEG_SECONDS "reneg-seconds"
-
-#define NM_OPENVPN_AUTH_NONE "none"
-#define NM_OPENVPN_AUTH_RSA_MD4 "RSA-MD4"
-#define NM_OPENVPN_AUTH_MD5 "MD5"
-#define NM_OPENVPN_AUTH_SHA1 "SHA1"
-#define NM_OPENVPN_AUTH_SHA224 "SHA224"
-#define NM_OPENVPN_AUTH_SHA256 "SHA256"
-#define NM_OPENVPN_AUTH_SHA384 "SHA384"
-#define NM_OPENVPN_AUTH_SHA512 "SHA512"
-#define NM_OPENVPN_AUTH_RIPEMD160 "RIPEMD160"
-
-#define NM_OPENVPN_CONTYPE_TLS "tls"
-#define NM_OPENVPN_CONTYPE_STATIC_KEY "static-key"
-#define NM_OPENVPN_CONTYPE_PASSWORD "password"
-#define NM_OPENVPN_CONTYPE_PASSWORD_TLS "password-tls"
-
-/* arguments of "--remote-cert-tls" */
-#define NM_OPENVPN_REM_CERT_TLS_CLIENT "client"
-#define NM_OPENVPN_REM_CERT_TLS_SERVER "server"
-
typedef struct {
NMVPNPlugin parent;
} NMOpenvpnPlugin;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]