bd = iks_insert (msg, "body");
iks_insert_cdata (bd, body, 0);
hc_xmpp_send_iks (xmpp, msg);
+ hc_xmpp_sent_message (xmpp, msg);
iks_delete (msg);
}
xmpp->msghook = hook;
}
+void
+hc_xmpp_set_sent_msg_hook (hc_xmpp_t *xmpp, hc_xmpp_hook_t hook)
+{
+ xmpp->sentmsghook = hook;
+}
+
void
hc_xmpp_recv_message (hc_xmpp_t *xmpp, iks *stanza)
{
if (xmpp->msghook)
xmpp->msghook (xmpp, stanza);
}
+
+void
+hc_xmpp_sent_message (hc_xmpp_t *xmpp, iks *stanza)
+{
+ if (xmpp->sentmsghook)
+ xmpp->sentmsghook (xmpp, stanza);
+}
int hc_xmpp_hook (void *, int, iks *);
void hc_xmpp_send_stream (hc_xmpp_t *);
void hc_xmpp_set_msg_hook (hc_xmpp_t *, hc_xmpp_hook_t);
+void hc_xmpp_set_sent_msg_hook (hc_xmpp_t *, hc_xmpp_hook_t);
void hc_xmpp_register_ns_hook (hc_xmpp_t *, char *, hc_xmpp_hook_t);
void hc_xmpp_recv_message (hc_xmpp_t *, iks *);
+void hc_xmpp_sent_message (hc_xmpp_t *, iks *);
#endif
Gsasl *sasl_ctx;
Gsasl_session *sasl_session;
hc_xmpp_hook_t msghook;
+ hc_xmpp_hook_t sentmsghook;
GHashTable *nshooks;
int fd;
int tls;