From 5b1e17617faf356f0d85e7e6bf2b188483bcf351 Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Wed, 14 Feb 2018 12:46:01 +0100 Subject: offer url trait --- src/include/taler_testing_lib.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/include') diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h index de671c9f7..a78f7f3f5 100644 --- a/src/include/taler_testing_lib.h +++ b/src/include/taler_testing_lib.h @@ -1251,4 +1251,33 @@ TALER_TESTING_get_trait_amount unsigned int index, const char **amount); + +/** + * Offer url in a trait. + * + * @param index which url is to be picked, in case + * multiple are offered. + * @param url the url to offer + * @return the trait, to be put in the traits array of the command + */ +struct TALER_TESTING_Trait +TALER_TESTING_make_trait_url + (unsigned int index, + const char *url); + +/** + * Obtain a url from @a cmd. + * + * @param cmd command to extract trait from + * @param index which url is to be picked, in case + * multiple are offered. + * @param amount[out] where to write the url. + * @return #GNUNET_OK on success + */ +int +TALER_TESTING_get_trait_url + (const struct TALER_TESTING_Command *cmd, + unsigned int index, + const char **url); + #endif -- cgit v1.2.3