From ddedf03a816e5139b235a3ebdf5b600508c5ed5f Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Mon, 26 Jun 2023 00:01:31 +0200 Subject: [age-withdraw] age-withdraw commit- and reveal-handlers implemented, 12/n The handlers for the commit- and reveal-phases of the age-withdraw HTTP-endpoints are implemented, yet not active. Still missing: - support for age-withdraw is missing in lib/. - tests --- src/include/taler_util.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/include/taler_util.h') diff --git a/src/include/taler_util.h b/src/include/taler_util.h index 1de264c12..1f3a4c706 100644 --- a/src/include/taler_util.h +++ b/src/include/taler_util.h @@ -558,6 +558,18 @@ char * TALER_age_mask_to_string ( const struct TALER_AgeMask *mask); +/* + * @brief returns the age group of a given age for a given age mask + * + * @param mask Age mask + * @param age The given age + * @return age group + */ +uint8_t +TALER_get_age_group ( + const struct TALER_AgeMask *mask, + uint8_t age); + /** * @brief Parses a JSON object { "age_groups": "a:b:...y:z" }. * @@ -570,6 +582,18 @@ TALER_JSON_parse_age_groups (const json_t *root, struct TALER_AgeMask *mask); +/* @brief Return the lowest age in the corresponding group for a given age + * according the given age mask. + * + * @param[IN] mask age mask + * @param[IN] age age to check + * @return lowest age in corresponding age group + */ +uint8_t +TALER_get_lowest_age ( + const struct TALER_AgeMask *mask, + uint8_t age); + /** * Handle to an external process that will assist * with some JSON-to-JSON conversion. -- cgit v1.2.3