diff options
Diffstat (limited to 'libnm-glib/nm-vpn-plugin.h')
| -rw-r--r-- | libnm-glib/nm-vpn-plugin.h | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/libnm-glib/nm-vpn-plugin.h b/libnm-glib/nm-vpn-plugin.h index dee726f7..4f020f31 100644 --- a/libnm-glib/nm-vpn-plugin.h +++ b/libnm-glib/nm-vpn-plugin.h @@ -18,7 +18,7 @@ * Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2008 Novell, Inc. - * Copyright (C) 2007 - 2008 Red Hat, Inc. + * Copyright (C) 2007 - 2013 Red Hat, Inc. */ #ifndef NM_VPN_PLUGIN_H @@ -63,19 +63,23 @@ G_BEGIN_DECLS * @NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID: the operation could not be performed * because the connection was invalid. Usually means that the connection's * VPN setting was missing some required data item or secret. + * @NM_VPN_PLUGIN_ERROR_INTERACTIVE_NOT_SUPPORTED: the operation could not be + * performed as the plugin does not support interactive operations, such as + * ConnectInteractive() or NewSecrets() * * Returned by the VPN service plugin to indicate errors. **/ typedef enum { - NM_VPN_PLUGIN_ERROR_GENERAL, /*< nick=General >*/ - NM_VPN_PLUGIN_ERROR_STARTING_IN_PROGRESS, /*< nick=StartingInProgress >*/ - NM_VPN_PLUGIN_ERROR_ALREADY_STARTED, /*< nick=AlreadyStarted >*/ - NM_VPN_PLUGIN_ERROR_STOPPING_IN_PROGRESS, /*< nick=StoppingInProgress >*/ - NM_VPN_PLUGIN_ERROR_ALREADY_STOPPED, /*< nick=AlreadyStopped >*/ - NM_VPN_PLUGIN_ERROR_WRONG_STATE, /*< nick=WrongState >*/ - NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, /*< nick=BadArguments >*/ - NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED, /*< nick=LaunchFailed >*/ - NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID, /*< nick=ConnectionInvalid >*/ + NM_VPN_PLUGIN_ERROR_GENERAL, /*< nick=General >*/ + NM_VPN_PLUGIN_ERROR_STARTING_IN_PROGRESS, /*< nick=StartingInProgress >*/ + NM_VPN_PLUGIN_ERROR_ALREADY_STARTED, /*< nick=AlreadyStarted >*/ + NM_VPN_PLUGIN_ERROR_STOPPING_IN_PROGRESS, /*< nick=StoppingInProgress >*/ + NM_VPN_PLUGIN_ERROR_ALREADY_STOPPED, /*< nick=AlreadyStopped >*/ + NM_VPN_PLUGIN_ERROR_WRONG_STATE, /*< nick=WrongState >*/ + NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, /*< nick=BadArguments >*/ + NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED, /*< nick=LaunchFailed >*/ + NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID, /*< nick=ConnectionInvalid >*/ + NM_VPN_PLUGIN_ERROR_INTERACTIVE_NOT_SUPPORTED /*< nick=InteractiveNotSupported >*/ } NMVPNPluginError; #define NM_VPN_PLUGIN_ERROR (nm_vpn_plugin_error_quark ()) @@ -121,11 +125,19 @@ typedef struct { void (*ip6_config) (NMVPNPlugin *plugin, GHashTable *config); + /* more methods */ + gboolean (*new_secrets) (NMVPNPlugin *plugin, + NMConnection *connection, + GError **error); + + gboolean (*connect_interactive) (NMVPNPlugin *plugin, + NMConnection *connection, + GHashTable *details, + GError **error); + /* Padding for future expansion */ void (*_reserved1) (void); void (*_reserved2) (void); - void (*_reserved3) (void); - void (*_reserved4) (void); } NMVPNPluginClass; GType nm_vpn_plugin_get_type (void); @@ -137,6 +149,11 @@ NMVPNServiceState nm_vpn_plugin_get_state (NMVPNPlugin *plugin); void nm_vpn_plugin_set_state (NMVPNPlugin *plugin, NMVPNServiceState state); +NM_AVAILABLE_IN_0_9_10 +void nm_vpn_plugin_secrets_required (NMVPNPlugin *plugin, + const char *message, + const char **hints); + void nm_vpn_plugin_set_login_banner (NMVPNPlugin *plugin, const char *banner); |