From 49d4f24f8d031a9301676196bd6a17ea3e54cb62 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 28 Jan 2015 14:55:25 +0100 Subject: misc cleanup, moving TALER_MINT_config_load to libtalerutil --- src/mint/taler-mint-httpd_parsing.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/mint/taler-mint-httpd_parsing.h') diff --git a/src/mint/taler-mint-httpd_parsing.h b/src/mint/taler-mint-httpd_parsing.h index 9c4d8aaf..1c13c946 100644 --- a/src/mint/taler-mint-httpd_parsing.h +++ b/src/mint/taler-mint-httpd_parsing.h @@ -25,6 +25,7 @@ #include #include +#include "taler_util.h" /** @@ -215,6 +216,23 @@ TALER_MINT_release_parsed_data (struct GNUNET_MINT_ParseFieldSpec *spec); #define TALER_MINT_PARSE_END { NULL, NULL, 0, 0 } +/** + * 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. * -- cgit v1.2.3