aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-11-05 21:21:50 +0100
committerFlorian Dold <florian@dold.me>2024-11-05 21:21:50 +0100
commit971b2cadc024ece5b8ff1d54664c1c5e140a648e (patch)
treece585d85c5c72992f62824a96f9b881be4b47ad5
parent0463167cb5ac96aec3a6d896099db83f9797e143 (diff)
proposed new API for running measures
-rw-r--r--src/exchange/taler-exchange-httpd_common_kyc.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_common_kyc.h b/src/exchange/taler-exchange-httpd_common_kyc.h
index 9e2cd2288..4ac7b4d77 100644
--- a/src/exchange/taler-exchange-httpd_common_kyc.h
+++ b/src/exchange/taler-exchange-httpd_common_kyc.h
@@ -30,6 +30,66 @@
#include "taler-exchange-httpd.h"
+/* Proposed new definitions, for review. */
+
+#if 0
+/**
+ * Function called after finishing running a measure.
+ *
+ * @param cls closure
+ * @param ec error code, 0 on success
+ * @param msg error message, NULL on success
+ */
+typedef void
+(*TEH_AmlMeasureRunCallback) (
+ void *cls,
+ enum TALER_ErrorCode ec,
+ const char *msg);
+
+/**
+ * Handle for an asynchronous operation to finish
+ * a KYC process after running the AML trigger.
+ */
+struct TEH_AmlMeasureRunContext;
+
+/**
+ * Run measure after storing attributes from the given
+ * provider.
+ *
+ * Only works when a process is active.
+ */
+struct TEH_AmlMeasureRunContext *
+TEH_kyc_run_measure_for_attributes (
+ const struct GNUNET_AsyncScopeId *scope,
+ uint64_t process_row,
+ const char *provider_user_id,
+ const char *provider_legitimization_id,
+ struct GNUNET_TIME_Absolute expiration,
+ const json_t *new_attributes,
+ TEH_AmlMeasureRunCallback cb,
+ void *cb_cls);
+
+
+/**
+ * Run an instant measure.
+ *
+ * Inserts a legitimization process and measure
+ * into the database before running the measure program.
+ *
+ * After running the measure program, the result is stored
+ * in the DB.
+ */
+struct TEH_AmlMeasureRunContext *
+TEH_kyc_run_measure_instant (
+ const struct GNUNET_AsyncScopeId *scope,
+ const struct TALER_KYCLOGIC_Measure *instant_ms,
+ const struct TALER_NormalizedPaytoHashP *account_id,
+ TEH_AmlMeasureRunCallback cb,
+ void *cb_cls);
+
+#endif
+
+
/**
* Function called after the KYC-AML trigger is done.
*