mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-09 00:00:53 -04:00
nm: Port to libnm
This commit is contained in:
parent
0fa9863363
commit
ae8082daa8
@ -19,6 +19,7 @@ install-data-hook:
|
|||||||
sed -e "1s|^|# This file is obsoleted by a file in $(NM_VPN_SERVICE_DIR)\n\n|" \
|
sed -e "1s|^|# This file is obsoleted by a file in $(NM_VPN_SERVICE_DIR)\n\n|" \
|
||||||
-e 's|[@]NM_LIBEXECDIR[@]|$(nm_libexecdir)|g' \
|
-e 's|[@]NM_LIBEXECDIR[@]|$(nm_libexecdir)|g' \
|
||||||
-e 's|[@]NM_PLUGINDIR[@]|$(nm_plugindir)|g' \
|
-e 's|[@]NM_PLUGINDIR[@]|$(nm_plugindir)|g' \
|
||||||
|
-e 's|[@]NM_PLUGINDIR_ABS[@]|$(nm_plugindir)|g' \
|
||||||
-e 's|[@]CHARON[@]|$(charon)|' \
|
-e 's|[@]CHARON[@]|$(charon)|' \
|
||||||
<$(srcdir)/nm-strongswan-service.name.in \
|
<$(srcdir)/nm-strongswan-service.name.in \
|
||||||
>$(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-strongswan-service.name
|
>$(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-strongswan-service.name
|
||||||
@ -29,7 +30,8 @@ uninstall-hook:
|
|||||||
nm-strongswan-service.name: $(srcdir)/nm-strongswan-service.name.in
|
nm-strongswan-service.name: $(srcdir)/nm-strongswan-service.name.in
|
||||||
$(AM_V_GEN) \
|
$(AM_V_GEN) \
|
||||||
sed -e 's|[@]NM_LIBEXECDIR[@]|$(nm_libexecdir)|' \
|
sed -e 's|[@]NM_LIBEXECDIR[@]|$(nm_libexecdir)|' \
|
||||||
-e 's|[@]NM_PLUGINDIR[@]/|$(nm_plugindir_abs)|g' \
|
-e 's|[@]NM_PLUGINDIR[@]|$(nm_plugindir)|g' \
|
||||||
|
-e 's|[@]NM_PLUGINDIR_ABS[@]/|$(nm_plugindir_abs)|g' \
|
||||||
-e 's|[@]CHARON[@]|$(charon)|' $< >$@
|
-e 's|[@]CHARON[@]|$(charon)|' $< >$@
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
|
@ -4,7 +4,7 @@ nm_strongswan_auth_dialog_CPPFLAGS = \
|
|||||||
$(GTK_CFLAGS) \
|
$(GTK_CFLAGS) \
|
||||||
$(LIBGNOMEUI_CFLAGS) \
|
$(LIBGNOMEUI_CFLAGS) \
|
||||||
$(LIBSECRET_CFLAGS) \
|
$(LIBSECRET_CFLAGS) \
|
||||||
$(LIBNM_GLIB_CFLAGS) \
|
$(LIBNM_CFLAGS) \
|
||||||
-DG_DISABLE_DEPRECATED \
|
-DG_DISABLE_DEPRECATED \
|
||||||
-DGNOME_DISABLE_DEPRECATED \
|
-DGNOME_DISABLE_DEPRECATED \
|
||||||
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \
|
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \
|
||||||
@ -17,4 +17,4 @@ nm_strongswan_auth_dialog_LDADD = \
|
|||||||
$(GTK_LIBS) \
|
$(GTK_LIBS) \
|
||||||
$(LIBGNOMEUI_LIBS) \
|
$(LIBGNOMEUI_LIBS) \
|
||||||
$(LIBSECRET_LIBS) \
|
$(LIBSECRET_LIBS) \
|
||||||
$(LIBNM_GLIB_LIBS)
|
$(LIBNM_LIBS)
|
||||||
|
@ -24,10 +24,9 @@
|
|||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <libsecret/secret.h>
|
#include <libsecret/secret.h>
|
||||||
#include <libgnomeui/libgnomeui.h>
|
#include <libgnomeui/libgnomeui.h>
|
||||||
#include <nm-vpn-plugin.h>
|
|
||||||
#include <nm-setting-vpn.h>
|
#include <NetworkManager.h>
|
||||||
#include <nm-setting-connection.h>
|
#include <nm-vpn-service-plugin.h>
|
||||||
#include <nm-vpn-plugin-utils.h>
|
|
||||||
|
|
||||||
#define NM_DBUS_SERVICE_STRONGSWAN "org.freedesktop.NetworkManager.strongswan"
|
#define NM_DBUS_SERVICE_STRONGSWAN "org.freedesktop.NetworkManager.strongswan"
|
||||||
|
|
||||||
@ -66,7 +65,7 @@ static char* get_connection_type(char *uuid)
|
|||||||
GHashTable *data = NULL, *secrets = NULL;
|
GHashTable *data = NULL, *secrets = NULL;
|
||||||
char *method;
|
char *method;
|
||||||
|
|
||||||
if (!nm_vpn_plugin_utils_read_vpn_details (0, &data, &secrets)) {
|
if (!nm_vpn_service_plugin_read_vpn_details (0, &data, &secrets)) {
|
||||||
fprintf (stderr, "Failed to read data and secrets from stdin.\n");
|
fprintf (stderr, "Failed to read data and secrets from stdin.\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6)
|
|||||||
PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0)
|
PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0)
|
||||||
PKG_CHECK_MODULES(LIBSECRET, libsecret-1)
|
PKG_CHECK_MODULES(LIBSECRET, libsecret-1)
|
||||||
|
|
||||||
PKG_CHECK_MODULES(LIBNM_GLIB, NetworkManager >= 0.9.0 libnm-util libnm-glib libnm-glib-vpn)
|
PKG_CHECK_MODULES(LIBNM_GLIB, NetworkManager >= 1.1.0 libnm-util libnm-glib libnm-glib-vpn)
|
||||||
|
|
||||||
PKG_CHECK_MODULES(LIBNM, libnm >= 1.1.0)
|
PKG_CHECK_MODULES(LIBNM, libnm >= 1.1.0)
|
||||||
LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2"
|
LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2"
|
||||||
|
@ -5,10 +5,10 @@ Maintainer: Martin Willi <martin@strongswan.org>
|
|||||||
Build-Depends: cdbs,
|
Build-Depends: cdbs,
|
||||||
debhelper (>= 7),
|
debhelper (>= 7),
|
||||||
libnm (>= 1.1.0),
|
libnm (>= 1.1.0),
|
||||||
network-manager-dev (>= 0.9),
|
network-manager-dev (>= 1.1.0),
|
||||||
libnm-util-dev (>= 0.9),
|
libnm-util-dev (>= 1.1.0),
|
||||||
libnm-glib-dev (>= 0.9),
|
libnm-glib-dev (>= 1.1.0),
|
||||||
libnm-glib-vpn-dev (>= 0.9),
|
libnm-glib-vpn-dev (>= 1.1.0),
|
||||||
libgnomeui-dev,
|
libgnomeui-dev,
|
||||||
libsecret-1-dev,
|
libsecret-1-dev,
|
||||||
automake,
|
automake,
|
||||||
@ -17,7 +17,7 @@ Standards-Version: 3.8.3
|
|||||||
|
|
||||||
Package: network-manager-strongswan
|
Package: network-manager-strongswan
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}, strongswan-nm, network-manager (>= 0.9)
|
Depends: ${shlibs:Depends}, ${misc:Depends}, strongswan-nm, network-manager (>= 1.1.0)
|
||||||
Description: network management framework (strongSwan plugin)
|
Description: network management framework (strongSwan plugin)
|
||||||
NetworkManager attempts to keep an active network connection available at
|
NetworkManager attempts to keep an active network connection available at
|
||||||
all times. It is intended primarily for laptops where it allows easy
|
all times. It is intended primarily for laptops where it allows easy
|
||||||
|
@ -3,6 +3,9 @@ name=strongswan
|
|||||||
service=org.freedesktop.NetworkManager.strongswan
|
service=org.freedesktop.NetworkManager.strongswan
|
||||||
program=@CHARON@
|
program=@CHARON@
|
||||||
|
|
||||||
|
[libnm]
|
||||||
|
plugin=@NM_PLUGINDIR@/libnm-vpn-plugin-strongswan.so
|
||||||
|
|
||||||
[GNOME]
|
[GNOME]
|
||||||
auth-dialog=@NM_LIBEXECDIR@/nm-strongswan-auth-dialog
|
auth-dialog=@NM_LIBEXECDIR@/nm-strongswan-auth-dialog
|
||||||
properties=@NM_PLUGINDIR@/libnm-strongswan-properties
|
properties=@NM_PLUGINDIR_ABS@/libnm-strongswan-properties
|
||||||
|
@ -18,7 +18,7 @@ common_CFLAGS = \
|
|||||||
-DGDK_DISABLE_DEPRECATED
|
-DGDK_DISABLE_DEPRECATED
|
||||||
|
|
||||||
libnm_vpn_plugin_strongswan_la_CFLAGS = \
|
libnm_vpn_plugin_strongswan_la_CFLAGS = \
|
||||||
$(LIBNM_GLIB_CFLAGS) \
|
$(LIBNM_CFLAGS) \
|
||||||
$(common_CFLAGS)
|
$(common_CFLAGS)
|
||||||
|
|
||||||
libnm_strongswan_properties_la_CFLAGS = \
|
libnm_strongswan_properties_la_CFLAGS = \
|
||||||
@ -28,7 +28,7 @@ libnm_strongswan_properties_la_CFLAGS = \
|
|||||||
|
|
||||||
libnm_vpn_plugin_strongswan_la_LIBADD = \
|
libnm_vpn_plugin_strongswan_la_LIBADD = \
|
||||||
$(GTK_LIBS) \
|
$(GTK_LIBS) \
|
||||||
$(LIBNM_GLIB_LIBS)
|
$(LIBNM_LIBS)
|
||||||
|
|
||||||
libnm_strongswan_properties_la_LIBADD = \
|
libnm_strongswan_properties_la_LIBADD = \
|
||||||
$(GTK_LIBS) \
|
$(GTK_LIBS) \
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (C) 2015 Lubomir Rintel
|
||||||
* Copyright (C) 2013 Tobias Brunner
|
* Copyright (C) 2013 Tobias Brunner
|
||||||
* Copyright (C) 2008 Martin Willi
|
* Copyright (C) 2008 Martin Willi
|
||||||
* Hochschule fuer Technik Rapperswil
|
* Hochschule fuer Technik Rapperswil
|
||||||
@ -26,11 +27,14 @@
|
|||||||
#include <glib/gi18n-lib.h>
|
#include <glib/gi18n-lib.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#define NM_VPN_API_SUBJECT_TO_CHANGE
|
#ifdef NM_STRONGSWAN_OLD
|
||||||
|
#define NM_VPN_LIBNM_COMPAT
|
||||||
#include <nm-vpn-plugin-ui-interface.h>
|
#include <nm-vpn-plugin-ui-interface.h>
|
||||||
#include <nm-setting-vpn.h>
|
#include <nm-setting-vpn.h>
|
||||||
#include <nm-setting-connection.h>
|
#include <nm-setting-connection.h>
|
||||||
|
#else
|
||||||
|
#include <NetworkManager.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "nm-strongswan.h"
|
#include "nm-strongswan.h"
|
||||||
|
|
||||||
@ -41,18 +45,25 @@
|
|||||||
|
|
||||||
/************** plugin class **************/
|
/************** plugin class **************/
|
||||||
|
|
||||||
static void strongswan_plugin_ui_interface_init (NMVpnPluginUiInterface *iface_class);
|
enum {
|
||||||
|
PROP_0,
|
||||||
|
PROP_NAME,
|
||||||
|
PROP_DESC,
|
||||||
|
PROP_SERVICE
|
||||||
|
};
|
||||||
|
|
||||||
|
static void strongswan_plugin_ui_interface_init (NMVpnEditorPluginInterface *iface_class);
|
||||||
|
|
||||||
G_DEFINE_TYPE_EXTENDED (StrongswanPluginUi, strongswan_plugin_ui, G_TYPE_OBJECT, 0,
|
G_DEFINE_TYPE_EXTENDED (StrongswanPluginUi, strongswan_plugin_ui, G_TYPE_OBJECT, 0,
|
||||||
G_IMPLEMENT_INTERFACE (NM_TYPE_VPN_PLUGIN_UI_INTERFACE,
|
G_IMPLEMENT_INTERFACE (NM_TYPE_VPN_EDITOR_PLUGIN,
|
||||||
strongswan_plugin_ui_interface_init))
|
strongswan_plugin_ui_interface_init))
|
||||||
|
|
||||||
/************** UI widget class **************/
|
/************** UI widget class **************/
|
||||||
|
|
||||||
static void strongswan_plugin_ui_widget_interface_init (NMVpnPluginUiWidgetInterface *iface_class);
|
static void strongswan_plugin_ui_widget_interface_init (NMVpnEditorInterface *iface_class);
|
||||||
|
|
||||||
G_DEFINE_TYPE_EXTENDED (StrongswanPluginUiWidget, strongswan_plugin_ui_widget, G_TYPE_OBJECT, 0,
|
G_DEFINE_TYPE_EXTENDED (StrongswanPluginUiWidget, strongswan_plugin_ui_widget, G_TYPE_OBJECT, 0,
|
||||||
G_IMPLEMENT_INTERFACE (NM_TYPE_VPN_PLUGIN_UI_WIDGET_INTERFACE,
|
G_IMPLEMENT_INTERFACE (NM_TYPE_VPN_EDITOR,
|
||||||
strongswan_plugin_ui_widget_interface_init))
|
strongswan_plugin_ui_widget_interface_init))
|
||||||
|
|
||||||
#define STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), STRONGSWAN_TYPE_PLUGIN_UI_WIDGET, StrongswanPluginUiWidgetPrivate))
|
#define STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), STRONGSWAN_TYPE_PLUGIN_UI_WIDGET, StrongswanPluginUiWidgetPrivate))
|
||||||
@ -178,7 +189,7 @@ static gboolean
|
|||||||
init_plugin_ui (StrongswanPluginUiWidget *self, NMConnection *connection, GError **error)
|
init_plugin_ui (StrongswanPluginUiWidget *self, NMConnection *connection, GError **error)
|
||||||
{
|
{
|
||||||
StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self);
|
StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self);
|
||||||
NMSettingVPN *settings;
|
NMSettingVpn *settings;
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
const char *value;
|
const char *value;
|
||||||
|
|
||||||
@ -281,7 +292,7 @@ init_plugin_ui (StrongswanPluginUiWidget *self, NMConnection *connection, GError
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GObject *
|
static GObject *
|
||||||
get_widget (NMVpnPluginUiWidgetInterface *iface)
|
get_widget (NMVpnEditor *iface)
|
||||||
{
|
{
|
||||||
StrongswanPluginUiWidget *self = STRONGSWAN_PLUGIN_UI_WIDGET (iface);
|
StrongswanPluginUiWidget *self = STRONGSWAN_PLUGIN_UI_WIDGET (iface);
|
||||||
StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self);
|
StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self);
|
||||||
@ -290,13 +301,13 @@ get_widget (NMVpnPluginUiWidgetInterface *iface)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
update_connection (NMVpnPluginUiWidgetInterface *iface,
|
update_connection (NMVpnEditor *iface,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
StrongswanPluginUiWidget *self = STRONGSWAN_PLUGIN_UI_WIDGET (iface);
|
StrongswanPluginUiWidget *self = STRONGSWAN_PLUGIN_UI_WIDGET (iface);
|
||||||
StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self);
|
StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self);
|
||||||
NMSettingVPN *settings;
|
NMSettingVpn *settings;
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
gboolean active;
|
gboolean active;
|
||||||
char *str;
|
char *str;
|
||||||
@ -386,17 +397,17 @@ update_connection (NMVpnPluginUiWidgetInterface *iface,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static NMVpnPluginUiWidgetInterface *
|
static NMVpnEditor *
|
||||||
nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error)
|
nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error)
|
||||||
{
|
{
|
||||||
NMVpnPluginUiWidgetInterface *object;
|
NMVpnEditor *object;
|
||||||
StrongswanPluginUiWidgetPrivate *priv;
|
StrongswanPluginUiWidgetPrivate *priv;
|
||||||
char *ui_file;
|
char *ui_file;
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
g_return_val_if_fail (*error == NULL, NULL);
|
g_return_val_if_fail (*error == NULL, NULL);
|
||||||
|
|
||||||
object = NM_VPN_PLUGIN_UI_WIDGET_INTERFACE (g_object_new (STRONGSWAN_TYPE_PLUGIN_UI_WIDGET, NULL));
|
object = g_object_new (STRONGSWAN_TYPE_PLUGIN_UI_WIDGET, NULL);
|
||||||
if (!object) {
|
if (!object) {
|
||||||
g_set_error (error, STRONGSWAN_PLUGIN_UI_ERROR, 0, "could not create strongswan object");
|
g_set_error (error, STRONGSWAN_PLUGIN_UI_ERROR, 0, "could not create strongswan object");
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -467,7 +478,7 @@ strongswan_plugin_ui_widget_init (StrongswanPluginUiWidget *plugin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
strongswan_plugin_ui_widget_interface_init (NMVpnPluginUiWidgetInterface *iface_class)
|
strongswan_plugin_ui_widget_interface_init (NMVpnEditorInterface *iface_class)
|
||||||
{
|
{
|
||||||
/* interface implementation */
|
/* interface implementation */
|
||||||
iface_class->get_widget = get_widget;
|
iface_class->get_widget = get_widget;
|
||||||
@ -475,13 +486,13 @@ strongswan_plugin_ui_widget_interface_init (NMVpnPluginUiWidgetInterface *iface_
|
|||||||
}
|
}
|
||||||
|
|
||||||
static guint32
|
static guint32
|
||||||
get_capabilities (NMVpnPluginUiInterface *iface)
|
get_capabilities (NMVpnEditorPlugin *iface)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static NMVpnPluginUiWidgetInterface *
|
static NMVpnEditor *
|
||||||
ui_factory (NMVpnPluginUiInterface *iface, NMConnection *connection, GError **error)
|
get_editor (NMVpnEditorPlugin *iface, NMConnection *connection, GError **error)
|
||||||
{
|
{
|
||||||
return nm_vpn_plugin_ui_widget_interface_new (connection, error);
|
return nm_vpn_plugin_ui_widget_interface_new (connection, error);
|
||||||
}
|
}
|
||||||
@ -491,13 +502,13 @@ get_property (GObject *object, guint prop_id,
|
|||||||
GValue *value, GParamSpec *pspec)
|
GValue *value, GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case NM_VPN_PLUGIN_UI_INTERFACE_PROP_NAME:
|
case PROP_NAME:
|
||||||
g_value_set_string (value, STRONGSWAN_PLUGIN_NAME);
|
g_value_set_string (value, STRONGSWAN_PLUGIN_NAME);
|
||||||
break;
|
break;
|
||||||
case NM_VPN_PLUGIN_UI_INTERFACE_PROP_DESC:
|
case PROP_DESC:
|
||||||
g_value_set_string (value, STRONGSWAN_PLUGIN_DESC);
|
g_value_set_string (value, STRONGSWAN_PLUGIN_DESC);
|
||||||
break;
|
break;
|
||||||
case NM_VPN_PLUGIN_UI_INTERFACE_PROP_SERVICE:
|
case PROP_SERVICE:
|
||||||
g_value_set_string (value, STRONGSWAN_PLUGIN_SERVICE);
|
g_value_set_string (value, STRONGSWAN_PLUGIN_SERVICE);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -514,16 +525,16 @@ strongswan_plugin_ui_class_init (StrongswanPluginUiClass *req_class)
|
|||||||
object_class->get_property = get_property;
|
object_class->get_property = get_property;
|
||||||
|
|
||||||
g_object_class_override_property (object_class,
|
g_object_class_override_property (object_class,
|
||||||
NM_VPN_PLUGIN_UI_INTERFACE_PROP_NAME,
|
PROP_NAME,
|
||||||
NM_VPN_PLUGIN_UI_INTERFACE_NAME);
|
NM_VPN_EDITOR_PLUGIN_NAME);
|
||||||
|
|
||||||
g_object_class_override_property (object_class,
|
g_object_class_override_property (object_class,
|
||||||
NM_VPN_PLUGIN_UI_INTERFACE_PROP_DESC,
|
PROP_DESC,
|
||||||
NM_VPN_PLUGIN_UI_INTERFACE_DESC);
|
NM_VPN_EDITOR_PLUGIN_DESCRIPTION);
|
||||||
|
|
||||||
g_object_class_override_property (object_class,
|
g_object_class_override_property (object_class,
|
||||||
NM_VPN_PLUGIN_UI_INTERFACE_PROP_SERVICE,
|
PROP_SERVICE,
|
||||||
NM_VPN_PLUGIN_UI_INTERFACE_SERVICE);
|
NM_VPN_EDITOR_PLUGIN_SERVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -532,20 +543,20 @@ strongswan_plugin_ui_init (StrongswanPluginUi *plugin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
strongswan_plugin_ui_interface_init (NMVpnPluginUiInterface *iface_class)
|
strongswan_plugin_ui_interface_init (NMVpnEditorPluginInterface *iface_class)
|
||||||
{
|
{
|
||||||
/* interface implementation */
|
/* interface implementation */
|
||||||
iface_class->ui_factory = ui_factory;
|
iface_class->get_editor = get_editor;
|
||||||
iface_class->get_capabilities = get_capabilities;
|
iface_class->get_capabilities = get_capabilities;
|
||||||
/* TODO: implement delete_connection to purge associated secrets */
|
/* TODO: implement delete_connection to purge associated secrets */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
G_MODULE_EXPORT NMVpnPluginUiInterface *
|
G_MODULE_EXPORT NMVpnEditorPlugin *
|
||||||
nm_vpn_plugin_ui_factory (GError **error)
|
nm_vpn_editor_plugin_factory (GError **error)
|
||||||
{
|
{
|
||||||
if (error)
|
if (error)
|
||||||
g_return_val_if_fail (*error == NULL, NULL);
|
g_return_val_if_fail (*error == NULL, NULL);
|
||||||
|
|
||||||
return NM_VPN_PLUGIN_UI_INTERFACE (g_object_new (STRONGSWAN_TYPE_PLUGIN_UI, NULL));
|
return g_object_new (STRONGSWAN_TYPE_PLUGIN_UI, NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user