Mercurial > pidgin
changeset 9514:1fac0336890c
[gaim-migrate @ 10341]
Gary Kramlich writes:
" This patch modifies the chat-invited signal to also
give out the GHashTable of the chat components so a
call back can successful join a chat when the signal is
emited."
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Mon, 12 Jul 2004 02:40:12 +0000 |
parents | ac94e3f5ac8a |
children | 425000e11511 |
files | doc/conversation-signals.dox plugins/ChangeLog.API plugins/signals-test.c src/conversation.c src/server.c src/signals.c src/signals.h |
diffstat | 7 files changed, 29 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/conversation-signals.dox Sun Jul 11 21:47:10 2004 +0000 +++ b/doc/conversation-signals.dox Mon Jul 12 02:40:12 2004 +0000 @@ -406,7 +406,8 @@ @signaldef chat-invited @signalproto void (*chat_invited)(GaimAccount *account, const char *inviter, - const char *chat, const char *invite_message); + const char *chat, const char *invite_message + const GHastTable *components); @endsignalproto @signaldesc Emitted when an account was invited to a chat. @@ -414,6 +415,8 @@ @param inviter The username of the person inviting the account. @param chat The name of the chat you're being invited to. @param invite_message The optional invite message. + @param components The components necessary if you want to call + serv_join_chat @endsignaldef @signaldef chat-joined
--- a/plugins/ChangeLog.API Sun Jul 11 21:47:10 2004 +0000 +++ b/plugins/ChangeLog.API Mon Jul 12 02:40:12 2004 +0000 @@ -5,6 +5,7 @@ * Removed: PRPL numbers : gaim_account_set_protocol(), gaim_account_get_protocol(), gaim_accounts_find_with_prpl_num, gaim_prpl_num_to_id(), gaim_prpl_id_to_num(), GaimProtocol + * Changed: chat-invited signal changed. See make docs for details Protocol Plugin API: v6 * Added: can_receive_file & send_file to the GaimPluginProtocolInfo struct
--- a/plugins/signals-test.c Sun Jul 11 21:47:10 2004 +0000 +++ b/plugins/signals-test.c Mon Jul 12 02:40:12 2004 +0000 @@ -392,7 +392,8 @@ static void chat_invited_cb(GaimAccount *account, const char *inviter, - const char *room_name, const char *message, void *data) + const char *room_name, const char *message, + const GHashTable *components, void *data) { gaim_debug_misc("signals test", "chat-invited (%s, %s, %s, %s)\n", gaim_account_get_username(account), inviter,
--- a/src/conversation.c Sun Jul 11 21:47:10 2004 +0000 +++ b/src/conversation.c Mon Jul 12 02:40:12 2004 +0000 @@ -2835,13 +2835,14 @@ gaim_value_new(GAIM_TYPE_STRING)); gaim_signal_register(handle, "chat-invited", - gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER, - NULL, 4, + gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER_POINTER, + NULL, 5, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_ACCOUNT), gaim_value_new(GAIM_TYPE_STRING), gaim_value_new(GAIM_TYPE_STRING), - gaim_value_new(GAIM_TYPE_STRING)); + gaim_value_new(GAIM_TYPE_STRING), + gaim_value_new(GAIM_TYPE_POINTER)); gaim_signal_register(handle, "chat-joined", gaim_marshal_VOID__POINTER, NULL, 1,
--- a/src/server.c Sun Jul 11 21:47:10 2004 +0000 +++ b/src/server.c Mon Jul 12 02:40:12 2004 +0000 @@ -1441,7 +1441,7 @@ account = gaim_connection_get_account(gc); gaim_signal_emit(gaim_conversations_get_handle(), - "chat-invited", account, who, name, message); + "chat-invited", account, who, name, message, data); if (message) g_snprintf(buf2, sizeof(buf2),
--- a/src/signals.c Sun Jul 11 21:47:10 2004 +0000 +++ b/src/signals.c Mon Jul 12 02:40:12 2004 +0000 @@ -635,6 +635,21 @@ } void +gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER_POINTER(GaimCallback cb, + va_list args, + void *data, + void **return_val) +{ + void *arg1 = va_arg(args, void *); + void *arg2 = va_arg(args, void *); + void *arg3 = va_arg(args, void *); + void *arg4 = va_arg(args, void *); + void *arg5 = va_arg(args, void *); + + ((void (*)(void *, void *, void *, void *, void *, void *))cb)(arg1, arg2, arg3, arg4, arg5, data); +} + +void gaim_marshal_VOID__POINTER_POINTER_POINTER_UINT(GaimCallback cb, va_list args, void *data,
--- a/src/signals.h Sun Jul 11 21:47:10 2004 +0000 +++ b/src/signals.h Mon Jul 12 02:40:12 2004 +0000 @@ -229,6 +229,8 @@ GaimCallback cb, va_list args, void *data, void **return_val); void gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER( GaimCallback cb, va_list args, void *data, void **return_val); +void gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER_POINTER( + GaimCallback cb, va_list args, void *data, void **return_val); void gaim_marshal_VOID__POINTER_POINTER_POINTER_UINT( GaimCallback cb, va_list args, void *data, void **return_val); void gaim_marshal_VOID__POINTER_POINTER_POINTER_UINT_UINT(