diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-08-04 18:11:35 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-08-04 18:11:35 +0200 |
commit | 99eb36e490f5f0ca16cb451941ca873b03016b27 (patch) | |
tree | 9da20e4ef9dd7b5b1e9a860afc92c55b431df648 /src/backend/taler-merchant-httpd_helper.h | |
parent | 977c3d47538d071e2b37599bb71c0fae3ad36d44 (diff) |
-implement #6953 + #6948
Diffstat (limited to 'src/backend/taler-merchant-httpd_helper.h')
-rw-r--r-- | src/backend/taler-merchant-httpd_helper.h | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/src/backend/taler-merchant-httpd_helper.h b/src/backend/taler-merchant-httpd_helper.h index 4c353942..dc7c08b1 100644 --- a/src/backend/taler-merchant-httpd_helper.h +++ b/src/backend/taler-merchant-httpd_helper.h @@ -38,21 +38,55 @@ TMH_payto_uri_array_valid (const json_t *payto_uris); /** - * FIXME. + * Check if @a taxes is an array of valid Taxes in the sense of + * Taler's API definition. + * + * @param taxes array to check + * @return true if @a taxes is an array and all + * entries are valid Taxes. */ bool TMH_taxes_array_valid (const json_t *taxes); -// FIXME +/** + * Check if @a location is a valid Location object in the sense of Taler's API + * definition. + * + * @param location object to check + * @return true if @a location is an object + * representing a Location. + */ bool TMH_location_object_valid (const json_t *location); -// FIXME +/** + * Check if @a products is an array of valid Product(s) in the sense of + * Taler's API definition. + * + * @param products array to check + * @return true if @a products is an array and all + * entries are valid Products. + */ +bool +TMH_products_array_valid (const json_t *products); + + +/** + * Check if @a image_data_url is a valid image + * data URL. Does not validate the actual payload, + * only the syntax and that it properly claims to + * be an image. + * + * @param image_data_url string to check + * @return true if @a image_data_url is a data + * URL with an "image/" mime-type + */ bool TMH_image_data_url_valid (const char *image_data_url); + /** * Setup new wire method for the given @ payto_uri. * |