[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: add API to return successor meas
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: add API to return successor measure |
Date: |
Wed, 07 Aug 2024 09:49:43 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new de42b3570 add API to return successor measure
de42b3570 is described below
commit de42b35703ad010040bbbc932ca4aeaa0c582036
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Aug 7 09:49:40 2024 +0200
add API to return successor measure
---
src/include/taler_kyclogic_lib.h | 13 +++++++++++++
src/kyclogic/kyclogic_api.c | 19 +++++++++++++++----
2 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/src/include/taler_kyclogic_lib.h b/src/include/taler_kyclogic_lib.h
index 987cee4e2..f7fb9ed92 100644
--- a/src/include/taler_kyclogic_lib.h
+++ b/src/include/taler_kyclogic_lib.h
@@ -640,6 +640,19 @@ TALER_KYCLOGIC_rules_get_expiration (
const struct TALER_KYCLOGIC_LegitimizationRuleSet *lrs);
+/**
+ * Return successor measure for the given @a lrs
+ *
+ * @param lrs legitimization rules to inspect
+ * @return name of the successor measure;
+ * NULL to fall back to default rules;
+ * pointer will be valid as long as @a lrs is valid
+ */
+const char *
+TALER_KYCLOGIC_rules_get_successor (
+ const struct TALER_KYCLOGIC_LegitimizationRuleSet *lrs);
+
+
/**
* Function called with the provider details and
* associated plugin closures for matching logics.
diff --git a/src/kyclogic/kyclogic_api.c b/src/kyclogic/kyclogic_api.c
index af801a55c..56affd010 100644
--- a/src/kyclogic/kyclogic_api.c
+++ b/src/kyclogic/kyclogic_api.c
@@ -171,7 +171,7 @@ struct TALER_KYCLOGIC_LegitimizationRuleSet
/**
* Name of the successor measure after expiration.
- * NULL for default rules.
+ * NULL to revert to default rules.
*/
char *successor_measure;
@@ -304,6 +304,14 @@ TALER_KYCLOGIC_rules_get_expiration (
}
+const char *
+TALER_KYCLOGIC_rules_get_successor (
+ const struct TALER_KYCLOGIC_LegitimizationRuleSet *lrs)
+{
+ return lrs->successor_measure;
+}
+
+
/**
* Lookup a KYC check by @a check_name
*
@@ -915,7 +923,8 @@ TALER_KYCLOGIC_rule_get_instant_measure (
json_t *
-TALER_KYCLOGIC_rule_to_measures (const struct TALER_KYCLOGIC_KycRule *r)
+TALER_KYCLOGIC_rule_to_measures (
+ const struct TALER_KYCLOGIC_KycRule *r)
{
const struct TALER_KYCLOGIC_LegitimizationRuleSet *lrs
= r->lrs;
@@ -1048,7 +1057,8 @@ TALER_KYCLOGIC_check_to_measures (
uint32_t
-TALER_KYCLOGIC_rule2priority (const struct TALER_KYCLOGIC_KycRule *r)
+TALER_KYCLOGIC_rule2priority (
+ const struct TALER_KYCLOGIC_KycRule *r)
{
return r->display_priority;
}
@@ -2192,7 +2202,8 @@ sort_by_timeframe (const void *p1,
enum GNUNET_GenericReturnValue
-TALER_KYCLOGIC_kyc_init (const struct GNUNET_CONFIGURATION_Handle *cfg)
+TALER_KYCLOGIC_kyc_init (
+ const struct GNUNET_CONFIGURATION_Handle *cfg)
{
struct SectionContext sc = {
.cfg = cfg,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: add API to return successor measure,
gnunet <=