nm-vpn-plugin-utils: libnm-glib Reference Manual

## nm-vpn-plugin-utils nm-vpn-plugin-utils |

## Functions

gboolean | nm_vpn_plugin_utils_read_vpn_details ()
gboolean | nm_vpn_plugin_utils_get_secret_flags ()

## Description

## Functions

### nm_vpn_plugin_utils_read_vpn_details ()

    gboolean
    nm_vpn_plugin_utils_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.

#### Parameters

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]

#### Returns

`TRUE` if reading values was successful, `FALSE` if not

### nm_vpn_plugin_utils_get_secret_flags ()

    gboolean
    nm_vpn_plugin_utils_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.

#### Parameters

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 `secret_name` . | [out]

#### Returns

`TRUE` if the flag data item was found and successfully converted to flags, `FALSE` if not

## Types and Values