+
+void
+hc_xmpp_register_ns_hook (hc_xmpp_t *xmpp, char *ns, hc_xmpp_hook_t hook)
+{
+ g_hash_table_insert (xmpp->nshooks, ns, hook);
+}
+
+void
+hc_xmpp_set_msg_hook (hc_xmpp_t *xmpp, hc_xmpp_hook_t hook)
+{
+ 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_set_pres_hook (hc_xmpp_t *xmpp, hc_xmpp_hook_t hook)
+{
+ xmpp->preshook = hook;
+}
+
+void
+hc_xmpp_set_sent_pres_hook (hc_xmpp_t *xmpp, hc_xmpp_hook_t hook)
+{
+ xmpp->sentpreshook = 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);
+}
+
+void
+hc_xmpp_recv_presence (hc_xmpp_t *xmpp, iks *stanza)
+{
+ if (xmpp->preshook)
+ xmpp->preshook (xmpp, stanza);
+}
+
+void
+hc_xmpp_sent_presence (hc_xmpp_t *xmpp, iks *stanza)
+{
+ if (xmpp->sentpreshook)
+ xmpp->sentpreshook (xmpp, stanza);
+}