diff options
author | defanor <defanor@uberspace.net> | 2021-09-24 17:04:49 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2021-09-24 17:04:49 +0300 |
commit | 8021dfe24fc44c7a1adbcf8bd49c48e488e8ba2c (patch) | |
tree | f201b26dcf46f856a797ff52a9cbf1a09828d4d1 /src/rexmpp.h | |
parent | 6fce0156861461cf35222b048e422db61898bb80 (diff) |
Pass user-provided pointers to <iq> callback functions
Diffstat (limited to 'src/rexmpp.h')
-rw-r--r-- | src/rexmpp.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rexmpp.h b/src/rexmpp.h index dd9d22b..5e40d30 100644 --- a/src/rexmpp.h +++ b/src/rexmpp.h @@ -38,6 +38,7 @@ typedef struct rexmpp rexmpp_t; inspect those and react. */ typedef void (*rexmpp_iq_callback_t) (rexmpp_t *s, + void *cb_data, xmlNodePtr request, xmlNodePtr response, int success); @@ -51,6 +52,8 @@ struct rexmpp_iq xmlNodePtr request; /** @brief A callback to call on reply. */ rexmpp_iq_callback_t cb; + /** @brief User-supplied data, to pass to a callback function. */ + void *cb_data; /** @brief Next pending IQ. */ rexmpp_iq_t *next; }; @@ -424,7 +427,8 @@ rexmpp_err_t rexmpp_iq_new (rexmpp_t *s, const char *type, const char *to, xmlNodePtr payload, - rexmpp_iq_callback_t cb); + rexmpp_iq_callback_t cb, + void *cb_data); /** @brief Determines the maximum time to wait before the next |