diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2011-11-16 08:59:33 +0000 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2011-11-18 10:40:59 +0000 |
commit | e34be9ed3748699425ee4c4565c6a01a65f4d6d5 (patch) | |
tree | 999c193dd34a5ead5d4510dcc886d637d716513d | |
parent | 502b3aa449dc9a2bfafd68eedf46531f31071432 (diff) |
Porter: add stanza being sent to ::sending
This is useful in writing an XMPP console for Gabble.
-rw-r--r-- | wocky/wocky-c2s-porter.c | 4 | ||||
-rw-r--r-- | wocky/wocky-porter.c | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/wocky/wocky-c2s-porter.c b/wocky/wocky-c2s-porter.c index bd9d68d..9f2ad30 100644 --- a/wocky/wocky-c2s-porter.c +++ b/wocky/wocky-c2s-porter.c @@ -632,7 +632,7 @@ send_head_stanza (WockyC2SPorter *self) wocky_xmpp_connection_send_stanza_async (priv->connection, elem->stanza, elem->cancellable, send_stanza_cb, g_object_ref (self)); - g_signal_emit_by_name (self, "sending"); + g_signal_emit_by_name (self, "sending", elem->stanza); } static void @@ -2154,7 +2154,7 @@ wocky_c2s_porter_send_whitespace_ping_async (WockyC2SPorter *self, wocky_xmpp_connection_send_whitespace_ping_async (priv->connection, cancellable, send_whitespace_ping_cb, g_object_ref (result)); - g_signal_emit_by_name (self, "sending"); + g_signal_emit_by_name (self, "sending", NULL); } g_object_unref (result); diff --git a/wocky/wocky-porter.c b/wocky/wocky-porter.c index 26117f7..9a65b43 100644 --- a/wocky/wocky-porter.c +++ b/wocky/wocky-porter.c @@ -118,14 +118,16 @@ wocky_porter_default_init (WockyPorterInterface *iface) /** * WockyPorter::sending: * @porter: the object on which the signal is emitted + * @stanza: the #WockyStanza being sent, or %NULL if @porter is just + * sending whitespace * * The ::sending signal is emitted whenever #WockyPorter sends data * on the XMPP connection. */ g_signal_new ("sending", iface_type, G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); + g_cclosure_marshal_VOID__OBJECT, + G_TYPE_NONE, 1, WOCKY_TYPE_STANZA); g_once_init_leave (&initialization_value, 1); } |