summary refs log tree commit diff
path: root/libnm-core/nm-vpn-editor-plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'libnm-core/nm-vpn-editor-plugin.h')
-rw-r--r--libnm-core/nm-vpn-editor-plugin.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/libnm-core/nm-vpn-editor-plugin.h b/libnm-core/nm-vpn-editor-plugin.h
index 9ff23a81..fb51f7e6 100644
--- a/libnm-core/nm-vpn-editor-plugin.h
+++ b/libnm-core/nm-vpn-editor-plugin.h
@@ -34,6 +34,8 @@
 
 G_BEGIN_DECLS
 
+struct _NMVpnPluginInfo;
+
 typedef struct _NMVpnEditorPlugin NMVpnEditorPlugin;
 typedef struct _NMVpnEditor NMVpnEditor;
 
@@ -80,6 +82,8 @@ typedef enum /*< flags >*/ {
 /* D-Bus service name of the plugin's VPN service */
 #define NM_VPN_EDITOR_PLUGIN_SERVICE "service"
 
+typedef struct _NMVpnEditorPluginVT NMVpnEditorPluginVT;
+
 /**
  * NMVpnEditorPluginInterface:
  * @g_iface: the parent interface
@@ -97,6 +101,8 @@ typedef enum /*< flags >*/ {
  * @get_suggested_filename: 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.
+ * @get_vt: return a virtual function table to implement further functions in
+ *   the plugin, without requiring to update libnm. Used by nm_vpn_editor_plugin_get_vt().
  *
  * Interface for VPN editor plugins.
  */
@@ -119,6 +125,12 @@ typedef struct {
 	                            GError **error);
 
 	char * (*get_suggested_filename) (NMVpnEditorPlugin *plugin, NMConnection *connection);
+
+	void (*notify_plugin_info_set) (NMVpnEditorPlugin *plugin,
+	                                struct _NMVpnPluginInfo *plugin_info);
+
+	const NMVpnEditorPluginVT *(*get_vt) (NMVpnEditorPlugin *plugin,
+	                                      gsize *out_vt_size);
 } NMVpnEditorPluginInterface;
 
 GType nm_vpn_editor_plugin_get_type (void);
@@ -129,6 +141,11 @@ NMVpnEditor *nm_vpn_editor_plugin_get_editor (NMVpnEditorPlugin *plugin,
 
 NMVpnEditorPluginCapability nm_vpn_editor_plugin_get_capabilities (NMVpnEditorPlugin *plugin);
 
+NM_AVAILABLE_IN_1_4
+gsize nm_vpn_editor_plugin_get_vt (NMVpnEditorPlugin *plugin,
+                                   NMVpnEditorPluginVT *vt,
+                                   gsize vt_size);
+
 NMConnection *nm_vpn_editor_plugin_import                 (NMVpnEditorPlugin *plugin,
                                                            const char *path,
                                                            GError **error);
@@ -147,6 +164,18 @@ NMVpnEditorPlugin *nm_vpn_editor_plugin_load_from_file  (const char *plugin_name
                                                          gpointer user_data,
                                                          GError **error);
 
+NM_AVAILABLE_IN_1_4
+NMVpnEditorPlugin *nm_vpn_editor_plugin_load (const char *plugin_name,
+                                              const char *check_service,
+                                              GError **error);
+
+NM_AVAILABLE_IN_1_4
+struct _NMVpnPluginInfo *nm_vpn_editor_plugin_get_plugin_info (NMVpnEditorPlugin *plugin);
+NM_AVAILABLE_IN_1_4
+void             nm_vpn_editor_plugin_set_plugin_info (NMVpnEditorPlugin *plugin, struct _NMVpnPluginInfo *plugin_info);
+
+#include "nm-vpn-plugin-info.h"
+
 G_END_DECLS
 
 #endif	/* __NM_VPN_EDITOR_PLUGIN_H__ */