![]() |
![]() |
![]() |
libnm Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
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
); NMVpnEditorInterface; GObject * nm_vpn_editor_get_widget (NMVpnEditor *editor
); gboolean nm_vpn_editor_update_connection (NMVpnEditor *editor
,NMConnection *connection
,GError **error
);
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.
GTypeInterface |
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
);
Returns : |
. [transfer full] |
NMVpnEditorPluginCapability nm_vpn_editor_plugin_get_capabilities
(NMVpnEditorPlugin *plugin
);
NMConnection * nm_vpn_editor_plugin_import (NMVpnEditorPlugin *plugin
,const char *path
,GError **error
);
Returns : |
. [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
);
typedef struct { GTypeInterface g_iface; GObject * (*get_widget) (NMVpnEditor *editor); void (*placeholder) (void); gboolean (*update_connection) (NMVpnEditor *editor, NMConnection *connection, GError **error); void (*changed) (NMVpnEditor *editor); } NMVpnEditorInterface;
Interface for editing a specific NMConnection
GTypeInterface |
the parent interface |
return the GtkWidget for the VPN editor's UI | |
not currently used | |
called to save the user-entered options to the connection
object. Should return FALSE and set error if the current options are
invalid. error should contain enough information for the plugin to
determine which UI widget is invalid at a later point in time. For
example, creating unique error codes for what error occurred and populating
the message field of error with the name of the invalid property. |
|
emitted when the value of a UI widget changes. May trigger a
validity check via update_connection to write values to the connection. |
GObject * nm_vpn_editor_get_widget (NMVpnEditor *editor
);
Returns : |
. [transfer none] |
gboolean nm_vpn_editor_update_connection (NMVpnEditor *editor
,NMConnection *connection
,GError **error
);