From fa295e3620bdf928b6a853ec7e42b8c7fc5262be Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 10 Oct 2009 14:39:51 +0100 Subject: Added imcb_ask_auth() instead of reimplementing authorization requests in every protocol module. --- protocols/nogaim.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'protocols/nogaim.h') diff --git a/protocols/nogaim.h b/protocols/nogaim.h index ddfff07e..1e5df503 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -223,6 +223,10 @@ struct prpl { /* Mainly for AOL, since they think "Bung hole" == "Bu ngho le". *sigh* * - Most protocols will just want to set this to g_strcasecmp().*/ int (* handle_cmp) (const char *who1, const char *who2); + + /* Implement these callbacks if you want to use imcb_ask_auth() */ + void (* auth_allow) (struct im_connection *, const char *who); + void (* auth_deny) (struct im_connection *, const char *who); }; /* im_api core stuff. */ @@ -251,13 +255,20 @@ G_MODULE_EXPORT void imc_logout( struct im_connection *ic, int allow_reconnect ) G_MODULE_EXPORT void imcb_log( struct im_connection *ic, char *format, ... ) G_GNUC_PRINTF( 2, 3 ); /* To tell the user an error, ie. before logging out when an error occurs. */ G_MODULE_EXPORT void imcb_error( struct im_connection *ic, char *format, ... ) G_GNUC_PRINTF( 2, 3 ); + /* To ask a your about something. * - 'msg' is the question. * - 'data' can be your custom struct - it will be passed to the callbacks. * - 'doit' or 'dont' will be called depending of the answer of the user. */ G_MODULE_EXPORT void imcb_ask( struct im_connection *ic, char *msg, void *data, query_callback doit, query_callback dont ); -G_MODULE_EXPORT void imcb_ask_add( struct im_connection *ic, char *handle, const char *realname ); + +/* Two common questions you may want to ask: + * - X added you to his contact list, allow? + * - X is not in your contact list, want to add? + */ +G_MODULE_EXPORT void imcb_ask_auth( struct im_connection *ic, const char *handle, const char *realname ); +G_MODULE_EXPORT void imcb_ask_add( struct im_connection *ic, const char *handle, const char *realname ); /* Buddy management */ /* This function should be called for each handle which are visible to the -- cgit v1.2.3 From b75acf6367400ff88428618719cefbbee648b0cb Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 22 Oct 2009 22:55:23 +0100 Subject: Don't include chat.h from bitlbee.h. make install-dev doesn't install chat.h and it shouldn't ... but things broke because bitlbee.h includes it. Fixes #534. --- protocols/nogaim.h | 1 + 1 file changed, 1 insertion(+) (limited to 'protocols/nogaim.h') diff --git a/protocols/nogaim.h b/protocols/nogaim.h index 1e5df503..ade8c23f 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -43,6 +43,7 @@ #include "proxy.h" #include "query.h" #include "md5.h" +#include "chat.h" #define BUDDY_ALIAS_MAXLEN 388 /* because MSN names can be 387 characters */ -- cgit v1.2.3 From 4cf80bb798a4159f42a904cb830b99c87a0ca8e0 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Fri, 23 Oct 2009 11:43:15 +0100 Subject: Shuffling a few more #includes. Much more shuffling will be needed. --- protocols/nogaim.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/nogaim.h') diff --git a/protocols/nogaim.h b/protocols/nogaim.h index ade8c23f..dc6154e2 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -38,12 +38,12 @@ #ifndef _NOGAIM_H #define _NOGAIM_H +#include + #include "bitlbee.h" #include "account.h" #include "proxy.h" #include "query.h" -#include "md5.h" -#include "chat.h" #define BUDDY_ALIAS_MAXLEN 388 /* because MSN names can be 387 characters */ -- cgit v1.2.3