From: Thadeu Lima de Souza Cascardo Date: Mon, 3 Nov 2008 12:29:38 +0000 (-0200) Subject: Allow extensions to be registered X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fhcxmpp.git;a=commitdiff_plain;h=def38cbbaffe0bd4504580384af2bbbde0b62762 Allow extensions to be registered --- 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