X-Git-Url: http://git.cascardo.info/?p=cascardo%2Fchat.git;a=blobdiff_plain;f=xmpp.h;h=f04cddbc238702b3372cd981f8cd7a5b20249f3b;hp=706f15c43d113ad98cad67a8df87f390236355a4;hb=88e19a4fe878276d64b1aa2fcd5d1efa524508ba;hpb=8729c58972d65ab4b4b7ef3da9bcaf0d7f237d4c;ds=sidebyside diff --git a/xmpp.h b/xmpp.h index 706f15c..f04cddb 100644 --- a/xmpp.h +++ b/xmpp.h @@ -31,11 +31,14 @@ enum }; typedef struct _hc_xmpp_t hc_xmpp_t; +typedef void (*hc_xmpp_hook_t) (hc_xmpp_t *, iks *); #define HC_XMPP_NS_TLS "urn:ietf:params:xml:ns:xmpp-tls" #define HC_XMPP_NS_SASL "urn:ietf:params:xml:ns:xmpp-sasl" #define HC_XMPP_NS_BIND "urn:ietf:params:xml:ns:xmpp-bind" #define HC_XMPP_NS_SESSION "urn:ietf:params:xml:ns:xmpp-session" +#define HC_XMPP_NS_DISCO "http://jabber.org/protocol/disco" +#define HC_XMPP_NS_DISCO_INFO "http://jabber.org/protocol/disco#info" hc_xmpp_t * hc_xmpp_new (iksStreamHook *, char *, char *, char *); int hc_xmpp_is_tls_supported (hc_xmpp_t *); @@ -50,10 +53,16 @@ int hc_xmpp_is_bind_supported (hc_xmpp_t *); int hc_xmpp_is_session_supported (hc_xmpp_t *); int hc_xmpp_is_session_required (hc_xmpp_t *); char *hc_xmpp_server (hc_xmpp_t *); +int hc_xmpp_fd (hc_xmpp_t *); void hc_xmpp_send_buffer (hc_xmpp_t *, char *, size_t); void hc_xmpp_send_iks (hc_xmpp_t *, iks *); void hc_xmpp_read_and_parse (hc_xmpp_t *); 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_set_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 *); #endif