1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301 USA.
18 * Copyright 2015 Red Hat, Inc.
21 #ifndef __NM_VPN_PLUGIN_INFO_H__
22 #define __NM_VPN_PLUGIN_INFO_H__
25 #include <glib-object.h>
28 #include "nm-vpn-editor-plugin.h"
32 #define NM_TYPE_VPN_PLUGIN_INFO (nm_vpn_plugin_info_get_type ())
33 #define NM_VPN_PLUGIN_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_VPN_PLUGIN_INFO, NMVpnPluginInfo))
34 #define NM_VPN_PLUGIN_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_VPN_PLUGIN_INFO, NMVpnPluginInfoClass))
35 #define NM_IS_VPN_PLUGIN_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_VPN_PLUGIN_INFO))
36 #define NM_IS_VPN_PLUGIN_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_VPN_PLUGIN_INFO))
37 #define NM_VPN_PLUGIN_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_VPN_PLUGIN_INFO, NMVpnPluginInfoClass))
39 #define NM_VPN_PLUGIN_INFO_NAME "name"
40 #define NM_VPN_PLUGIN_INFO_FILENAME "filename"
41 #define NM_VPN_PLUGIN_INFO_KEYFILE "keyfile"
43 #define NM_VPN_PLUGIN_INFO_KF_GROUP_CONNECTION "VPN Connection"
44 #define NM_VPN_PLUGIN_INFO_KF_GROUP_LIBNM "libnm"
45 #define NM_VPN_PLUGIN_INFO_KF_GROUP_GNOME "GNOME"
59 } NMVpnPluginInfoClass NM_AVAILABLE_IN_1_2;
62 GType nm_vpn_plugin_info_get_type (void);
65 NMVpnPluginInfo *nm_vpn_plugin_info_new_from_file (const char *filename,
69 NMVpnPluginInfo *nm_vpn_plugin_info_new_with_data (const char *filename,
74 const char *nm_vpn_plugin_info_get_name (NMVpnPluginInfo *self);
76 const char *nm_vpn_plugin_info_get_filename (NMVpnPluginInfo *self);
78 const char *nm_vpn_plugin_info_get_plugin (NMVpnPluginInfo *self);
80 const char *nm_vpn_plugin_info_get_program (NMVpnPluginInfo *self);
82 gboolean nm_vpn_plugin_info_supports_multiple (NMVpnPluginInfo *self);
84 const char *nm_vpn_plugin_info_lookup_property (NMVpnPluginInfo *self, const char *group, const char *key);
87 gboolean nm_vpn_plugin_info_validate_filename (const char *filename);
90 GSList *nm_vpn_plugin_info_list_load (void);
92 gboolean nm_vpn_plugin_info_list_add (GSList **list, NMVpnPluginInfo *plugin_info, GError **error);
94 gboolean nm_vpn_plugin_info_list_remove (GSList **list, NMVpnPluginInfo *plugin_info);
96 NMVpnPluginInfo *nm_vpn_plugin_info_list_find_by_name (GSList *list, const char *name);
98 NMVpnPluginInfo *nm_vpn_plugin_info_list_find_by_filename (GSList *list, const char *filename);
100 NMVpnPluginInfo *nm_vpn_plugin_info_list_find_by_service (GSList *list, const char *service);
104 NMVpnEditorPlugin *nm_vpn_plugin_info_get_editor_plugin (NMVpnPluginInfo *self);
106 void nm_vpn_plugin_info_set_editor_plugin (NMVpnPluginInfo *self,
107 NMVpnEditorPlugin *plugin);
109 NMVpnEditorPlugin *nm_vpn_plugin_info_load_editor_plugin (NMVpnPluginInfo *self,
114 #endif /* __NM_VPN_PLUGIN_INFO_H__ */