[network-manager-vpnc/danw/wip/libnm: 2/2] properties: Implement get_property_xml in new plugin
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-vpnc/danw/wip/libnm: 2/2] properties: Implement get_property_xml in new plugin
- Date: Thu, 21 May 2015 16:41:10 +0000 (UTC)
commit b0002d9d3867b9e8ea7a2f4bfea5f86f1d9bfd55
Author: Dan Winship <danw gnome org>
Date: Tue Nov 11 09:57:57 2014 -0500
properties: Implement get_property_xml in new plugin
.gitignore | 1 +
po/POTFILES.in | 1 +
properties/Makefile.am | 10 +++-
properties/nm-vpnc-properties.xml | 110 +++++++++++++++++++++++++++++++++++++
properties/nm-vpnc.c | 13 ++++
5 files changed, 133 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index ab35b26..af60f5e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,6 +33,7 @@ auth-dialog/nm-vpnc-auth-dialog.desktop
auth-dialog/nm-vpnc-auth-dialog.desktop.in
nm-vpnc-service.name
nm-vpnc.desktop
+properties/nm-vpnc-properties.h
properties/tests/test-import-export
src/nm-vpnc-service
src/nm-vpnc-service-vpnc-helper
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c88e300..6a1ed0f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -4,4 +4,5 @@ auth-dialog/main.c
auth-dialog/nm-vpnc-auth-dialog.desktop.in.in
properties/nm-vpnc.c
[type: gettext/glade]properties/nm-vpnc-dialog.ui
+properties/properties.xml
src/nm-vpnc-service.c
diff --git a/properties/Makefile.am b/properties/Makefile.am
index e68b9ef..f7e3064 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -7,7 +7,8 @@ libnm_vpnc_properties_new_la_SOURCES = \
nm-vpnc.c \
nm-vpnc.h \
nm-vpnc-helper.c \
- nm-vpnc-helper.h
+ nm-vpnc-helper.h \
+ nm-vpnc-properties.h
libnm_vpnc_properties_old_la_SOURCES = \
nm-vpnc.c \
@@ -36,6 +37,11 @@ libnm_vpnc_properties_new_la_LIBADD = \
libnm_vpnc_properties_new_la_LDFLAGS = \
-avoid-version
+nm-vpnc-properties.h: nm-vpnc-properties.xml
+ $(AM_V_GEN) (echo "/* Auto-generated. Do not edit. */"; echo ""; echo "#define NM_VPNC_PROPERTIES_XML
\\"; sed -e 's/ _label=/ label=/;' -e 's/"/\\"/g' -e 's/\(.*\)/"\1" \\/' $^; echo '""') > $@
+
+BUILT_SOURCES = nm-vpnc-properties.h
+
libnm_vpnc_properties_old_la_CPPFLAGS = \
-DNM_VPNC_OLD \
$(GLIB_CFLAGS) \
@@ -56,4 +62,4 @@ libnm_vpnc_properties_old_la_LDFLAGS = \
CLEANFILES = *.bak *~
-EXTRA_DIST = $(ui_DATA)
+EXTRA_DIST = $(ui_DATA) nm-vpnc-properties.xml
diff --git a/properties/nm-vpnc-properties.xml b/properties/nm-vpnc-properties.xml
new file mode 100644
index 0000000..42afe37
--- /dev/null
+++ b/properties/nm-vpnc-properties.xml
@@ -0,0 +1,110 @@
+<nm-vpn-properties gettext-domain="NetworkManager-vpnc">
+ <section _label="General">
+ <widget _label="Gateway" type="host">
+ <property name="IPSec gateway"/>
+ </widget>
+ <widget type="separator"/>
+ <widget _label="User name" type="string">
+ <property name="Xauth username"/>
+ </widget>
+ <widget _label="User password" type="password">
+ <property name="Xauth password"/>
+ </widget>
+ <widget _label="Group name" type="string">
+ <property name="IPSec ID"/>
+ </widget>
+ <widget _label="Group password" type="password">
+ <property name="IPSec secret"/>
+ </widget>
+ <widget type="separator"/>
+ <widget _label="Use hybrid authentication" type="checkbox">
+ <property name="IKE Authmode"
+ true-value="hybrid"
+ false-value="psk"/>
+ </widget>
+ <widget _label="CA file" type="certificate-file">
+ <sensitive if="IKE Authmode" value="hybrid"/>
+ <property name="CA-File"/>
+ </widget>
+ </section>
+ <section _label="Identification" advanced="1">
+ <widget _label="Domain" type="string">
+ <property name="Domain"/>
+ </widget>
+ <widget _label="Vendor" type="menu">
+ <item _label="Cisco" default="1">
+ <property name="Vendor" value="cisco"/>
+ </item>
+ <item _label="Netscreen">
+ <property name="Vendor" value="netscreen"/>
+ </item>
+ </widget>
+ <widget _label="Version" type="string">
+ <property name="Version"/>
+ </widget>
+ </section>
+ <section _label="Transport and Security" advanced="1">
+ <!-- FIXME
+ <widget _label="Tunnel interface name" type="string">
+ <property name="Interface name"/>
+ </widget>
+ -->
+ <widget _label="Encryption method" type="menu">
+ <item _label="Secure" default="1" />
+ <item _label="Weak (use with caution)">
+ <property name="Enable Single DES" value=""/>
+ </item>
+ <item _label="None (completely insecure)">
+ <property name="Enable no encryption" value=""/>
+ </item>
+ </widget>
+ <widget _label="NAT traversal" type="menu">
+ <item _label="NAT-T when available" default="1">
+ <property name="NAT Traversal Mode" value="natt"/>
+ </item>
+ <item _label="NAT-T always">
+ <property name="NAT Traversal Mode" value="force-natt"/>
+ </item>
+ <item _label="Cisco UDP">
+ <property name="NAT Traversal Mode" value="cisco-udp"/>
+ </item>
+ <item _label="Disabled">
+ <property name="NAT Traversal Mode" value="none"/>
+ </item>
+ </widget>
+ <widget _label="IKE DH group" type="menu">
+ <item _label="DH Group 1">
+ <property name="IKE DH Group" value="dh1"/>
+ </item>
+ <item _label="DH Group 2" default="1">
+ <property name="IKE DH Group" value="dh2"/>
+ </item>
+ <item _label="DH Group 5">
+ <property name="IKE DH Group" value="dh5"/>
+ </item>
+ </widget>
+ <widget _label="PFS" type="menu">
+ <item _label="Server" default="1">
+ <property name="Perfect Forward Secrecy" value="server"/>
+ </item>
+ <item _label="None">
+ <property name="Perfect Forward Secrecy" value="nopfs"/>
+ </item>
+ <item _label="DH Group 1">
+ <property name="Perfect Forward Secrecy" value="dh1"/>
+ </item>
+ <item _label="DH Group 2">
+ <property name="Perfect Forward Secrecy" value="dh2"/>
+ </item>
+ <item _label="DH Group 5">
+ <property name="Perfect Forward Secrecy" value="dh5"/>
+ </item>
+ </widget>
+ <widget _label="Local port" type="number" min="0" max="65535"/>
+ <widget type="separator"/>
+ <widget _label="Disable dead peer detection" type="checkbox">
+ <property name="DPD idle timeout (our side)"
+ true-value="0"/>
+ </widget>
+ </section>
+</nm-vpn-properties>
diff --git a/properties/nm-vpnc.c b/properties/nm-vpnc.c
index 4ad72e8..7ef4d39 100644
--- a/properties/nm-vpnc.c
+++ b/properties/nm-vpnc.c
@@ -45,6 +45,8 @@
#define VPNC_PLUGIN_UI_ERROR NM_CONNECTION_ERROR
#define VPNC_PLUGIN_UI_ERROR_FAILED NM_CONNECTION_ERROR_FAILED
#define VPNC_PLUGIN_UI_ERROR_INVALID_PROPERTY NM_CONNECTION_ERROR_INVALID_PROPERTY
+
+#include "nm-vpnc-properties.h"
#endif
#ifdef NM_VPNC_OLD
@@ -848,6 +850,14 @@ get_widget (NMVpnEditor *editor)
return G_OBJECT (priv->widget);
}
+#ifdef NM_VPNC_NEW
+static char *
+get_property_xml (NMVpnEditor *editor)
+{
+ return g_strdup (NM_VPNC_PROPERTIES_XML);
+}
+#endif
+
static void
save_one_password (NMSettingVpn *s_vpn,
GtkBuilder *builder,
@@ -1159,6 +1169,9 @@ vpnc_editor_interface_init (NMVpnEditorInterface *iface)
{
/* interface implementation */
iface->get_widget = get_widget;
+#ifdef NM_VPNC_NEW
+ iface->get_property_xml = get_property_xml;
+#endif
iface->update_connection = update_connection;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]