Commit f17ab954 authored by Jiří Klimeš's avatar Jiří Klimeš

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.
parent 228f6459
...@@ -223,13 +223,16 @@ nm_setting_vpn_get_data_item (NMSettingVPN *setting, const char *key) ...@@ -223,13 +223,16 @@ nm_setting_vpn_get_data_item (NMSettingVPN *setting, const char *key)
* *
* Deletes a key/value relationship previously established by * Deletes a key/value relationship previously established by
* nm_setting_vpn_add_data_item(). * 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) 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 static void
...@@ -347,13 +350,16 @@ nm_setting_vpn_get_secret (NMSettingVPN *setting, const char *key) ...@@ -347,13 +350,16 @@ nm_setting_vpn_get_secret (NMSettingVPN *setting, const char *key)
* *
* Deletes a key/value relationship previously established by * Deletes a key/value relationship previously established by
* nm_setting_vpn_add_secret(). * 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) 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 @@ ...@@ -19,7 +19,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA. * 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. * (C) Copyright 2007 - 2008 Novell, Inc.
*/ */
...@@ -95,7 +95,7 @@ void nm_setting_vpn_add_data_item (NMSettingVPN *setting, ...@@ -95,7 +95,7 @@ void nm_setting_vpn_add_data_item (NMSettingVPN *setting,
const char *item); const char *item);
const char * nm_setting_vpn_get_data_item (NMSettingVPN *setting, const char * nm_setting_vpn_get_data_item (NMSettingVPN *setting,
const char *key); const char *key);
void nm_setting_vpn_remove_data_item (NMSettingVPN *setting, gboolean nm_setting_vpn_remove_data_item (NMSettingVPN *setting,
const char *key); const char *key);
void nm_setting_vpn_foreach_data_item (NMSettingVPN *setting, void nm_setting_vpn_foreach_data_item (NMSettingVPN *setting,
NMVPNIterFunc func, NMVPNIterFunc func,
...@@ -107,7 +107,7 @@ void nm_setting_vpn_add_secret (NMSettingVPN *setting, ...@@ -107,7 +107,7 @@ void nm_setting_vpn_add_secret (NMSettingVPN *setting,
const char *secret); const char *secret);
const char * nm_setting_vpn_get_secret (NMSettingVPN *setting, const char * nm_setting_vpn_get_secret (NMSettingVPN *setting,
const char *key); const char *key);
void nm_setting_vpn_remove_secret (NMSettingVPN *setting, gboolean nm_setting_vpn_remove_secret (NMSettingVPN *setting,
const char *key); const char *key);
void nm_setting_vpn_foreach_secret (NMSettingVPN *setting, void nm_setting_vpn_foreach_secret (NMSettingVPN *setting,
NMVPNIterFunc func, NMVPNIterFunc func,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment