From 3194ccabc1fa0ed52d59167668a7f546dbdbf377 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 18 Aug 2022 15:39:28 +0200 Subject: untested draft of webhook logic for persona --- src/include/taler_kyclogic_lib.h | 31 +++++++++++++++++++++++++++++++ src/include/taler_kyclogic_plugin.h | 8 ++++++++ 2 files changed, 39 insertions(+) (limited to 'src/include') diff --git a/src/include/taler_kyclogic_lib.h b/src/include/taler_kyclogic_lib.h index fedb26a99..df547c3db 100644 --- a/src/include/taler_kyclogic_lib.h +++ b/src/include/taler_kyclogic_lib.h @@ -237,6 +237,37 @@ TALER_KYCLOGIC_kyc_iterate_thresholds ( void *it_cls); +/** + * Function called with the provider details and + * associated plugin closures for matching logics. + * + * @param cls closure + * @param pd provider details of a matching logic + * @param plugin_cls closure of the plugin + * @return #GNUNET_OK to continue to iterate + */ +typedef enum GNUNET_GenericReturnValue +(*TALER_KYCLOGIC_DetailsCallback)( + void *cls, + const struct TALER_KYCLOGIC_ProviderDetails *pd, + void *plugin_cls); + + +/** + * Call @a cb for all logics with name @a logic_name, + * providing the plugin closure and the @a pd configurations. + * + * @param logic_name name of the logic to match + * @param cb function to call on matching results + * @param cb_cls closure for @a cb + */ +void +TALER_KYCLOGIC_kyc_get_details ( + const char *logic_name, + TALER_KYCLOGIC_DetailsCallback cb, + void *cb_cls); + + /** * Obtain the provider logic for a given @a provider_section_name. * diff --git a/src/include/taler_kyclogic_plugin.h b/src/include/taler_kyclogic_plugin.h index 7c0ebbc43..a4c166abc 100644 --- a/src/include/taler_kyclogic_plugin.h +++ b/src/include/taler_kyclogic_plugin.h @@ -77,6 +77,8 @@ enum TALER_KYCLOGIC_KycStatus * The provider is still checking. */ TALER_KYCLOGIC_STATUS_PROVIDER_PENDING + + = TALER_KYCLOGIC_STATUS_PROVIDER | TALER_KYCLOGIC_STATUS_PENDING, @@ -240,6 +242,12 @@ struct TALER_KYCLOGIC_Plugin */ char *library_name; + /** + * Name of the logic, for webhook matching. Set by the + * plugin loader. + */ + char *name; + /** * Load the configuration of the KYC provider. * -- cgit v1.2.3