X-Git-Url: http://git.cascardo.info/?p=cascardo%2Fchat.git;a=blobdiff_plain;f=xmpp.h;h=8c358b1ed4922c82a6fb6bcb115e5d611996e7fb;hp=c76bb064219efaefc0bdaabc71dd1df9b2258f9f;hb=387372d4d6321ff20f8dadb76906aa77d815b283;hpb=5cbc971e8563b2c364da4c014fb0418706720a94 diff --git a/xmpp.h b/xmpp.h index c76bb06..8c358b1 100644 --- a/xmpp.h +++ b/xmpp.h @@ -31,6 +31,7 @@ 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" @@ -52,10 +53,22 @@ 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_set_sent_msg_hook (hc_xmpp_t *, hc_xmpp_hook_t); +void hc_xmpp_set_pres_hook (hc_xmpp_t *, hc_xmpp_hook_t); +void hc_xmpp_set_sent_pres_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 *); +void hc_xmpp_sent_message (hc_xmpp_t *, iks *); +void hc_xmpp_recv_presence (hc_xmpp_t *, iks *); +void hc_xmpp_sent_presence (hc_xmpp_t *, iks *); #endif