summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-11-10 15:24:02 -0500
committerDan Winship <danw@gnome.org>2014-11-11 09:57:07 -0500
commit83cbcb128fc5bca5454cde281ccfcfb0b99bd5a0 (patch)
tree7d94f4e41bc4654d6382702fc0f245c5ca123347
parent152ba8a6add888a9d86098bffc44da7c0d4153e0 (diff)
downloadNetworkManager-danw/wip/vpn.tar.gz
libnm-glib: add libnm compat defines to nm-vpn-plugin-ui-interface.hdanw/wip/vpn
Add a bunch of compat defines to nm-vpn-plugin-ui-interface.h, to make it easier to compile the same code against libnm-glib's NMVpnPluginUiInterface and libnm's NMVpnEditorPlugin.
-rw-r--r--libnm-glib/nm-vpn-plugin-ui-interface.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/libnm-glib/nm-vpn-plugin-ui-interface.h b/libnm-glib/nm-vpn-plugin-ui-interface.h
index 9c6e49ebe6..e671e6cfac 100644
--- a/libnm-glib/nm-vpn-plugin-ui-interface.h
+++ b/libnm-glib/nm-vpn-plugin-ui-interface.h
@@ -224,6 +224,52 @@ gboolean nm_vpn_plugin_ui_widget_interface_save_secrets (NMVpnPluginUiWidgetInte
NMConnection *connection,
GError **error);
+
+#ifdef NM_VPN_LIBNM_COMPAT
+#define nm_vpn_editor_plugin_factory nm_vpn_plugin_ui_factory
+
+#define NM_TYPE_VPN_EDITOR_PLUGIN NM_TYPE_VPN_PLUGIN_UI_INTERFACE
+#define NM_VPN_EDITOR_PLUGIN(obj) NM_VPN_PLUGIN_UI_INTERFACE(obj)
+#define NM_IS_VPN_EDITOR_PLUGIN(obj) NM_IS_VPN_PLUGIN_UI_INTERFACE(obj)
+#define NM_VPN_EDITOR_PLUGIN_GET_INTERFACE(obj) NM_VPN_PLUGIN_UI_INTERFACE_GET_INTERFACE(obj)
+
+#define NMVpnEditorPluginCapability NMVpnPluginUiCapability
+#define NM_VPN_EDITOR_PLUGIN_CAPABILITY_NONE NM_VPN_PLUGIN_UI_CAPABILITY_NONE
+#define NM_VPN_EDITOR_PLUGIN_CAPABILITY_IMPORT NM_VPN_PLUGIN_UI_CAPABILITY_IMPORT
+#define NM_VPN_EDITOR_PLUGIN_CAPABILITY_EXPORT NM_VPN_PLUGIN_UI_CAPABILITY_EXPORT
+#define NM_VPN_EDITOR_PLUGIN_CAPABILITY_IPV6 NM_VPN_PLUGIN_UI_CAPABILITY_IPV6
+
+#define NM_VPN_EDITOR_PLUGIN_NAME NM_VPN_PLUGIN_UI_INTERFACE_NAME
+#define NM_VPN_EDITOR_PLUGIN_DESCRIPTION NM_VPN_PLUGIN_UI_INTERFACE_DESC
+#define NM_VPN_EDITOR_PLUGIN_SERVICE NM_VPN_PLUGIN_UI_INTERFACE_SERVICE
+
+#define NMVpnEditorPlugin NMVpnPluginUiInterface
+#define NMVpnEditorPluginInterface NMVpnPluginUiInterface
+
+#define get_editor ui_factory
+#define get_suggested_filename get_suggested_name
+
+#define nm_vpn_editor_plugin_get_type nm_vpn_plugin_ui_interface_get_type
+#define nm_vpn_editor_plugin_get_editor nm_vpn_plugin_ui_interface_ui_factory
+#define nm_vpn_editor_plugin_get_capabilities nm_vpn_plugin_ui_interface_get_capabilities
+#define nm_vpn_editor_plugin_import nm_vpn_plugin_ui_interface_import
+#define nm_vpn_editor_plugin_export nm_vpn_plugin_ui_interface_export
+#define nm_vpn_editor_plugin_get_suggested_filename nm_vpn_plugin_ui_interface_get_suggested_name
+
+#define NM_TYPE_VPN_EDITOR NM_TYPE_VPN_PLUGIN_UI_WIDGET_INTERFACE
+#define NM_VPN_EDITOR(obj) NM_VPN_PLUGIN_UI_WIDGET_INTERFACE (obj)
+#define NM_IS_VPN_EDITOR(obj) NM_IS_VPN_PLUGIN_UI_WIDGET_INTERFACE (obj)
+#define NM_VPN_EDITOR_GET_INTERFACE(obj) NM_VPN_PLUGIN_UI_WIDGET_INTERFACE_GET_INTERFACE (obj)
+
+#define NMVpnEditor NMVpnPluginUiWidgetInterface
+#define NMVpnEditorInterface NMVpnPluginUiWidgetInterface
+
+#define nm_vpn_editor_get_type nm_vpn_plugin_ui_widget_interface_get_type
+#define nm_vpn_editor_get_widget nm_vpn_plugin_ui_widget_interface_get_widget
+#define nm_vpn_editor_update_connection nm_vpn_plugin_ui_widget_interface_update_connection
+
+#endif /* NM_VPN_LIBNM_COMPAT */
+
G_END_DECLS
#endif /* NM_VPN_PLUGIN_UI_INTERFACE_H */