![]() |
![]() |
![]() |
libnm Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites | Signals |
NMVpnEditorPlugin * (*NMVpnEditorPluginFactory) (GError **error
); NMVpnEditorPlugin * nm_vpn_editor_plugin_factory (GError **error
); enum NMVpnEditorPluginCapability; #define NM_VPN_EDITOR_PLUGIN_NAME #define NM_VPN_EDITOR_PLUGIN_DESCRIPTION #define NM_VPN_EDITOR_PLUGIN_SERVICE NMVpnEditorPluginInterface; NMVpnEditor * nm_vpn_editor_plugin_get_editor (NMVpnEditorPlugin *plugin
,NMConnection *connection
,GError **error
); NMVpnEditorPluginCapability nm_vpn_editor_plugin_get_capabilities (NMVpnEditorPlugin *plugin
); NMConnection * nm_vpn_editor_plugin_import (NMVpnEditorPlugin *plugin
,const char *path
,GError **error
); gboolean nm_vpn_editor_plugin_export (NMVpnEditorPlugin *plugin
,const char *path
,NMConnection *connection
,GError **error
); char * nm_vpn_editor_plugin_get_suggested_filename (NMVpnEditorPlugin *plugin
,NMConnection *connection
); 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
); NMVpnEditor;
typedef enum { NM_VPN_EDITOR_PLUGIN_CAPABILITY_NONE = 0x00, NM_VPN_EDITOR_PLUGIN_CAPABILITY_IMPORT = 0x01, NM_VPN_EDITOR_PLUGIN_CAPABILITY_EXPORT = 0x02, NM_VPN_EDITOR_PLUGIN_CAPABILITY_IPV6 = 0x04 } NMVpnEditorPluginCapability;
Flags that indicate certain capabilities of the plugin to editor programs.
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.
the parent interface | |
returns an NMVpnEditor, pre-filled with values from connection
if non-NULL . |
|
returns a bitmask of capabilities. | |
Try to import a connection from the specified path. On
success, return a partial NMConnection object. On error, return NULL and
set error with additional information. Note that error can be NULL , in
which case no additional error information should be provided. |
|
Export the given connection to the specified path. Return
TRUE on success. On error, return FALSE and set error with additional
error information. Note that error can be NULL , in which case no
additional error information should be provided. |
|
For a given connection, return a suggested file
name. Returned value will be NULL or a suggested file name to be freed by
the caller. |
NMVpnEditor * nm_vpn_editor_plugin_get_editor (NMVpnEditorPlugin *plugin
,NMConnection *connection
,GError **error
);
|
the NMVpnEditorPlugin |
|
the NMConnection to be edited |
|
on return, an error or NULL
|
Returns : |
a new NMVpnEditor or NULL on error. [transfer full]
|
NMVpnEditorPluginCapability nm_vpn_editor_plugin_get_capabilities
(NMVpnEditorPlugin *plugin
);
NMConnection * nm_vpn_editor_plugin_import (NMVpnEditorPlugin *plugin
,const char *path
,GError **error
);
|
the NMVpnEditorPlugin |
|
full path to the file to attempt to read into a new NMConnection |
|
on return, an error or NULL
|
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]
|
gboolean nm_vpn_editor_plugin_export (NMVpnEditorPlugin *plugin
,const char *path
,NMConnection *connection
,GError **error
);
char * nm_vpn_editor_plugin_get_suggested_filename (NMVpnEditorPlugin *plugin
,NMConnection *connection
);
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.
|
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. |
|
if not-null, check that the loaded plugin advertises the given service. |
|
if non-negative, check whether the file is owned
by UID check_owner or by root. In this case also check that
the file is not writable by anybody else. |
|
optional callback to validate the file prior to loading the shared library. [scope call] |
|
user data for check_file
|
|
on failure the error reason. |
Returns : |
a new plugin instance or NULL on error. [transfer full]
|
Since 1.2
"changed"
signalvoid user_function (NMVpnEditor *nmvpneditor,
gpointer user_data) : Run First
|
the object which received the signal. |
|
user data set when the signal handler was connected. |