diff libgaim/account.h @ 15057:f227feab8c78

[gaim-migrate @ 17841] Ok... let's throw this to the wild. Support for "So-and-so want's authorization" in the core. It creates a new mini-dialog in the blist for this with an Authorize and Deny button, which do as you might imagine. Clicking Authorize will also spawn an "Add buddy" dialog if that person isn't already a buddy. I'm not sure I like this, since I never add buddies that I authorize, but it seems the best option. I considered a checkbox in the dialog (but it only applies when you hit "Authorize," which could be weird), and a third "Authorize and Add" button (but that was too big for the blist). I'll come back to the UI later, I'm sure. I'd like to see that the prpl changes all work. Yahoo, especially, looked confusing, and had the most changes. I'm mostly happy with this. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Wed, 29 Nov 2006 01:13:21 +0000
parents 8c5c4d7d53a5
children a9e9633f394e
line wrap: on
line diff
--- a/libgaim/account.h	Tue Nov 28 21:29:12 2006 +0000
+++ b/libgaim/account.h	Wed Nov 29 01:13:21 2006 +0000
@@ -27,6 +27,7 @@
 #ifndef _GAIM_ACCOUNT_H_
 #define _GAIM_ACCOUNT_H_
 
+#include <glib-object.h>
 #include <glib.h>
 
 typedef struct _GaimAccountUiOps GaimAccountUiOps;
@@ -51,6 +52,9 @@
 	void (*request_add)(GaimAccount *account, const char *remote_user,
 	                    const char *id, const char *alias,
 	                    const char *message);
+	void (*request_authorize)(GaimAccount *account, const char *remote_user, const char *id,
+				 const char *alias, const char *message, 
+				 GCallback authorize_cb, GCallback deny_cb, void *user_data);
 };
 
 struct _GaimAccount
@@ -170,6 +174,27 @@
 void gaim_account_request_add(GaimAccount *account, const char *remote_user,
                               const char *id, const char *alias,
                               const char *message);
+
+/**
+ * Notifies the user that a remote user has wants to add the local user
+ * to his or her buddy list and requires authorization to d oso.
+ *
+ * This will present a dialog informing the usre of this and ask if the 
+ * user authorizes or denies the remote user from adding him.
+ *
+ * @param account      The account that was added
+ * @param remote_user  The name of the usre that added this account.
+ * @param id           The optional ID of the local account. Rarely used.
+ * @param alias        The optional alias of the remote user.
+ * @param message      The optional message sent from the uer requesting you
+ * @param auth_cb      The callback called when the local user accepts
+ * @param deny_cb      The callback called when the local user rejects
+ * @param user_data    Data to be passed back to the above callbacks
+ */
+void gaim_account_request_authorization(GaimAccount *account, const char *remote_user,
+					const char *id, const char *alias, const char *message,
+					GCallback auth_cb, GCallback deny_cb, void *user_data);
+
 /**
  * Requests information from the user to change the account's password.
  *