diff options
Diffstat (limited to 'src/rexmpp.h')
-rw-r--r-- | src/rexmpp.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/rexmpp.h b/src/rexmpp.h index 5e40d30..addd4d4 100644 --- a/src/rexmpp.h +++ b/src/rexmpp.h @@ -277,6 +277,7 @@ struct rexmpp uint32_t stanza_queue_size; uint32_t send_queue_size; uint32_t iq_queue_size; + uint32_t iq_cache_size; /* Callbacks. */ log_function_t log_function; @@ -300,6 +301,9 @@ struct rexmpp /* IQs we're waiting for responses to. */ rexmpp_iq_t *active_iq; + /* Cached IQ requests and responses. */ + xmlNodePtr iq_cache; + /* Connection and stream management. */ unsigned int reconnect_number; time_t reconnect_seconds; @@ -431,6 +435,19 @@ rexmpp_err_t rexmpp_iq_new (rexmpp_t *s, void *cb_data); /** + @brief Same as ::rexmpp_iq_new, but caches responses, and can use + cached ones. + @param[in] fresh Do not read cache, make a new request. +*/ +rexmpp_err_t rexmpp_cached_iq_new (rexmpp_t *s, + const char *type, + const char *to, + xmlNodePtr payload, + rexmpp_iq_callback_t cb, + void *cb_data, + int fresh); + +/** @brief Determines the maximum time to wait before the next ::rexmpp_run call. @param[in] s ::rexmpp @@ -499,6 +516,11 @@ void rexmpp_log (rexmpp_t *s, int priority, const char *format, ...); char *rexmpp_get_name (rexmpp_t *s, const char *jid_str); /** + @brief Compares two XML elements. +*/ +int rexmpp_xml_eq (xmlNodePtr n1, xmlNodePtr n2); + +/** @brief Matches an XML node against a namespace and an element name. @param[in] node An XML node to match. @param[in] namespace An XML namespace. Can be NULL (matches |