libnm/vpn: add annotations for new NMVpnServicePlugin API
This commit is contained in:
@@ -114,6 +114,8 @@ nm_vpn_service_plugin_set_connection (NMVpnServicePlugin *plugin,
|
||||
* nm_vpn_service_plugin_get_connection:
|
||||
*
|
||||
* Returns: (transfer full):
|
||||
*
|
||||
* Since: 1.2
|
||||
*/
|
||||
GDBusConnection *
|
||||
nm_vpn_service_plugin_get_connection (NMVpnServicePlugin *plugin)
|
||||
@@ -603,6 +605,8 @@ impl_vpn_service_plugin_new_secrets (NMVpnServicePlugin *plugin,
|
||||
* request new secrets when the secrets originally provided by NetworkManager
|
||||
* are insufficient, or the VPN process indicates that it needs additional
|
||||
* information to complete the request.
|
||||
*
|
||||
* Since: 1.2
|
||||
*/
|
||||
void
|
||||
nm_vpn_service_plugin_secrets_required (NMVpnServicePlugin *plugin,
|
||||
@@ -655,6 +659,8 @@ free_secret (gpointer data)
|
||||
* an applet when the applet calls the authentication dialog of the VPN plugin.
|
||||
*
|
||||
* Returns: %TRUE if reading values was successful, %FALSE if not
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
gboolean
|
||||
nm_vpn_service_plugin_read_vpn_details (int fd,
|
||||
@@ -756,6 +762,8 @@ nm_vpn_service_plugin_read_vpn_details (int fd,
|
||||
*
|
||||
* Returns: %TRUE if the flag data item was found and successfully converted
|
||||
* to flags, %FALSE if not
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
gboolean
|
||||
nm_vpn_service_plugin_get_secret_flags (GHashTable *data,
|
||||
@@ -1085,6 +1093,8 @@ nm_vpn_service_plugin_class_init (NMVpnServicePluginClass *plugin_class)
|
||||
* NMVpnServicePlugin:service-name:
|
||||
*
|
||||
* The D-Bus service name of this plugin.
|
||||
*
|
||||
* Since: 1.2
|
||||
*/
|
||||
g_object_class_install_property
|
||||
(object_class, PROP_DBUS_SERVICE_NAME,
|
||||
@@ -1098,6 +1108,8 @@ nm_vpn_service_plugin_class_init (NMVpnServicePluginClass *plugin_class)
|
||||
* NMVpnServicePlugin:state:
|
||||
*
|
||||
* The state of the plugin.
|
||||
*
|
||||
* Since: 1.2
|
||||
*/
|
||||
g_object_class_install_property
|
||||
(object_class, PROP_STATE,
|
||||
|
@@ -39,94 +39,122 @@ G_BEGIN_DECLS
|
||||
#define NM_VPN_SERVICE_PLUGIN_STATE "state"
|
||||
|
||||
typedef struct {
|
||||
NM_AVAILABLE_IN_1_2
|
||||
GObject parent;
|
||||
} NMVpnServicePlugin;
|
||||
} NMVpnServicePlugin NM_AVAILABLE_IN_1_2;
|
||||
|
||||
typedef struct {
|
||||
NM_AVAILABLE_IN_1_2
|
||||
GObjectClass parent;
|
||||
|
||||
/* Signals */
|
||||
NM_AVAILABLE_IN_1_2
|
||||
void (*state_changed) (NMVpnServicePlugin *plugin,
|
||||
NMVpnServiceState state);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
void (*ip4_config) (NMVpnServicePlugin *plugin,
|
||||
GVariant *ip4_config);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
void (*login_banner) (NMVpnServicePlugin *plugin,
|
||||
const char *banner);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
void (*failure) (NMVpnServicePlugin *plugin,
|
||||
NMVpnPluginFailure reason);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
void (*quit) (NMVpnServicePlugin *plugin);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
void (*config) (NMVpnServicePlugin *plugin,
|
||||
GVariant *config);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
void (*ip6_config) (NMVpnServicePlugin *plugin,
|
||||
GVariant *config);
|
||||
|
||||
/* virtual methods */
|
||||
NM_AVAILABLE_IN_1_2
|
||||
gboolean (*connect) (NMVpnServicePlugin *plugin,
|
||||
NMConnection *connection,
|
||||
GError **err);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
gboolean (*need_secrets) (NMVpnServicePlugin *plugin,
|
||||
NMConnection *connection,
|
||||
const char **setting_name,
|
||||
GError **error);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
gboolean (*disconnect) (NMVpnServicePlugin *plugin,
|
||||
GError **err);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
gboolean (*new_secrets) (NMVpnServicePlugin *plugin,
|
||||
NMConnection *connection,
|
||||
GError **error);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
gboolean (*connect_interactive) (NMVpnServicePlugin *plugin,
|
||||
NMConnection *connection,
|
||||
GVariant *details,
|
||||
GError **error);
|
||||
|
||||
/*< private >*/
|
||||
NM_AVAILABLE_IN_1_2
|
||||
gpointer padding[8];
|
||||
} NMVpnServicePluginClass;
|
||||
} NMVpnServicePluginClass NM_AVAILABLE_IN_1_2;
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
GType nm_vpn_service_plugin_get_type (void);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
GDBusConnection *nm_vpn_service_plugin_get_connection (NMVpnServicePlugin *plugin);
|
||||
NM_AVAILABLE_IN_1_2
|
||||
NMVpnServiceState nm_vpn_service_plugin_get_state (NMVpnServicePlugin *plugin);
|
||||
NM_AVAILABLE_IN_1_2
|
||||
void nm_vpn_service_plugin_set_state (NMVpnServicePlugin *plugin,
|
||||
NMVpnServiceState state);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
void nm_vpn_service_plugin_secrets_required (NMVpnServicePlugin *plugin,
|
||||
const char *message,
|
||||
const char **hints);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
void nm_vpn_service_plugin_set_login_banner (NMVpnServicePlugin *plugin,
|
||||
const char *banner);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
void nm_vpn_service_plugin_failure (NMVpnServicePlugin *plugin,
|
||||
NMVpnPluginFailure reason);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
void nm_vpn_service_plugin_set_config (NMVpnServicePlugin *plugin,
|
||||
GVariant *config);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
void nm_vpn_service_plugin_set_ip4_config (NMVpnServicePlugin *plugin,
|
||||
GVariant *ip4_config);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
void nm_vpn_service_plugin_set_ip6_config (NMVpnServicePlugin *plugin,
|
||||
GVariant *ip6_config);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
gboolean nm_vpn_service_plugin_disconnect (NMVpnServicePlugin *plugin,
|
||||
GError **err);
|
||||
|
||||
/* Utility functions */
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
gboolean nm_vpn_service_plugin_read_vpn_details (int fd,
|
||||
GHashTable **out_data,
|
||||
GHashTable **out_secrets);
|
||||
|
||||
NM_AVAILABLE_IN_1_2
|
||||
gboolean nm_vpn_service_plugin_get_secret_flags (GHashTable *data,
|
||||
const char *secret_name,
|
||||
NMSettingSecretFlags *out_flags);
|
||||
|
Reference in New Issue
Block a user