[network-manager-pptp/danw/cleanup-bgo746693: 3/3] core: split out nm-pptp-service-defines.h
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-pptp/danw/cleanup-bgo746693: 3/3] core: split out nm-pptp-service-defines.h
- Date: Tue, 24 Mar 2015 15:27:10 +0000 (UTC)
commit 73d747ac1eee43eee14d824a704c5e4791fb99fb
Author: Dan Winship <danw redhat com>
Date: Tue Mar 24 11:06:36 2015 -0400
core: split out nm-pptp-service-defines.h
Split nm-pptp-service-defines.h out of nm-pptp-service.h, so that the
-defines.h file has no dependency on either libnm or libnm-glib.
properties/Makefile.am | 1 +
properties/nm-pptp.c | 2 +-
src/Makefile.am | 5 ++-
src/nm-pptp-service-defines.h | 55 +++++++++++++++++++++++++++++++++++++++++
src/nm-pptp-service.h | 33 +-----------------------
5 files changed, 62 insertions(+), 34 deletions(-)
---
diff --git a/properties/Makefile.am b/properties/Makefile.am
index b2f3672..8d8c79b 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -18,6 +18,7 @@ libnm_pptp_properties_la_CFLAGS = \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
$(NM_CFLAGS) \
+ -I$(top_srcdir)/src \
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DUIDIR=\""$(uidir)"\" \
-DLOCALEDIR=\""$(datadir)/locale"\" \
diff --git a/properties/nm-pptp.c b/properties/nm-pptp.c
index 580c3a4..4953559 100644
--- a/properties/nm-pptp.c
+++ b/properties/nm-pptp.c
@@ -39,7 +39,7 @@
#include <nm-setting-connection.h>
#include <nm-setting-ip4-config.h>
-#include "src/nm-pptp-service.h"
+#include "nm-pptp-service-defines.h"
#include "nm-pptp.h"
#include "import-export.h"
#include "advanced-dialog.h"
diff --git a/src/Makefile.am b/src/Makefile.am
index 9eefa31..d37d065 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -19,8 +19,9 @@ AM_CPPFLAGS = \
libexec_PROGRAMS = nm-pptp-service
nm_pptp_service_SOURCES = \
- nm-pptp-service.c \
- nm-pptp-service.h
+ nm-pptp-service-defines.h \
+ nm-pptp-service.c \
+ nm-pptp-service.h
nm-pptp-pppd-service-glue.h: $(top_srcdir)/src/nm-pptp-pppd-service.xml
dbus-binding-tool --prefix=nm_pptp_pppd_service --mode=glib-server --output=$@ $<
diff --git a/src/nm-pptp-service-defines.h b/src/nm-pptp-service-defines.h
new file mode 100644
index 0000000..2c14935
--- /dev/null
+++ b/src/nm-pptp-service-defines.h
@@ -0,0 +1,55 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* nm-pptp-service - PPTP VPN integration with NetworkManager
+ *
+ * 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.
+ *
+ * Copyright 2008, 2014 Red Hat, Inc.
+ */
+
+#ifndef NM_PPTP_SERVICE_DEFINES_H
+#define NM_PPTP_SERVICE_DEFINES_H
+
+#define NM_DBUS_SERVICE_PPTP_PPP "org.freedesktop.NetworkManager.pptp-ppp"
+#define NM_DBUS_PATH_PPTP_PPP "/org/freedesktop/NetworkManager/pptp/ppp"
+#define NM_DBUS_INTERFACE_PPTP_PPP "org.freedesktop.NetworkManager.pptp.ppp"
+
+/* For the NM <-> VPN plugin service */
+#define NM_DBUS_SERVICE_PPTP "org.freedesktop.NetworkManager.pptp"
+#define NM_DBUS_INTERFACE_PPTP "org.freedesktop.NetworkManager.pptp"
+#define NM_DBUS_PATH_PPTP "/org/freedesktop/NetworkManager/pptp"
+
+#define NM_PPTP_KEY_GATEWAY "gateway"
+#define NM_PPTP_KEY_USER "user"
+#define NM_PPTP_KEY_PASSWORD "password"
+#define NM_PPTP_KEY_DOMAIN "domain"
+#define NM_PPTP_KEY_REFUSE_EAP "refuse-eap"
+#define NM_PPTP_KEY_REFUSE_PAP "refuse-pap"
+#define NM_PPTP_KEY_REFUSE_CHAP "refuse-chap"
+#define NM_PPTP_KEY_REFUSE_MSCHAP "refuse-mschap"
+#define NM_PPTP_KEY_REFUSE_MSCHAPV2 "refuse-mschapv2"
+#define NM_PPTP_KEY_REQUIRE_MPPE "require-mppe"
+#define NM_PPTP_KEY_REQUIRE_MPPE_40 "require-mppe-40"
+#define NM_PPTP_KEY_REQUIRE_MPPE_128 "require-mppe-128"
+#define NM_PPTP_KEY_MPPE_STATEFUL "mppe-stateful"
+#define NM_PPTP_KEY_NOBSDCOMP "nobsdcomp"
+#define NM_PPTP_KEY_NODEFLATE "nodeflate"
+#define NM_PPTP_KEY_NO_VJ_COMP "no-vj-comp"
+#define NM_PPTP_KEY_LCP_ECHO_FAILURE "lcp-echo-failure"
+#define NM_PPTP_KEY_LCP_ECHO_INTERVAL "lcp-echo-interval"
+#define NM_PPTP_KEY_UNIT_NUM "unit"
+
+#endif /* NM_PPTP_SERVICE_DEFINES_H */
diff --git a/src/nm-pptp-service.h b/src/nm-pptp-service.h
index ee8a575..135cf4e 100644
--- a/src/nm-pptp-service.h
+++ b/src/nm-pptp-service.h
@@ -27,6 +27,8 @@
#include <glib-object.h>
#include <nm-vpn-plugin.h>
+#include "nm-pptp-service-defines.h"
+
#define NM_TYPE_PPTP_PLUGIN (nm_pptp_plugin_get_type ())
#define NM_PPTP_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_PPTP_PLUGIN,
NMPptpPlugin))
#define NM_PPTP_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_PPTP_PLUGIN,
NMPptpPluginClass))
@@ -37,37 +39,6 @@
/* For the pppd plugin <-> VPN plugin service */
#define DBUS_TYPE_G_MAP_OF_VARIANT (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))
-#define NM_DBUS_SERVICE_PPTP_PPP "org.freedesktop.NetworkManager.pptp-ppp"
-#define NM_DBUS_PATH_PPTP_PPP "/org/freedesktop/NetworkManager/pptp/ppp"
-#define NM_DBUS_INTERFACE_PPTP_PPP "org.freedesktop.NetworkManager.pptp.ppp"
-
-
-/* For the NM <-> VPN plugin service */
-#define NM_DBUS_SERVICE_PPTP "org.freedesktop.NetworkManager.pptp"
-#define NM_DBUS_INTERFACE_PPTP "org.freedesktop.NetworkManager.pptp"
-#define NM_DBUS_PATH_PPTP "/org/freedesktop/NetworkManager/pptp"
-
-#define NM_PPTP_KEY_GATEWAY "gateway"
-#define NM_PPTP_KEY_USER "user"
-#define NM_PPTP_KEY_PASSWORD "password"
-#define NM_PPTP_KEY_DOMAIN "domain"
-#define NM_PPTP_KEY_REFUSE_EAP "refuse-eap"
-#define NM_PPTP_KEY_REFUSE_PAP "refuse-pap"
-#define NM_PPTP_KEY_REFUSE_CHAP "refuse-chap"
-#define NM_PPTP_KEY_REFUSE_MSCHAP "refuse-mschap"
-#define NM_PPTP_KEY_REFUSE_MSCHAPV2 "refuse-mschapv2"
-#define NM_PPTP_KEY_REQUIRE_MPPE "require-mppe"
-#define NM_PPTP_KEY_REQUIRE_MPPE_40 "require-mppe-40"
-#define NM_PPTP_KEY_REQUIRE_MPPE_128 "require-mppe-128"
-#define NM_PPTP_KEY_MPPE_STATEFUL "mppe-stateful"
-#define NM_PPTP_KEY_NOBSDCOMP "nobsdcomp"
-#define NM_PPTP_KEY_NODEFLATE "nodeflate"
-#define NM_PPTP_KEY_NO_VJ_COMP "no-vj-comp"
-#define NM_PPTP_KEY_LCP_ECHO_FAILURE "lcp-echo-failure"
-#define NM_PPTP_KEY_LCP_ECHO_INTERVAL "lcp-echo-interval"
-#define NM_PPTP_KEY_UNIT_NUM "unit"
-
-
typedef struct {
NMVPNPlugin parent;
} NMPptpPlugin;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]