changeset 5694:2d0d96c5a7a7

[gaim-migrate @ 6115] Added a function to clear all protocol settings from an account. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 03 Jun 2003 07:44:42 +0000
parents 0b5318235562
children e42535701e25
files src/account.c src/account.h
diffstat 2 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/account.c	Tue Jun 03 06:51:52 2003 +0000
+++ b/src/account.c	Tue Jun 03 07:44:42 2003 +0000
@@ -308,6 +308,17 @@
 }
 
 void
+gaim_account_clear_settings(GaimAccount *account)
+{
+	g_return_if_fail(account != NULL);
+
+	g_hash_table_destroy(account->settings);
+
+	account->settings = g_hash_table_new_full(g_str_hash, g_str_equal,
+											  g_free, __delete_setting);
+}
+
+void
 gaim_account_set_int(GaimAccount *account, const char *name, int value)
 {
 	GaimAccountSetting *setting;
--- a/src/account.h	Tue Jun 03 06:51:52 2003 +0000
+++ b/src/account.h	Tue Jun 03 07:44:42 2003 +0000
@@ -169,6 +169,13 @@
 void gaim_account_set_proxy_info(GaimAccount *account, GaimProxyInfo *info);
 
 /**
+ * Clears all protocol-specific settings on an account.
+ *
+ * @param account The account.
+ */
+void gaim_account_clear_settings(GaimAccount *account);
+
+/**
  * Sets a protocol-specific integer setting for an account.
  *
  * @param account The account.