mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 13:08:10 +02:00
libnm/vpn: deprecated NMVpnPluginOld
In hindsight, the NMVpnPluginOld should never have made public for nm-1-0 as there are no users and we don't want to support this API. For now, just deprecate it.
This commit is contained in:
parent
867227dd4a
commit
6ea0b9efee
2 changed files with 43 additions and 7 deletions
|
|
@ -19,10 +19,6 @@
|
||||||
* Copyright 2007 - 2008 Red Hat, Inc.
|
* Copyright 2007 - 2008 Red Hat, Inc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* This interface is expected to be deprecated in NM 1.2, at which point there
|
|
||||||
* will be a new "NMVpnPlugin" class to replace it.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
@ -117,6 +113,8 @@ nm_vpn_plugin_old_set_connection (NMVpnPluginOld *plugin,
|
||||||
* nm_vpn_plugin_old_get_connection:
|
* nm_vpn_plugin_old_get_connection:
|
||||||
*
|
*
|
||||||
* Returns: (transfer full):
|
* Returns: (transfer full):
|
||||||
|
*
|
||||||
|
* Deprecated: 1.2: replaced by NMVpnServicePlugin
|
||||||
*/
|
*/
|
||||||
GDBusConnection *
|
GDBusConnection *
|
||||||
nm_vpn_plugin_old_get_connection (NMVpnPluginOld *plugin)
|
nm_vpn_plugin_old_get_connection (NMVpnPluginOld *plugin)
|
||||||
|
|
@ -606,6 +604,8 @@ impl_vpn_plugin_old_new_secrets (NMVpnPluginOld *plugin,
|
||||||
* request new secrets when the secrets originally provided by NetworkManager
|
* request new secrets when the secrets originally provided by NetworkManager
|
||||||
* are insufficient, or the VPN process indicates that it needs additional
|
* are insufficient, or the VPN process indicates that it needs additional
|
||||||
* information to complete the request.
|
* information to complete the request.
|
||||||
|
*
|
||||||
|
* Deprecated: 1.2: replaced by NMVpnServicePlugin
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
nm_vpn_plugin_old_secrets_required (NMVpnPluginOld *plugin,
|
nm_vpn_plugin_old_secrets_required (NMVpnPluginOld *plugin,
|
||||||
|
|
@ -658,6 +658,8 @@ free_secret (gpointer data)
|
||||||
* an applet when the applet calls the authentication dialog of the VPN plugin.
|
* an applet when the applet calls the authentication dialog of the VPN plugin.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if reading values was successful, %FALSE if not
|
* Returns: %TRUE if reading values was successful, %FALSE if not
|
||||||
|
*
|
||||||
|
* Deprecated: 1.2: replaced by NMVpnServicePlugin
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
nm_vpn_plugin_old_read_vpn_details (int fd,
|
nm_vpn_plugin_old_read_vpn_details (int fd,
|
||||||
|
|
@ -759,6 +761,8 @@ nm_vpn_plugin_old_read_vpn_details (int fd,
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if the flag data item was found and successfully converted
|
* Returns: %TRUE if the flag data item was found and successfully converted
|
||||||
* to flags, %FALSE if not
|
* to flags, %FALSE if not
|
||||||
|
*
|
||||||
|
* Deprecated: 1.2: replaced by NMVpnServicePlugin
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
nm_vpn_plugin_old_get_secret_flags (GHashTable *data,
|
nm_vpn_plugin_old_get_secret_flags (GHashTable *data,
|
||||||
|
|
@ -1088,6 +1092,8 @@ nm_vpn_plugin_old_class_init (NMVpnPluginOldClass *plugin_class)
|
||||||
* NMVpnPluginOld:service-name:
|
* NMVpnPluginOld:service-name:
|
||||||
*
|
*
|
||||||
* The D-Bus service name of this plugin.
|
* The D-Bus service name of this plugin.
|
||||||
|
*
|
||||||
|
* Deprecated: 1.2: replaced by NMVpnServicePlugin
|
||||||
*/
|
*/
|
||||||
g_object_class_install_property
|
g_object_class_install_property
|
||||||
(object_class, PROP_DBUS_SERVICE_NAME,
|
(object_class, PROP_DBUS_SERVICE_NAME,
|
||||||
|
|
@ -1101,6 +1107,8 @@ nm_vpn_plugin_old_class_init (NMVpnPluginOldClass *plugin_class)
|
||||||
* NMVpnPluginOld:state:
|
* NMVpnPluginOld:state:
|
||||||
*
|
*
|
||||||
* The state of the plugin.
|
* The state of the plugin.
|
||||||
|
*
|
||||||
|
* Deprecated: 1.2: replaced by NMVpnServicePlugin
|
||||||
*/
|
*/
|
||||||
g_object_class_install_property
|
g_object_class_install_property
|
||||||
(object_class, PROP_STATE,
|
(object_class, PROP_STATE,
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
* Boston, MA 02110-1301 USA.
|
* Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* Copyright 2007 - 2008 Novell, Inc.
|
* Copyright 2007 - 2008 Novell, Inc.
|
||||||
* Copyright 2007 - 2013 Red Hat, Inc.
|
* Copyright 2007 - 2015 Red Hat, Inc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __NM_VPN_PLUGIN_OLD_H__
|
#ifndef __NM_VPN_PLUGIN_OLD_H__
|
||||||
|
|
@ -39,94 +39,122 @@ G_BEGIN_DECLS
|
||||||
#define NM_VPN_PLUGIN_OLD_STATE "state"
|
#define NM_VPN_PLUGIN_OLD_STATE "state"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
GObject parent;
|
GObject parent;
|
||||||
} NMVpnPluginOld;
|
} NMVpnPluginOld NM_DEPRECATED_IN_1_2;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
GObjectClass parent;
|
GObjectClass parent;
|
||||||
|
|
||||||
/* Signals */
|
/* Signals */
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
void (*state_changed) (NMVpnPluginOld *plugin,
|
void (*state_changed) (NMVpnPluginOld *plugin,
|
||||||
NMVpnServiceState state);
|
NMVpnServiceState state);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
void (*ip4_config) (NMVpnPluginOld *plugin,
|
void (*ip4_config) (NMVpnPluginOld *plugin,
|
||||||
GVariant *ip4_config);
|
GVariant *ip4_config);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
void (*login_banner) (NMVpnPluginOld *plugin,
|
void (*login_banner) (NMVpnPluginOld *plugin,
|
||||||
const char *banner);
|
const char *banner);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
void (*failure) (NMVpnPluginOld *plugin,
|
void (*failure) (NMVpnPluginOld *plugin,
|
||||||
NMVpnPluginFailure reason);
|
NMVpnPluginFailure reason);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
void (*quit) (NMVpnPluginOld *plugin);
|
void (*quit) (NMVpnPluginOld *plugin);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
void (*config) (NMVpnPluginOld *plugin,
|
void (*config) (NMVpnPluginOld *plugin,
|
||||||
GVariant *config);
|
GVariant *config);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
void (*ip6_config) (NMVpnPluginOld *plugin,
|
void (*ip6_config) (NMVpnPluginOld *plugin,
|
||||||
GVariant *config);
|
GVariant *config);
|
||||||
|
|
||||||
/* virtual methods */
|
/* virtual methods */
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
gboolean (*connect) (NMVpnPluginOld *plugin,
|
gboolean (*connect) (NMVpnPluginOld *plugin,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
GError **err);
|
GError **err);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
gboolean (*need_secrets) (NMVpnPluginOld *plugin,
|
gboolean (*need_secrets) (NMVpnPluginOld *plugin,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
const char **setting_name,
|
const char **setting_name,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
gboolean (*disconnect) (NMVpnPluginOld *plugin,
|
gboolean (*disconnect) (NMVpnPluginOld *plugin,
|
||||||
GError **err);
|
GError **err);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
gboolean (*new_secrets) (NMVpnPluginOld *plugin,
|
gboolean (*new_secrets) (NMVpnPluginOld *plugin,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
gboolean (*connect_interactive) (NMVpnPluginOld *plugin,
|
gboolean (*connect_interactive) (NMVpnPluginOld *plugin,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
GVariant *details,
|
GVariant *details,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
gpointer padding[8];
|
gpointer padding[8];
|
||||||
} NMVpnPluginOldClass;
|
} NMVpnPluginOldClass NM_DEPRECATED_IN_1_2;
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
GType nm_vpn_plugin_old_get_type (void);
|
GType nm_vpn_plugin_old_get_type (void);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
GDBusConnection *nm_vpn_plugin_old_get_connection (NMVpnPluginOld *plugin);
|
GDBusConnection *nm_vpn_plugin_old_get_connection (NMVpnPluginOld *plugin);
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
NMVpnServiceState nm_vpn_plugin_old_get_state (NMVpnPluginOld *plugin);
|
NMVpnServiceState nm_vpn_plugin_old_get_state (NMVpnPluginOld *plugin);
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
void nm_vpn_plugin_old_set_state (NMVpnPluginOld *plugin,
|
void nm_vpn_plugin_old_set_state (NMVpnPluginOld *plugin,
|
||||||
NMVpnServiceState state);
|
NMVpnServiceState state);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
void nm_vpn_plugin_old_secrets_required (NMVpnPluginOld *plugin,
|
void nm_vpn_plugin_old_secrets_required (NMVpnPluginOld *plugin,
|
||||||
const char *message,
|
const char *message,
|
||||||
const char **hints);
|
const char **hints);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
void nm_vpn_plugin_old_set_login_banner (NMVpnPluginOld *plugin,
|
void nm_vpn_plugin_old_set_login_banner (NMVpnPluginOld *plugin,
|
||||||
const char *banner);
|
const char *banner);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
void nm_vpn_plugin_old_failure (NMVpnPluginOld *plugin,
|
void nm_vpn_plugin_old_failure (NMVpnPluginOld *plugin,
|
||||||
NMVpnPluginFailure reason);
|
NMVpnPluginFailure reason);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
void nm_vpn_plugin_old_set_config (NMVpnPluginOld *plugin,
|
void nm_vpn_plugin_old_set_config (NMVpnPluginOld *plugin,
|
||||||
GVariant *config);
|
GVariant *config);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
void nm_vpn_plugin_old_set_ip4_config (NMVpnPluginOld *plugin,
|
void nm_vpn_plugin_old_set_ip4_config (NMVpnPluginOld *plugin,
|
||||||
GVariant *ip4_config);
|
GVariant *ip4_config);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
void nm_vpn_plugin_old_set_ip6_config (NMVpnPluginOld *plugin,
|
void nm_vpn_plugin_old_set_ip6_config (NMVpnPluginOld *plugin,
|
||||||
GVariant *ip6_config);
|
GVariant *ip6_config);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
gboolean nm_vpn_plugin_old_disconnect (NMVpnPluginOld *plugin,
|
gboolean nm_vpn_plugin_old_disconnect (NMVpnPluginOld *plugin,
|
||||||
GError **err);
|
GError **err);
|
||||||
|
|
||||||
/* Utility functions */
|
/* Utility functions */
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
gboolean nm_vpn_plugin_old_read_vpn_details (int fd,
|
gboolean nm_vpn_plugin_old_read_vpn_details (int fd,
|
||||||
GHashTable **out_data,
|
GHashTable **out_data,
|
||||||
GHashTable **out_secrets);
|
GHashTable **out_secrets);
|
||||||
|
|
||||||
|
NM_DEPRECATED_IN_1_2
|
||||||
gboolean nm_vpn_plugin_old_get_secret_flags (GHashTable *data,
|
gboolean nm_vpn_plugin_old_get_secret_flags (GHashTable *data,
|
||||||
const char *secret_name,
|
const char *secret_name,
|
||||||
NMSettingSecretFlags *out_flags);
|
NMSettingSecretFlags *out_flags);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue