| Top |
Functions
Object Hierarchy
GFlags
╰── NMVpnEditorPluginCapability
GInterface
├── NMVpnEditor
╰── NMVpnEditorPlugin
Functions
nm_vpn_editor_plugin_get_editor ()
NMVpnEditor * nm_vpn_editor_plugin_get_editor (NMVpnEditorPlugin *plugin,NMConnection *connection,GError **error);
nm_vpn_editor_plugin_get_capabilities ()
NMVpnEditorPluginCapability
nm_vpn_editor_plugin_get_capabilities (NMVpnEditorPlugin *plugin);
nm_vpn_editor_plugin_import ()
NMConnection * nm_vpn_editor_plugin_import (NMVpnEditorPlugin *plugin,const char *path,GError **error);
Parameters
plugin |
||
path |
full path to the file to attempt to read into a new NMConnection |
|
error |
on return, an error or |
Returns
a new NMConnection imported from path
, or NULL
on error or if the file at path
was not recognized by this plugin.
[transfer full]
nm_vpn_editor_plugin_export ()
gboolean nm_vpn_editor_plugin_export (NMVpnEditorPlugin *plugin,const char *path,NMConnection *connection,GError **error);
nm_vpn_editor_plugin_get_suggested_filename ()
char * nm_vpn_editor_plugin_get_suggested_filename (NMVpnEditorPlugin *plugin,NMConnection *connection);
nm_vpn_editor_plugin_load_from_file ()
NMVpnEditorPlugin * nm_vpn_editor_plugin_load_from_file (const char *plugin_name,const char *check_service,int check_owner,NMUtilsCheckFilePredicate check_file,gpointer user_data,GError **error);
Load the shared libary plugin_name
and create a new
NMVpnEditorPlugin instace via the NMVpnEditorPluginFactory
function.
If plugin_name
is not an absolute path name, it assumes the file
is in the plugin directory of NetworkManager. In any case, the call
will do certain checks on the file before passing it to dlopen.
A consequence for that is, that you cannot omit the ".so" suffix.
Parameters
plugin_name |
The path or name of the shared library to load. The path must either be an absolute filename to an existing file. Alternatively, it can be the name (without path) of a library in the plugin directory of NetworkManager. |
|
check_service |
if not-null, check that the loaded plugin advertises the given service. |
|
check_owner |
if non-negative, check whether the file is owned
by UID |
|
check_file |
optional callback to validate the file prior to loading the shared library. |
[scope call] |
user_data |
user data for |
|
error |
on failure the error reason. |
Since: 1.2
Types and Values
enum NMVpnEditorPluginCapability
Flags that indicate certain capabilities of the plugin to editor programs.
NMVpnEditorPluginInterface
typedef struct {
GTypeInterface g_iface;
NMVpnEditor * (*get_editor) (NMVpnEditorPlugin *plugin,
NMConnection *connection,
GError **error);
NMVpnEditorPluginCapability (*get_capabilities) (NMVpnEditorPlugin *plugin);
NMConnection * (*import_from_file) (NMVpnEditorPlugin *plugin,
const char *path,
GError **error);
gboolean (*export_to_file) (NMVpnEditorPlugin *plugin,
const char *path,
NMConnection *connection,
GError **error);
char * (*get_suggested_filename) (NMVpnEditorPlugin *plugin, NMConnection *connection);
} NMVpnEditorPluginInterface;
Interface for VPN editor plugins.
Members
the parent interface |
||
returns an NMVpnEditor, pre-filled with values from |
||
returns a bitmask of capabilities. |
||
Try to import a connection from the specified path. On
success, return a partial NMConnection object. On error, return |
||
Export the given connection to the specified path. Return
|
||
For a given connection, return a suggested file
name. Returned value will be |
Property Details
The “description” property
“description” gchar *
Longer description of the VPN plugin.
Flags: Read
Default value: NULL
The “name” property
“name” gchar *
Short display name of the VPN plugin.
Flags: Read
Default value: NULL
Signal Details
The “changed” signal
void user_function (NMVpnEditor *nmvpneditor, gpointer user_data)
Flags: Run First
