Mercurial > pidgin.yaz
comparison libpurple/account.c @ 31820:28e27a37e4b4
Patch from Stefan Ott to add the account-authorization-requested-with-message
signal, which can be useful to plugins. Fixes #8690. I also slipped in some
ChangeLog.API tweaks.
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Sun, 09 Jan 2011 04:40:07 +0000 |
parents | 8714c0bfa52a |
children | 4f2aac5967bb |
comparison
equal
deleted
inserted
replaced
31819:5767e981508a | 31820:28e27a37e4b4 |
---|---|
1439 if (deny_cb != NULL) | 1439 if (deny_cb != NULL) |
1440 deny_cb(user_data); | 1440 deny_cb(user_data); |
1441 return NULL; | 1441 return NULL; |
1442 } | 1442 } |
1443 | 1443 |
1444 plugin_return = GPOINTER_TO_INT( | |
1445 purple_signal_emit_return_1( | |
1446 purple_accounts_get_handle(), | |
1447 "account-authorization-requested-with-message", | |
1448 account, remote_user, message | |
1449 )); | |
1450 | |
1451 switch (plugin_return) | |
1452 { | |
1453 case PURPLE_ACCOUNT_RESPONSE_IGNORE: | |
1454 return NULL; | |
1455 case PURPLE_ACCOUNT_RESPONSE_ACCEPT: | |
1456 if (auth_cb != NULL) | |
1457 auth_cb(user_data); | |
1458 return NULL; | |
1459 case PURPLE_ACCOUNT_RESPONSE_DENY: | |
1460 if (deny_cb != NULL) | |
1461 deny_cb(user_data); | |
1462 return NULL; | |
1463 } | |
1464 | |
1444 if (ui_ops != NULL && ui_ops->request_authorize != NULL) { | 1465 if (ui_ops != NULL && ui_ops->request_authorize != NULL) { |
1445 info = g_new0(PurpleAccountRequestInfo, 1); | 1466 info = g_new0(PurpleAccountRequestInfo, 1); |
1446 info->type = PURPLE_ACCOUNT_REQUEST_AUTHORIZATION; | 1467 info->type = PURPLE_ACCOUNT_REQUEST_AUTHORIZATION; |
1447 info->account = account; | 1468 info->account = account; |
1448 info->auth_cb = auth_cb; | 1469 info->auth_cb = auth_cb; |
3044 purple_value_new(PURPLE_TYPE_INT), 2, | 3065 purple_value_new(PURPLE_TYPE_INT), 2, |
3045 purple_value_new(PURPLE_TYPE_SUBTYPE, | 3066 purple_value_new(PURPLE_TYPE_SUBTYPE, |
3046 PURPLE_SUBTYPE_ACCOUNT), | 3067 PURPLE_SUBTYPE_ACCOUNT), |
3047 purple_value_new(PURPLE_TYPE_STRING)); | 3068 purple_value_new(PURPLE_TYPE_STRING)); |
3048 | 3069 |
3070 purple_signal_register(handle, "account-authorization-requested-with-message", | |
3071 purple_marshal_INT__POINTER_POINTER_POINTER, | |
3072 purple_value_new(PURPLE_TYPE_INT), 3, | |
3073 purple_value_new(PURPLE_TYPE_SUBTYPE, | |
3074 PURPLE_SUBTYPE_ACCOUNT), | |
3075 purple_value_new(PURPLE_TYPE_STRING), | |
3076 purple_value_new(PURPLE_TYPE_STRING)); | |
3049 purple_signal_register(handle, "account-authorization-denied", | 3077 purple_signal_register(handle, "account-authorization-denied", |
3050 purple_marshal_VOID__POINTER_POINTER, NULL, 2, | 3078 purple_marshal_VOID__POINTER_POINTER, NULL, 2, |
3051 purple_value_new(PURPLE_TYPE_SUBTYPE, | 3079 purple_value_new(PURPLE_TYPE_SUBTYPE, |
3052 PURPLE_SUBTYPE_ACCOUNT), | 3080 PURPLE_SUBTYPE_ACCOUNT), |
3053 purple_value_new(PURPLE_TYPE_STRING)); | 3081 purple_value_new(PURPLE_TYPE_STRING)); |