diff options
Diffstat (limited to 'src/lib/testing_api_trait_hash.c')
-rw-r--r-- | src/lib/testing_api_trait_hash.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/lib/testing_api_trait_hash.c b/src/lib/testing_api_trait_hash.c index d2d99d82..b1516cfb 100644 --- a/src/lib/testing_api_trait_hash.c +++ b/src/lib/testing_api_trait_hash.c | |||
@@ -26,16 +26,23 @@ | |||
26 | #include <taler/taler_exchange_service.h> | 26 | #include <taler/taler_exchange_service.h> |
27 | #include <taler/taler_testing_lib.h> | 27 | #include <taler/taler_testing_lib.h> |
28 | 28 | ||
29 | /** | ||
30 | * TODO: have _one_ pair of getter/setter for hash-coded | ||
31 | * traits and define the getters/setters for tip id and hashed | ||
32 | * contract terms as _macros_. | ||
33 | */ | ||
34 | |||
29 | #define TALER_TESTING_TRAIT_TIP_ID "tip-id" | 35 | #define TALER_TESTING_TRAIT_TIP_ID "tip-id" |
30 | #define TALER_TESTING_TRAIT_H_CONTRACT_TERMS "h-contract-terms" | 36 | #define TALER_TESTING_TRAIT_H_CONTRACT_TERMS "h-contract-terms" |
31 | 37 | ||
32 | /** | 38 | /** |
33 | * Obtain tip id from a @a cmd. | 39 | * Obtain tip id from a @a cmd. |
34 | * | 40 | * |
35 | * @param cmd command to extract trait from | 41 | * @param cmd command to extract the trait from. |
36 | * @param index which signature to pick if @a cmd has multiple | 42 | * @param index which tip id to pick if @a |
37 | * on offer | 43 | * cmd has multiple on offer |
38 | * @param tip_id[out] set to the wanted data. | 44 | * @param tip_id[out] set to the wanted data. |
45 | * | ||
39 | * @return #GNUNET_OK on success | 46 | * @return #GNUNET_OK on success |
40 | */ | 47 | */ |
41 | int | 48 | int |
@@ -55,8 +62,8 @@ TALER_TESTING_get_trait_tip_id | |||
55 | * Offer tip id. | 62 | * Offer tip id. |
56 | * | 63 | * |
57 | * @param index which tip id to offer if there are | 64 | * @param index which tip id to offer if there are |
58 | * multiple on offer | 65 | * multiple on offer. |
59 | * @param planchet_secrets set to the offered secrets. | 66 | * @param tip_id set to the offered tip id. |
60 | * @return the trait | 67 | * @return the trait |
61 | */ | 68 | */ |
62 | struct TALER_TESTING_Trait | 69 | struct TALER_TESTING_Trait |
@@ -76,10 +83,10 @@ TALER_TESTING_make_trait_tip_id | |||
76 | /** | 83 | /** |
77 | * Obtain contract terms hash from a @a cmd. | 84 | * Obtain contract terms hash from a @a cmd. |
78 | * | 85 | * |
79 | * @param cmd command to extract trait from | 86 | * @param cmd command to extract the trait from. |
80 | * @param index which hash code to pick if @a cmd has multiple | 87 | * @param index index number of the trait to fetch. |
81 | * on offer | ||
82 | * @param h_contract_terms[out] set to the wanted data. | 88 | * @param h_contract_terms[out] set to the wanted data. |
89 | * | ||
83 | * @return #GNUNET_OK on success | 90 | * @return #GNUNET_OK on success |
84 | */ | 91 | */ |
85 | int | 92 | int |
@@ -98,9 +105,11 @@ TALER_TESTING_get_trait_h_contract_terms | |||
98 | /** | 105 | /** |
99 | * Offer contract terms hash code. | 106 | * Offer contract terms hash code. |
100 | * | 107 | * |
101 | * @param index which hash code to offer if there are | 108 | * @param index which hashed contract terms to |
102 | * multiple on offer | 109 | * offer if there are multiple on offer |
103 | * @param h_contract_terms set to the offered hash code. | 110 | * @param h_contract_terms set to the offered hashed |
111 | * contract terms. | ||
112 | * | ||
104 | * @return the trait | 113 | * @return the trait |
105 | */ | 114 | */ |
106 | struct TALER_TESTING_Trait | 115 | struct TALER_TESTING_Trait |