From 1009084e94b8e8cf19e3b5568c3cccaba2bd2209 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 11 Aug 2022 23:35:33 +0200 Subject: major rework of the KYC logic, making it more configurable, not complete, but tests pass again --- src/include/taler_kyclogic_lib.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/include/taler_kyclogic_lib.h') diff --git a/src/include/taler_kyclogic_lib.h b/src/include/taler_kyclogic_lib.h index 6b54276f6..fedb26a99 100644 --- a/src/include/taler_kyclogic_lib.h +++ b/src/include/taler_kyclogic_lib.h @@ -162,6 +162,19 @@ typedef void void *cb_cls); +/** + * Function called to iterate over KYC-relevant + * transaction thresholds amounts. + * + * @param cls closure, identifies the event type and + * account to iterate over events for + * @param threshold a relevant threshold amount + */ +typedef void +(*TALER_KYCLOGIC_KycThresholdIterator)(void *cls, + const struct TALER_Amount *threshold); + + /** * Call us on KYC processes satisfied for the given * account. Must match the ``select_satisfied_kyc_processes`` of the exchange database plugin. @@ -209,6 +222,21 @@ TALER_KYCLOGIC_kyc_test_required (enum TALER_KYCLOGIC_KycTriggerEvent event, void *ai_cls); +/** + * Iterate over all thresholds that are applicable + * to a particular type of @a event + * + * @param event tresholds to look up + * @param it function to call on each + * @param it_cls closure for @a it + */ +void +TALER_KYCLOGIC_kyc_iterate_thresholds ( + enum TALER_KYCLOGIC_KycTriggerEvent event, + TALER_KYCLOGIC_KycThresholdIterator it, + void *it_cls); + + /** * Obtain the provider logic for a given @a provider_section_name. * -- cgit v1.2.3