X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/06bfbba4a281a9e615869b857cc0b775225accb3..658c8a359409a339d71910f68452bfaa751734c0:/lib/eclient.h diff --git a/lib/eclient.h b/lib/eclient.h index e459619..1b47dff 100644 --- a/lib/eclient.h +++ b/lib/eclient.h @@ -147,13 +147,17 @@ struct sink; * It is always allowed for these to be null pointers if you don't care about * the result. */ -typedef void disorder_eclient_no_response(void *v); -/* completion callback with no data */ +/** @brief Trivial completion callback + * @param v User data + * @param error Error string or NULL on succes + */ +typedef void disorder_eclient_no_response(void *v, + const char *error); /** @brief String result completion callback * @param v User data * @param error Error string or NULL on succes - * @param value or NULL if not found + * @param value Result or NULL * * @p error will be NULL on success. In this case @p value will be the result * (which might be NULL for disorder_eclient_get(), @@ -165,7 +169,18 @@ typedef void disorder_eclient_string_response(void *v, const char *error, const char *value); -typedef void disorder_eclient_integer_response(void *v, long value); +/** @brief String result completion callback + * @param v User data + * @param error Error string or NULL on succes + * @param value Result or 0 + * + * @p error will be NULL on success. In this case @p value will be the result. + * + * @p error will be non-NULL on failure. In this case @p value is always 0. + */ +typedef void disorder_eclient_integer_response(void *v, + const char *error, + long value); /* completion callback with a integer result */ typedef void disorder_eclient_volume_response(void *v, int l, int r);