mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-21 10:14:41 +00:00
libnm-util: make nm_setting_vpn_remove_*() return gboolean instead of void
to match other property removal functions, like nm_setting_bond_remove_option() or nm_setting_wired_remove_s390_option(). Note: This is an API change, make sure to bump soname when releasing libnm-util.
This commit is contained in:
parent
228f6459e1
commit
f17ab954f6
|
@ -223,13 +223,16 @@ nm_setting_vpn_get_data_item (NMSettingVPN *setting, const char *key)
|
|||
*
|
||||
* Deletes a key/value relationship previously established by
|
||||
* nm_setting_vpn_add_data_item().
|
||||
*
|
||||
* Returns: %TRUE if the data item was found and removed from the internal list,
|
||||
* %FALSE if it was not.
|
||||
**/
|
||||
void
|
||||
gboolean
|
||||
nm_setting_vpn_remove_data_item (NMSettingVPN *setting, const char *key)
|
||||
{
|
||||
g_return_if_fail (NM_IS_SETTING_VPN (setting));
|
||||
g_return_val_if_fail (NM_IS_SETTING_VPN (setting), FALSE);
|
||||
|
||||
g_hash_table_remove (NM_SETTING_VPN_GET_PRIVATE (setting)->data, key);
|
||||
return g_hash_table_remove (NM_SETTING_VPN_GET_PRIVATE (setting)->data, key);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -347,13 +350,16 @@ nm_setting_vpn_get_secret (NMSettingVPN *setting, const char *key)
|
|||
*
|
||||
* Deletes a key/value relationship previously established by
|
||||
* nm_setting_vpn_add_secret().
|
||||
*
|
||||
* Returns: %TRUE if the secret was found and removed from the internal list,
|
||||
* %FALSE if it was not.
|
||||
**/
|
||||
void
|
||||
gboolean
|
||||
nm_setting_vpn_remove_secret (NMSettingVPN *setting, const char *key)
|
||||
{
|
||||
g_return_if_fail (NM_IS_SETTING_VPN (setting));
|
||||
g_return_val_if_fail (NM_IS_SETTING_VPN (setting), FALSE);
|
||||
|
||||
g_hash_table_remove (NM_SETTING_VPN_GET_PRIVATE (setting)->secrets, key);
|
||||
return g_hash_table_remove (NM_SETTING_VPN_GET_PRIVATE (setting)->secrets, key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* (C) Copyright 2007 - 2011 Red Hat, Inc.
|
||||
* (C) Copyright 2007 - 2013 Red Hat, Inc.
|
||||
* (C) Copyright 2007 - 2008 Novell, Inc.
|
||||
*/
|
||||
|
||||
|
@ -95,7 +95,7 @@ void nm_setting_vpn_add_data_item (NMSettingVPN *setting,
|
|||
const char *item);
|
||||
const char * nm_setting_vpn_get_data_item (NMSettingVPN *setting,
|
||||
const char *key);
|
||||
void nm_setting_vpn_remove_data_item (NMSettingVPN *setting,
|
||||
gboolean nm_setting_vpn_remove_data_item (NMSettingVPN *setting,
|
||||
const char *key);
|
||||
void nm_setting_vpn_foreach_data_item (NMSettingVPN *setting,
|
||||
NMVPNIterFunc func,
|
||||
|
@ -107,7 +107,7 @@ void nm_setting_vpn_add_secret (NMSettingVPN *setting,
|
|||
const char *secret);
|
||||
const char * nm_setting_vpn_get_secret (NMSettingVPN *setting,
|
||||
const char *key);
|
||||
void nm_setting_vpn_remove_secret (NMSettingVPN *setting,
|
||||
gboolean nm_setting_vpn_remove_secret (NMSettingVPN *setting,
|
||||
const char *key);
|
||||
void nm_setting_vpn_foreach_secret (NMSettingVPN *setting,
|
||||
NMVPNIterFunc func,
|
||||
|
|
Loading…
Reference in a new issue