diff src/account.c @ 7015:dece74f05509

[gaim-migrate @ 7578] Further core/UI splittage. show_got_added() -> gaim_account_notify_added() committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 29 Sep 2003 15:28:20 +0000
parents 0c5637b5462e
children 7fdac700deb1
line wrap: on
line diff
--- a/src/account.c	Mon Sep 29 15:23:19 2003 +0000
+++ b/src/account.c	Mon Sep 29 15:28:20 2003 +0000
@@ -81,6 +81,9 @@
 
 } AccountParserData;
 
+
+static GaimAccountUiOps *account_ui_ops = NULL;
+
 static GList   *accounts = NULL;
 static guint    accounts_save_timer = 0;
 static gboolean accounts_loaded = FALSE;
@@ -230,6 +233,22 @@
 }
 
 void
+gaim_account_notify_added(GaimAccount *account, const char *remote_user,
+						  const char *id, const char *alias,
+						  const char *message)
+{
+	GaimAccountUiOps *ui_ops;
+
+	g_return_if_fail(account     != NULL);
+	g_return_if_fail(remote_user != NULL);
+
+	ui_ops = gaim_accounts_get_ui_ops();
+
+	if (ui_ops != NULL && ui_ops->notify_added != NULL)
+		ui_ops->notify_added(account, remote_user, id, alias, message);
+}
+
+void
 gaim_account_set_username(GaimAccount *account, const char *username)
 {
 	g_return_if_fail(account != NULL);
@@ -1446,6 +1465,18 @@
 	return account;
 }
 
+void
+gaim_accounts_set_ui_ops(GaimAccountUiOps *ops)
+{
+	account_ui_ops = ops;
+}
+
+GaimAccountUiOps *
+gaim_accounts_get_ui_ops(void)
+{
+	return account_ui_ops;
+}
+
 void *
 gaim_accounts_get_handle(void)
 {