comparison 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
comparison
equal deleted inserted replaced
12284:ecd471d1eeec 12285:af257d8679fe
40 #include "prpl.h" 40 #include "prpl.h"
41 #include "status.h" 41 #include "status.h"
42 42
43 struct _GaimAccountUiOps 43 struct _GaimAccountUiOps
44 { 44 {
45 /* A buddy we already have added us to their buddy list. */
45 void (*notify_added)(GaimAccount *account, const char *remote_user, 46 void (*notify_added)(GaimAccount *account, const char *remote_user,
46 const char *id, const char *alias, 47 const char *id, const char *alias,
47 const char *message); 48 const char *message);
48 void (*status_changed)(GaimAccount *account, GaimStatus *status); 49 void (*status_changed)(GaimAccount *account, GaimStatus *status);
50 /* Someone we don't have on our list added us. Will prompt to add them. */
51 void (*request_add)(GaimAccount *account, const char *remote_user,
52 const char *id, const char *alis,
53 const char *message);
49 }; 54 };
50 55
51 struct _GaimAccount 56 struct _GaimAccount
52 { 57 {
53 char *username; /**< The username. */ 58 char *username; /**< The username. */
132 137
133 /** 138 /**
134 * Notifies the user that the account was added to a remote user's 139 * Notifies the user that the account was added to a remote user's
135 * buddy list. 140 * buddy list.
136 * 141 *
137 * This will present a dialog so that the local user can add the buddy, 142 * This will present a dialog informing the user that he was added to the
138 * if not already added. 143 * remote user's buddy list.
139 * 144 *
140 * @param account The account that was added. 145 * @param account The account that was added.
141 * @param remote_user The name of the user that added this account. 146 * @param remote_user The name of the user that added this account.
142 * @param id The optional ID of the local account. Rarely used. 147 * @param id The optional ID of the local account. Rarely used.
143 * @param alias The optional alias of the user. 148 * @param alias The optional alias of the user.
144 * @param message The optional message sent from the user adding you. 149 * @param message The optional message sent from the user adding you.
145 */ 150 */
146 void gaim_account_notify_added(GaimAccount *account, const char *remote_user, 151 void gaim_account_notify_added(GaimAccount *account, const char *remote_user,
147 const char *id, const char *alias, 152 const char *id, const char *alias,
148 const char *message); 153 const char *message);
149 154
155 /**
156 * Notifies the user that the account was addded to a remote user's buddy
157 * list and asks ther user if they want to add the remote user to their buddy
158 * list.
159 *
160 * This will present a dialog informing the local user that the remote user
161 * added them to the remote user's buddy list and will ask if they want to add
162 * the remote user to the buddy list.
163 *
164 * @param account The account that was added.
165 * @param remote_user The name of the user that added this account.
166 * @param id The optional ID of the local account. Rarely used.
167 * @param alias The optional alias of the user.
168 * @param message The optional message sent from the user adding you.
169 */
170 void gaim_account_request_add(GaimAccount *account, const char *remote_user,
171 const char *id, const char *alias,
172 const char *message);
150 /** 173 /**
151 * Requests information from the user to change the account's password. 174 * Requests information from the user to change the account's password.
152 * 175 *
153 * @param account The account to change the password on. 176 * @param account The account to change the password on.
154 */ 177 */