diff src/account.h @ 12285:af257d8679fe

[gaim-migrate @ 14589] Ok, so I'm changing the semantics of gaim_account_notify_added, having it check for the existance of a buddy was breaking some jabber scenarios. So buddy checks should now be done in the prpls. I also added a gaim_account_request_add. _notify_added only notifies the user of the add, request_add notifies the user AND asks them if they want to add the buddy to their buddy list. I only updated jabber for these changes because it's the only protocol I really know at all well. So everyone PLEASE make sure that the other protocols get updated for this. That is make sure that when you expect to prompt the user to add the buddy you use _request_add instead of just using _notify_added and expecting the core to determine if it needs to prompt the user. Oh, there are also some other jabber changes which should hopefully fix some issues that people were seeing, like buddies not signing off when you unsubscribed with them, etc. Let me know if anyone notices any jabber oddities after this. committer: Tailor Script <tailor@pidgin.im>
author Etan Reisner <pidgin@unreliablesource.net>
date Thu, 01 Dec 2005 20:09:27 +0000
parents 4baf0aa3158e
children 255e6912607b
line wrap: on
line diff
--- a/src/account.h	Thu Dec 01 19:55:35 2005 +0000
+++ b/src/account.h	Thu Dec 01 20:09:27 2005 +0000
@@ -42,10 +42,15 @@
 
 struct _GaimAccountUiOps
 {
+	/* A buddy we already have added us to their buddy list. */
 	void (*notify_added)(GaimAccount *account, const char *remote_user,
-						 const char *id, const char *alias,
-						 const char *message);
+	                     const char *id, const char *alias,
+	                     const char *message);
 	void (*status_changed)(GaimAccount *account, GaimStatus *status);
+	/* Someone we don't have on our list added us. Will prompt to add them. */
+	void (*request_add)(GaimAccount *account, const char *remote_user,
+	                    const char *id, const char *alis,
+	                    const char *message);
 };
 
 struct _GaimAccount
@@ -134,8 +139,8 @@
  * Notifies the user that the account was added to a remote user's
  * buddy list.
  *
- * This will present a dialog so that the local user can add the buddy,
- * if not already added.
+ * This will present a dialog informing the user that he was added to the
+ * remote user's buddy list.
  *
  * @param account The account that was added.
  * @param remote_user The name of the user that added this account.
@@ -144,10 +149,28 @@
  * @param message     The optional message sent from the user adding you.
  */
 void gaim_account_notify_added(GaimAccount *account, const char *remote_user,
-							   const char *id, const char *alias,
-							   const char *message);
+                               const char *id, const char *alias,
+                               const char *message);
 
 /**
+ * Notifies the user that the account was addded to a remote user's buddy
+ * list and asks ther user if they want to add the remote user to their buddy
+ * list.
+ *
+ * This will present a dialog informing the local user that the remote user
+ * added them to the remote user's buddy list and will ask if they want to add
+ * the remote user to the buddy list.
+ *
+ * @param account     The account that was added.
+ * @param remote_user The name of the user that added this account.
+ * @param id          The optional ID of the local account. Rarely used.
+ * @param alias       The optional alias of the user.
+ * @param message     The optional message sent from the user adding you.
+ */
+void gaim_account_request_add(GaimAccount *account, const char *remote_user,
+                              const char *id, const char *alias,
+                              const char *message);
+/**
  * Requests information from the user to change the account's password.
  *
  * @param account The account to change the password on.