From def38cbbaffe0bd4504580384af2bbbde0b62762 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Mon, 3 Nov 2008 10:29:38 -0200 Subject: [PATCH] Allow extensions to be registered --- xmpp.c | 6 ++++++ xmpp.h | 1 + 2 files changed, 7 insertions(+) diff --git a/xmpp.c b/xmpp.c index dc59c17..e5eed9d 100644 --- 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 --- 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 -- 2.20.1