Top |
GDBusConnection * | nm_vpn_service_plugin_get_connection () |
void | nm_vpn_service_plugin_secrets_required () |
void | nm_vpn_service_plugin_set_login_banner () |
void | nm_vpn_service_plugin_failure () |
void | nm_vpn_service_plugin_set_config () |
void | nm_vpn_service_plugin_set_ip4_config () |
void | nm_vpn_service_plugin_set_ip6_config () |
gboolean | nm_vpn_service_plugin_disconnect () |
void | nm_vpn_service_plugin_shutdown () |
gboolean | nm_vpn_service_plugin_read_vpn_details () |
gboolean | nm_vpn_service_plugin_get_secret_flags () |
char * | service-name | Read / Write / Construct Only |
NMVpnServiceState | state | Read / Write |
gboolean | watch-peer | Read / Write / Construct Only |
void | config | Run First |
void | failure | Run First |
void | ip4-config | Run First |
void | ip6-config | Run First |
void | login-banner | Run First |
void | quit | Run First |
void | secrets-required | Run First |
void | state-changed | Run First |
GDBusConnection *
nm_vpn_service_plugin_get_connection (NMVpnServicePlugin *plugin
);
Since: 1.2
void nm_vpn_service_plugin_secrets_required (NMVpnServicePlugin *plugin
,const char *message
,const char **hints
);
Called by VPN plugin implementations to signal to NetworkManager that secrets are required during the connection process. This signal may be used to request new secrets when the secrets originally provided by NetworkManager are insufficient, or the VPN process indicates that it needs additional information to complete the request.
plugin |
||
message |
an information message about why secrets are required, if any |
|
hints |
VPN specific secret names for required new secrets |
Since: 1.2
void nm_vpn_service_plugin_set_login_banner (NMVpnServicePlugin *plugin
,const char *banner
);
Since: 1.2
void nm_vpn_service_plugin_failure (NMVpnServicePlugin *plugin
,NMVpnPluginFailure reason
);
Since: 1.2
void nm_vpn_service_plugin_set_config (NMVpnServicePlugin *plugin
,GVariant *config
);
Since: 1.2
void nm_vpn_service_plugin_set_ip4_config (NMVpnServicePlugin *plugin
,GVariant *ip4_config
);
Since: 1.2
void nm_vpn_service_plugin_set_ip6_config (NMVpnServicePlugin *plugin
,GVariant *ip6_config
);
Since: 1.2
gboolean nm_vpn_service_plugin_disconnect (NMVpnServicePlugin *plugin
,GError **err
);
Since: 1.2
void
nm_vpn_service_plugin_shutdown (NMVpnServicePlugin *plugin
);
Shutdown the plugin
and disconnect from D-Bus. After this,
the plugin instance is dead and should no longer be used.
It ensures to get no more requests from D-Bus. In principle,
you don't need to shutdown the plugin, disposing the instance
has the same effect. However, this gives a way to deactivate
the plugin before giving up the last reference.
Since: 1.12
gboolean nm_vpn_service_plugin_read_vpn_details (int fd
,GHashTable **out_data
,GHashTable **out_secrets
);
Parses key/value pairs from a file descriptor (normally stdin) passed by an applet when the applet calls the authentication dialog of the VPN plugin.
fd |
file descriptor to read from, usually stdin (0) |
|
out_data |
on successful return, a hash table (mapping char*:char*) containing the key/value pairs of VPN data items. |
[out][transfer full] |
out_secrets |
on successful return, a hash table (mapping char*:char*) containing the key/value pairsof VPN secrets. |
[out][transfer full] |
Since: 1.2
gboolean nm_vpn_service_plugin_get_secret_flags (GHashTable *data
,const char *secret_name
,NMSettingSecretFlags *out_flags
);
Given a VPN secret key name, attempts to find the corresponding flags data
item in data
. If found, converts the flags data item to
NMSettingSecretFlags and returns it.
data |
hash table containing VPN key/value pair data items |
|
secret_name |
VPN secret key name for which to retrieve flags for |
|
out_flags |
on success, the flags associated with |
[out] |
Since: 1.2
#define NM_VPN_SERVICE_PLUGIN_DBUS_SERVICE_NAME "service-name"
“service-name”
property “service-name” char *
The D-Bus service name of this plugin.
Owner: NMVpnServicePlugin
Flags: Read / Write / Construct Only
Default value: NULL
Since: 1.2
“state”
property“state” NMVpnServiceState
The state of the plugin.
Owner: NMVpnServicePlugin
Flags: Read / Write
Default value: NM_VPN_SERVICE_STATE_INIT
Since: 1.2
“config”
signalvoid user_function (NMVpnServicePlugin *nmvpnserviceplugin, GVariant *arg1, gpointer user_data)
Flags: Run First
“failure”
signalvoid user_function (NMVpnServicePlugin *nmvpnserviceplugin, guint arg1, gpointer user_data)
Flags: Run First
“ip4-config”
signalvoid user_function (NMVpnServicePlugin *nmvpnserviceplugin, GVariant *arg1, gpointer user_data)
Flags: Run First
“ip6-config”
signalvoid user_function (NMVpnServicePlugin *nmvpnserviceplugin, GVariant *arg1, gpointer user_data)
Flags: Run First
“login-banner”
signalvoid user_function (NMVpnServicePlugin *nmvpnserviceplugin, char *arg1, gpointer user_data)
Flags: Run First
“quit”
signalvoid user_function (NMVpnServicePlugin *nmvpnserviceplugin, gpointer user_data)
Flags: Run First
“secrets-required”
signalvoid user_function (NMVpnServicePlugin *nmvpnserviceplugin, char *arg1, GStrv arg2, gpointer user_data)
Flags: Run First
“state-changed”
signalvoid user_function (NMVpnServicePlugin *nmvpnserviceplugin, guint arg1, gpointer user_data)
Flags: Run First