Allow extensions to be registered
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Mon, 3 Nov 2008 12:29:38 +0000 (10:29 -0200)
committerThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Mon, 3 Nov 2008 12:29:38 +0000 (10:29 -0200)
xmpp.c
xmpp.h

diff --git a/xmpp.c b/xmpp.c
index dc59c17..e5eed9d 100644 (file)
--- a/xmpp.c
+++ b/xmpp.c
@@ -154,3 +154,9 @@ hc_xmpp_status (hc_xmpp_t *xmpp)
 {
   return xmpp->status;
 }
+
+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);
+}
diff --git a/xmpp.h b/xmpp.h
index c0780b7..66c64d2 100644 (file)
--- a/xmpp.h
+++ b/xmpp.h
@@ -61,5 +61,6 @@ void hc_xmpp_features (hc_xmpp_t *, iks *);
 int hc_xmpp_status (hc_xmpp_t *);
 int hc_xmpp_hook (void *, int, iks *);
 void hc_xmpp_send_stream (hc_xmpp_t *);
+void hc_xmpp_register_ns_hook (hc_xmpp_t *, char *, hc_xmpp_hook_t);
 
 #endif