diff options
Diffstat (limited to 'src/mint/taler-mint-httpd_parsing.h')
-rw-r--r-- | src/mint/taler-mint-httpd_parsing.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mint/taler-mint-httpd_parsing.h b/src/mint/taler-mint-httpd_parsing.h index 9c4d8aafe..1c13c9469 100644 --- a/src/mint/taler-mint-httpd_parsing.h +++ b/src/mint/taler-mint-httpd_parsing.h @@ -25,6 +25,7 @@ #include <microhttpd.h> #include <jansson.h> +#include "taler_util.h" /** @@ -216,6 +217,23 @@ TALER_MINT_release_parsed_data (struct GNUNET_MINT_ParseFieldSpec *spec); /** + * Parse amount specified in JSON format. + * + * @param connection the MHD connection (to report errors) + * @param f json specification of the amount + * @param amount[OUT] set to the amount specified in @a f + * @return + * #GNUNET_YES if parsing was successful + * #GNUNET_NO if json is malformed, error response was generated + * #GNUNET_SYSERR on internal error, error response was not generated + */ +int +TALER_MINT_parse_amount_json (struct MHD_Connection *connection, + json_t *f, + struct TALER_Amount *amount); + + +/** * Extraxt fixed-size base32crockford encoded data from request. * * Queues an error response to the connection if the parameter is missing or |