commit 7fd25d3d2ca7c1efd12393d5a7848884f1f4fa0d
parent 0466d35189e0a46aea2936d57f2533b6aa1b1800
Author: Christian Grothoff <christian@grothoff.org>
Date: Fri, 20 Feb 2026 21:12:11 +0100
clean up future API design
Diffstat:
2 files changed, 130 insertions(+), 126 deletions(-)
diff --git a/src/include/taler/taler-exchange/get-aml-OFFICER_PUB-attributes-H_NORMALIZED_PAYTO.h b/src/include/taler/taler-exchange/get-aml-OFFICER_PUB-attributes-H_NORMALIZED_PAYTO.h
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2025 Taler Systems SA
+ Copyright (C) 2025, 2026 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free Software
@@ -26,25 +26,25 @@
/**
* Possible options we can set for the GET attributes request.
*/
-enum TALER_EXCHANGE_AmlAttributesGetOption
+enum TALER_EXCHANGE_GetAmlAttributesOption
{
/**
* End of list of options.
*/
- TALER_EXCHANGE_AML_ATTRIBUTES_GET_OPTION_END = 0,
+ TALER_EXCHANGE_GET_AML_ATTRIBUTES_OPTION_END = 0,
/**
* Return at most N values, default is -20 to return
* the last 20 entries before start. Negative values
* to return before limit, positive to return after limit.
*/
- TALER_EXCHANGE_AML_ATTRIBUTES_GET_OPTION_LIMIT,
+ TALER_EXCHANGE_GET_AML_ATTRIBUTES_OPTION_LIMIT,
/**
* Row number threshold, defaults to INT64_MAX, namely
* the biggest row id possible in the database.
*/
- TALER_EXCHANGE_AML_ATTRIBUTES_GET_OPTION_OFFSET
+ TALER_EXCHANGE_GET_AML_ATTRIBUTES_OPTION_OFFSET
};
@@ -52,13 +52,13 @@ enum TALER_EXCHANGE_AmlAttributesGetOption
/**
* Possible options we can set for the GET attributes request.
*/
-struct TALER_EXCHANGE_AmlAttributesGetOptionValue
+struct TALER_EXCHANGE_GetAmlAttributesOptionValue
{
/**
* Type of the option being set.
*/
- enum TALER_EXCHANGE_AmlAttributesGetOption option;
+ enum TALER_EXCHANGE_GetAmlAttributesOption option;
/**
* Specific option value.
@@ -67,12 +67,12 @@ struct TALER_EXCHANGE_AmlAttributesGetOptionValue
{
/**
- * Value of if @e option is TALER_EXCHANGE_AML_ATTRIBUTES_GET_OPTION_LIMIT.
+ * Value of if @e option is TALER_EXCHANGE_GET_AML_ATTRIBUTES_OPTION_LIMIT.
*/
int64_t limit;
/**
- * Value of if @e option is TALER_EXCHANGE_AML_ATTRIBUTES_GET_OPTION_OFFSET.
+ * Value of if @e option is TALER_EXCHANGE_GET_AML_ATTRIBUTES_OPTION_OFFSET.
* Note that in practice the maximum value is INT64_MAX, even though
* this value is unsigned.
*/
@@ -86,7 +86,7 @@ struct TALER_EXCHANGE_AmlAttributesGetOptionValue
/**
* Handle for an operation to GET /aml/$OFFICER_PUB/attributes/$H_NORMALIZED_PAYTO.
*/
-struct TALER_EXCHANGE_AmlAttributesGetHandle;
+struct TALER_EXCHANGE_GetAmlAttributesHandle;
/**
@@ -100,8 +100,8 @@ struct TALER_EXCHANGE_AmlAttributesGetHandle;
* @param h_payto normalized payto URI hash of the account to get attributes for
* @return handle to operation
*/
-struct TALER_EXCHANGE_AmlAttributesGetHandle *
-TALER_EXCHANGE_aml_attributes_get_create (
+struct TALER_EXCHANGE_GetAmlAttributesHandle *
+TALER_EXCHANGE_get_aml_attributes_create (
struct GNUNET_CURL_Context *ctx,
const char *url,
const struct TALER_AmlOfficerPrivateKeyP *officer_priv,
@@ -111,24 +111,24 @@ TALER_EXCHANGE_aml_attributes_get_create (
/**
* Terminate the list of the options.
*
- * @return the terminating object of struct TALER_EXCHANGE_AmlAttributesGetOptionValue
+ * @return the terminating object of struct TALER_EXCHANGE_GetAmlAttributesOptionValue
*/
-#define TALER_EXCHANGE_aml_attributes_get_option_end_() \
- (const struct TALER_EXCHANGE_AmlAttributesGetOptionValue) \
+#define TALER_EXCHANGE_get_aml_attributes_option_end_() \
+ (const struct TALER_EXCHANGE_GetAmlAttributesOptionValue) \
{ \
- .option = TALER_EXCHANGE_AML_ATTRIBUTES_GET_OPTION_END \
+ .option = TALER_EXCHANGE_GET_AML_ATTRIBUTES_OPTION_END \
}
/**
* Set limit @a l on the number of results to return.
*
* @param l limit on the number of results to return
- * @return representation of the option as a struct TALER_EXCHANGE_AmlAttributesGetOptionValue
+ * @return representation of the option as a struct TALER_EXCHANGE_GetAmlAttributesOptionValue
*/
-#define TALER_EXCHANGE_aml_attributes_get_option_limit(l) \
- (const struct TALER_EXCHANGE_AmlAttributesGetOptionValue) \
+#define TALER_EXCHANGE_get_aml_attributes_option_limit(l) \
+ (const struct TALER_EXCHANGE_GetAmlAttributesOptionValue) \
{ \
- .option = TALER_EXCHANGE_AML_ATTRIBUTES_GET_OPTION_LIMIT, \
+ .option = TALER_EXCHANGE_GET_AML_ATTRIBUTES_OPTION_LIMIT, \
.details.limit = (l) \
}
@@ -137,12 +137,12 @@ TALER_EXCHANGE_aml_attributes_get_create (
* Set row offset from which to return results.
*
* @param o offset to use
- * @return representation of the option as a struct TALER_EXCHANGE_AmlAttributesGetOptionValue
+ * @return representation of the option as a struct TALER_EXCHANGE_GetAmlAttributesOptionValue
*/
-#define TALER_EXCHANGE_aml_attributes_get_option_offset(o) \
- (const struct TALER_EXCHANGE_AmlAttributesGetOptionValue) \
+#define TALER_EXCHANGE_get_aml_attributes_option_offset(o) \
+ (const struct TALER_EXCHANGE_GetAmlAttributesOptionValue) \
{ \
- .option = TALER_EXCHANGE_AML_ATTRIBUTES_GET_OPTION_OFFSET, \
+ .option = TALER_EXCHANGE_GET_AML_ATTRIBUTES_OPTION_OFFSET, \
.details.offset = (o) \
}
@@ -162,10 +162,10 @@ TALER_EXCHANGE_aml_attributes_get_create (
* #GNUNET_SYSERR on internal error
*/
enum GNUNET_GenericReturnValue
-TALER_EXCHANGE_aml_attributes_get_set_options_ (
- struct TALER_EXCHANGE_AmlAttributesGetHandle *aagh,
+TALER_EXCHANGE_get_aml_attributes_set_options_ (
+ struct TALER_EXCHANGE_GetAmlAttributesHandle *aagh,
unsigned int num_options,
- const struct TALER_EXCHANGE_AmlAttributesGetOptionValue *options);
+ const struct TALER_EXCHANGE_GetAmlAttributesOptionValue *options);
/**
@@ -175,22 +175,22 @@ TALER_EXCHANGE_aml_attributes_get_set_options_ (
*
* It should be used with helpers that creates required options, for example:
*
- * TALER_EXCHANGE_aml_attributes_get_set_options (
+ * TALER_EXCHANGE_get_aml_attributes_set_options (
* aagh,
- * TALER_EXCHANGE_aml_attributes_get_option_limit_(10));
+ * TALER_EXCHANGE_get_aml_attributes_option_limit_(10));
*
* @param aagh the request to set the options for
* @param ... the list of the options, each option must be created
- * by helpers TALER_EXCHANGE_aml_attributes_get_option_NAME(VALUE)
+ * by helpers TALER_EXCHANGE_get_aml_attributes_option_NAME(VALUE)
* @return ::TALER_EC_NONE on success,
* error code otherwise
*/
-#define TALER_EXCHANGE_aml_attributes_get_set_options(aagh,...) \
- TALER_EXCHANGE_aml_attributes_get_set_options_ ( \
+#define TALER_EXCHANGE_get_aml_attributes_set_options(aagh,...) \
+ TALER_EXCHANGE_get_aml_attributes_set_options_ ( \
aagh, \
TALER_EXCHANGE_COMMON_OPTIONS_ARRAY_MAX_SIZE, \
- ((const struct TALER_EXCHANGE_AmlAttributesGetOptionValue[]) \
- {__VA_ARGS__, TALER_EXCHANGE_aml_attributes_get_option_end_ () } \
+ ((const struct TALER_EXCHANGE_GetAmlAttributesOptionValue[]) \
+ {__VA_ARGS__, TALER_EXCHANGE_get_aml_attributes_option_end_ () } \
))
@@ -198,7 +198,7 @@ TALER_EXCHANGE_aml_attributes_get_set_options_ (
* Entry in the set of KYC attribute collection events that are returned
* by the server in a single request.
*/
-struct TALER_EXCHANGE_AmlAttributesGetCollectionEvent
+struct TALER_EXCHANGE_GetAmlAttributesCollectionEvent
{
/**
* Row ID of the record. Used to filter by offset.
@@ -222,7 +222,7 @@ struct TALER_EXCHANGE_AmlAttributesGetCollectionEvent
* Information returned from the exchange for a
* GET /aml/$OFFICER_PUB/attributes/$H_NORMALIZED_PAYTO request.
*/
-struct TALER_EXCHANGE_AmlAttributesGetResult
+struct TALER_EXCHANGE_GetAmlAttributesResponse
{
/**
* HTTP response data
@@ -248,7 +248,7 @@ struct TALER_EXCHANGE_AmlAttributesGetResult
/**
* Matching KYC attribute history of the account.
*/
- const struct TALER_EXCHANGE_AmlAttributesGetCollectionEvent *details;
+ const struct TALER_EXCHANGE_GetAmlAttributesCollectionEvent *details;
} ok;
@@ -256,14 +256,14 @@ struct TALER_EXCHANGE_AmlAttributesGetResult
};
-#ifndef TALER_EXCHANGE__AML_ATTRIBUTES_GET_RESULT_CLOSURE
+#ifndef TALER_EXCHANGE_GET_AML_ATTRIBUTES_RESULT_CLOSURE
/**
* Type of the closure used by
- * the #TALER_EXCHANGE_AmlAttributesGetCallback.
+ * the #TALER_EXCHANGE_GetAmlAttributesCallback.
*/
-#define TALER_EXCHANGE__AML_ATTRIBUTES_GET_RESULT_CLOSURE void
+#define TALER_EXCHANGE_GET_AML_ATTRIBUTES_RESULT_CLOSURE void
#endif \
- /* _TALER_EXCHANGE__GET_AML_OFFICER_PUB_ATTRIBUTES_H_NORMALIZED_PAYTO_H */
+ /* _TALER_EXCHANGE_GET_AML_OFFICER_PUB_ATTRIBUTES_H_NORMALIZED_PAYTO_H */
/**
* Type of the function that receives the result of a
@@ -273,9 +273,9 @@ struct TALER_EXCHANGE_AmlAttributesGetResult
* @param result result returned by the HTTP server
*/
typedef void
-(*TALER_EXCHANGE_AmlAttributesGetCallback)(
- TALER_EXCHANGE__AML_ATTRIBUTES_GET_RESULT_CLOSURE *cls,
- const struct TALER_EXCHANGE_AmlAttributesGetResult *result);
+(*TALER_EXCHANGE_GetAmlAttributesCallback)(
+ TALER_EXCHANGE_GET_AML_ATTRIBUTES_RESULT_CLOSURE *cls,
+ const struct TALER_EXCHANGE_GetAmlAttributesResponse *result);
/**
@@ -287,10 +287,10 @@ typedef void
* @return status code
*/
enum TALER_ErrorCode
-TALER_EXCHANGE_aml_attributes_get_start (
- struct TALER_EXCHANGE_AmlAttributesGetHandle *aagh,
- TALER_EXCHANGE_AmlAttributesGetCallback cb,
- TALER_EXCHANGE__AML_ATTRIBUTES_GET_RESULT_CLOSURE *cb_cls);
+TALER_EXCHANGE_get_aml_attributes_start (
+ struct TALER_EXCHANGE_GetAmlAttributesHandle *aagh,
+ TALER_EXCHANGE_GetAmlAttributesCallback cb,
+ TALER_EXCHANGE_GET_AML_ATTRIBUTES_RESULT_CLOSURE *cb_cls);
/**
@@ -299,11 +299,11 @@ TALER_EXCHANGE_aml_attributes_get_start (
* @param[in] aagh operation to cancel
*/
void
-TALER_EXCHANGE_aml_attributes_get_cancel (
- struct TALER_EXCHANGE_AmlAttributesGetHandle *aagh);
+TALER_EXCHANGE_get_aml_attributes_cancel (
+ struct TALER_EXCHANGE_GetAmlAttributesHandle *aagh);
-/* ******************** old style API ********************* */
+/* ******************** deprecated legay API ********************* */
/**
* Detailed KYC attribute data collected during a KYC process for the account.
diff --git a/src/include/taler/taler-exchange/get-aml-OFFICER_PUB-decisions.h b/src/include/taler/taler-exchange/get-aml-OFFICER_PUB-decisions.h
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2025 Taler Systems SA
+ Copyright (C) 2025, 2026 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free Software
@@ -26,30 +26,30 @@
/**
* Possible options we can set for the GET decisions request.
*/
-enum TALER_EXCHANGE_AmlDecisionsGetOption
+enum TALER_EXCHANGE_GetAmlDecisionsOption
{
/**
* End of list of options.
*/
- TALER_EXCHANGE_AML_DECISIONS_GET_OPTION_END = 0,
+ TALER_EXCHANGE_GET_AML_DECISIONS_OPTION_END = 0,
/**
* Return at most N values, default is -20 to return
* the last 20 entries before start. Negative values
* to return before limit, positive to return after limit.
*/
- TALER_EXCHANGE_AML_DECISIONS_GET_OPTION_LIMIT,
+ TALER_EXCHANGE_GET_AML_DECISIONS_OPTION_LIMIT,
/**
* Row number threshold, defaults to INT64_MAX, namely
* the biggest row id possible in the database.
*/
- TALER_EXCHANGE_AML_DECISIONS_GET_OPTION_OFFSET,
+ TALER_EXCHANGE_GET_AML_DECISIONS_OPTION_OFFSET,
/**
* Filter by account using a normalized payto URI hash.
*/
- TALER_EXCHANGE_AML_DECISIONS_GET_OPTION_H_PAYTO,
+ TALER_EXCHANGE_GET_AML_DECISIONS_OPTION_H_PAYTO,
/**
* If set to #TALER_EXCHANGE_YNA_YES, only return active
@@ -57,7 +57,7 @@ enum TALER_EXCHANGE_AmlDecisionsGetOption
* results, #TALER_EXCHANGE_YNA_ALL, to return all
* decisions. Default is all.
*/
- TALER_EXCHANGE_AML_DECISIONS_GET_OPTION_ACTIVE,
+ TALER_EXCHANGE_GET_AML_DECISIONS_OPTION_ACTIVE,
/**
* If set to #TALER_EXCHANGE_YNA_YES, only return accounts
@@ -65,7 +65,7 @@ enum TALER_EXCHANGE_AmlDecisionsGetOption
* accounts not under investigation, #TALER_EXCHANGE_YNA_ALL,
* to return all accounts. Default is all.
*/
- TALER_EXCHANGE_AML_DECISIONS_GET_OPTION_INVESTIGATION
+ TALER_EXCHANGE_GET_AML_DECISIONS_OPTION_INVESTIGATION
};
@@ -73,13 +73,13 @@ enum TALER_EXCHANGE_AmlDecisionsGetOption
/**
* Possible options we can set for the GET decisions request.
*/
-struct TALER_EXCHANGE_AmlDecisionsGetOptionValue
+struct TALER_EXCHANGE_GetAmlDecisionsOptionValue
{
/**
* Type of the option being set.
*/
- enum TALER_EXCHANGE_AmlDecisionsGetOption option;
+ enum TALER_EXCHANGE_GetAmlDecisionsOption option;
/**
* Specific option value.
@@ -88,29 +88,29 @@ struct TALER_EXCHANGE_AmlDecisionsGetOptionValue
{
/**
- * Value of if @e option is TALER_EXCHANGE_AML_DECISIONS_GET_OPTION_LIMIT.
+ * Value of if @e option is TALER_EXCHANGE_GET_AML_DECISIONS_OPTION_LIMIT.
*/
int64_t limit;
/**
- * Value of if @e option is TALER_EXCHANGE_AML_DECISIONS_GET_OPTION_OFFSET.
+ * Value of if @e option is TALER_EXCHANGE_GET_AML_DECISIONS_OPTION_OFFSET.
* Note that in practice the maximum value is INT64_MAX, even though
* this value is unsigned.
*/
uint64_t offset;
/**
- * Value of if @e option is TALER_EXCHANGE_AML_DECISIONS_GET_OPTION_H_PAYTO.
+ * Value of if @e option is TALER_EXCHANGE_GET_AML_DECISIONS_OPTION_H_PAYTO.
*/
const struct TALER_NormalizedPaytoHashP *h_payto;
/**
- * Value of if @e option is TALER_EXCHANGE_AML_DECISIONS_GET_OPTION_ACTIVE.
+ * Value of if @e option is TALER_EXCHANGE_GET_AML_DECISIONS_OPTION_ACTIVE.
*/
enum TALER_EXCHANGE_YesNoAll active;
/**
- * Value of if @e option is TALER_EXCHANGE_AML_DECISIONS_GET_OPTION_INVESTIGATION.
+ * Value of if @e option is TALER_EXCHANGE_GET_AML_DECISIONS_OPTION_INVESTIGATION.
*/
enum TALER_EXCHANGE_YesNoAll investigation;
@@ -122,13 +122,13 @@ struct TALER_EXCHANGE_AmlDecisionsGetOptionValue
/**
* Handle for an operation to GET /aml/$OFFICER_PUB/decisions.
*/
-struct TALER_EXCHANGE_AmlDecisionsGetHandle;
+struct TALER_EXCHANGE_GetAmlDecisionsHandle;
/**
* Information about a KYC rule.
*/
-struct TALER_EXCHANGE_AmlDecisionsGetKycRule
+struct TALER_EXCHANGE_GetAmlDecisionsKycRule
{
/**
* Type of operation to which the rule applies.
@@ -182,7 +182,7 @@ struct TALER_EXCHANGE_AmlDecisionsGetKycRule
/**
* Legitimization rule set associated with an AML decision.
*/
-struct TALER_EXCHANGE_AmlDecisionsGetLegitimizationRuleSet
+struct TALER_EXCHANGE_GetAmlDecisionsLegitimizationRuleSet
{
/**
* When does this set of rules expire?
@@ -203,7 +203,7 @@ struct TALER_EXCHANGE_AmlDecisionsGetLegitimizationRuleSet
/**
* Array of KYC rules.
*/
- struct TALER_EXCHANGE_AmlDecisionsGetKycRule *rules;
+ struct TALER_EXCHANGE_GetAmlDecisionsKycRule *rules;
/**
* Custom measures.
@@ -216,7 +216,7 @@ struct TALER_EXCHANGE_AmlDecisionsGetLegitimizationRuleSet
* Entry in the set of AML decisions that are returned
* by the server in a single request.
*/
-struct TALER_EXCHANGE_AmlDecisionsGetDecision
+struct TALER_EXCHANGE_GetAmlDecisionsDecision
{
/**
* Hash of the normalized payto:// URI of the account the
@@ -252,7 +252,7 @@ struct TALER_EXCHANGE_AmlDecisionsGetDecision
/**
* Legitimization rules that apply to this account.
*/
- struct TALER_EXCHANGE_AmlDecisionsGetLegitimizationRuleSet limits;
+ struct TALER_EXCHANGE_GetAmlDecisionsLegitimizationRuleSet limits;
/**
* True if the account is under investigation by AML staff.
@@ -270,7 +270,7 @@ struct TALER_EXCHANGE_AmlDecisionsGetDecision
* Information returned from the exchange for a
* GET /aml/$OFFICER_PUB/decisions request.
*/
-struct TALER_EXCHANGE_AmlDecisionsGetResult
+struct TALER_EXCHANGE_GetAmlDecisionsResponse
{
/**
* HTTP response data
@@ -296,7 +296,7 @@ struct TALER_EXCHANGE_AmlDecisionsGetResult
/**
* AML decisions.
*/
- const struct TALER_EXCHANGE_AmlDecisionsGetDecision *records;
+ const struct TALER_EXCHANGE_GetAmlDecisionsDecision *records;
} ok;
@@ -314,8 +314,8 @@ struct TALER_EXCHANGE_AmlDecisionsGetResult
* @param officer_priv private key of the officer
* @return handle to operation
*/
-struct TALER_EXCHANGE_AmlDecisionsGetHandle *
-TALER_EXCHANGE_aml_decisions_get_create (
+struct TALER_EXCHANGE_GetAmlDecisionsHandle *
+TALER_EXCHANGE_get_aml_decisions_create (
struct GNUNET_CURL_Context *ctx,
const char *url,
const struct TALER_AmlOfficerPrivateKeyP *officer_priv);
@@ -324,24 +324,24 @@ TALER_EXCHANGE_aml_decisions_get_create (
/**
* Terminate the list of the options.
*
- * @return the terminating object of struct TALER_EXCHANGE_AmlDecisionsGetOptionValue
+ * @return the terminating object of struct TALER_EXCHANGE_GetAmlDecisionsOptionValue
*/
-#define TALER_EXCHANGE_aml_decisions_get_option_end_() \
- (const struct TALER_EXCHANGE_AmlDecisionsGetOptionValue) \
+#define TALER_EXCHANGE_get_aml_decisions_options_end_() \
+ (const struct TALER_EXCHANGE_GetAmlDecisionsOptionValue) \
{ \
- .option = TALER_EXCHANGE_AML_DECISIONS_GET_OPTION_END \
+ .option = TALER_EXCHANGE_GET_AML_DECISIONS_OPTION_END \
}
/**
* Set limit @a l on the number of results to return.
*
* @param l limit on the number of results to return
- * @return representation of the option as a struct TALER_EXCHANGE_AmlDecisionsGetOptionValue
+ * @return representation of the option as a struct TALER_EXCHANGE_GetAmlDecisionsOptionValue
*/
-#define TALER_EXCHANGE_aml_decisions_get_option_limit(l) \
- (const struct TALER_EXCHANGE_AmlDecisionsGetOptionValue) \
+#define TALER_EXCHANGE_get_aml_decisions_options_limit(l) \
+ (const struct TALER_EXCHANGE_GetAmlDecisionsOptionValue) \
{ \
- .option = TALER_EXCHANGE_AML_DECISIONS_GET_OPTION_LIMIT, \
+ .option = TALER_EXCHANGE_GET_AML_DECISIONS_OPTION_LIMIT, \
.details.limit = (l) \
}
@@ -350,12 +350,12 @@ TALER_EXCHANGE_aml_decisions_get_create (
* Set row offset from which to return results.
*
* @param o offset to use
- * @return representation of the option as a struct TALER_EXCHANGE_AmlDecisionsGetOptionValue
+ * @return representation of the option as a struct TALER_EXCHANGE_GetAmlDecisionsOptionValue
*/
-#define TALER_EXCHANGE_aml_decisions_get_option_offset(o) \
- (const struct TALER_EXCHANGE_AmlDecisionsGetOptionValue) \
+#define TALER_EXCHANGE_get_get_aml_decisions_option_offset(o) \
+ (const struct TALER_EXCHANGE_GetAmlDecisionsOptionValue) \
{ \
- .option = TALER_EXCHANGE_AML_DECISIONS_GET_OPTION_OFFSET, \
+ .option = TALER_EXCHANGE_GET_AML_DECISIONS_OPTION_OFFSET, \
.details.offset = (o) \
}
@@ -364,12 +364,12 @@ TALER_EXCHANGE_aml_decisions_get_create (
* Set filter on which account to filter AML decisions by.
*
* @param p normalized payto URI hash of the account to filter by
- * @return representation of the option as a struct TALER_EXCHANGE_AmlDecisionsGetOptionValue
+ * @return representation of the option as a struct TALER_EXCHANGE_GetAmlDecisionsOptionValue
*/
-#define TALER_EXCHANGE_aml_decisions_get_option_h_payto(p) \
- (const struct TALER_EXCHANGE_AmlDecisionsGetOptionValue) \
+#define TALER_EXCHANGE_get_aml_decisions_option_filter_h_payto(p) \
+ (const struct TALER_EXCHANGE_GetAmlDecisionsOptionValue) \
{ \
- .option = TALER_EXCHANGE_AML_DECISIONS_GET_OPTION_H_PAYTO, \
+ .option = TALER_EXCHANGE_GET_AML_DECISIONS_OPTION_H_PAYTO, \
.details.h_payto = (p) \
}
@@ -377,12 +377,12 @@ TALER_EXCHANGE_aml_decisions_get_create (
* Set filter on active (or inactive) results.
*
* @param a activity filter to use
- * @return representation of the option as a struct TALER_EXCHANGE_AmlDecisionsGetOptionValue
+ * @return representation of the option as a struct TALER_EXCHANGE_GetAmlDecisionsOptionValue
*/
-#define TALER_EXCHANGE_aml_decisions_get_option_active(a) \
- (const struct TALER_EXCHANGE_AmlDecisionsGetOptionValue) \
+#define TALER_EXCHANGE_get_aml_decisions_option_filter_active(a) \
+ (const struct TALER_EXCHANGE_GetAmlDecisionsOptionValue) \
{ \
- .option = TALER_EXCHANGE_AML_DECISIONS_GET_OPTION_ACTIVE, \
+ .option = TALER_EXCHANGE_GET_AML_DECISIONS_OPTION_ACTIVE, \
.details.active = (a) \
}
@@ -390,12 +390,12 @@ TALER_EXCHANGE_aml_decisions_get_create (
* Set filter on investigation status.
*
* @param i investigation filter to use
- * @return representation of the option as a struct TALER_EXCHANGE_AmlDecisionsGetOptionValue
+ * @return representation of the option as a struct TALER_EXCHANGE_GetAmlDecisionsOptionValue
*/
-#define TALER_EXCHANGE_aml_decisions_get_option_investigation(i) \
- (const struct TALER_EXCHANGE_AmlDecisionsGetOptionValue) \
+#define TALER_EXCHANGE_get_aml_decisions_option_filter_investigation(i) \
+ (const struct TALER_EXCHANGE_GetAmlDecisionsOptionValue) \
{ \
- .option = TALER_EXCHANGE_AML_DECISIONS_GET_OPTION_INVESTIGATION, \
+ .option = TALER_EXCHANGE_GET_AML_DECISIONS_OPTION_INVESTIGATION, \
.details.investigation = (i) \
}
@@ -413,10 +413,10 @@ TALER_EXCHANGE_aml_decisions_get_create (
* #GNUNET_SYSERR on internal error
*/
enum GNUNET_GenericReturnValue
-TALER_EXCHANGE_aml_decisions_get_set_options_ (
- struct TALER_EXCHANGE_AmlDecisionsGetHandle *adgh,
+TALER_EXCHANGE_get_aml_decisions_set_options_ (
+ struct TALER_EXCHANGE_GetAmlDecisionsHandle *adgh,
unsigned int num_options,
- struct TALER_EXCHANGE_AmlDecisionsGetOptionValue options[
+ struct TALER_EXCHANGE_GetAmlDecisionsOptionValue options[
static num_options]);
@@ -427,33 +427,33 @@ TALER_EXCHANGE_aml_decisions_get_set_options_ (
*
* It should be used with helpers that creates required options, for example:
*
- * TALER_EXCHANGE_aml_decisions_get_set_options (
+ * TALER_EXCHANGE_get_aml_decisions_set_options (
* adgh,
- * TALER_EXCHANGE_aml_decisions_get_option_h_payto_(&h_payto));
+ * TALER_EXCHANGE_get_aml_decisions_option_h_payto_(&h_payto));
*
* @param adgh the request to set the options for
* @param ... the list of the options, each option must be created
- * by helpers TALER_EXCHANGE_aml_decisions_get_option_NAME(VALUE)
+ * by helpers TALER_EXCHANGE_get_aml_decisions_option_NAME(VALUE)
* @return #GNUNET_OK on success,
* #GNUNET_NO on failure,
* #GNUNET_SYSERR on internal error
*/
-#define TALER_EXCHANGE_aml_decisions_get_set_options(adgh,...) \
- TALER_EXCHANGE_aml_decisions_get_set_options_ ( \
+#define TALER_EXCHANGE_get_aml_decisions_set_options(adgh,...) \
+ TALER_EXCHANGE_get_aml_decisions_set_options_ ( \
adgh, \
- ((const struct TALER_EXCHANGE_AmlDecisionsGetOptionValue[]) \
- {__VA_ARGS__, TALER_EXCHANGE_aml_decisions_get_option_end_ () } \
+ ((const struct TALER_EXCHANGE_GetAmlDecisionsOptionValue[]) \
+ {__VA_ARGS__, TALER_EXCHANGE_get_aml_decisions_option_end_ () } \
), \
TALER_EXCHANGE_COMMON_OPTIONS_ARRAY_MAX_SIZE)
-#ifndef TALER_EXCHANGE__AML_DECISIONS_GET_RESULT_CLOSURE
+#ifndef TALER_EXCHANGE_GET_AML_DECISIONS_RESULT_CLOSURE
/**
* Type of the closure used by
- * the #TALER_EXCHANGE_AmlDecisionsGetCallback.
+ * the #TALER_EXCHANGE_GetAmlDecisionsCallback.
*/
-#define TALER_EXCHANGE__AML_DECISIONS_GET_RESULT_CLOSURE void
-#endif /* _TALER_EXCHANGE__GET_AML_OFFICER_PUB_DECISIONS_H */
+#define TALER_EXCHANGE_GET_AML_DECISIONS_RESULT_CLOSURE void
+#endif /* _TALER_EXCHANGE_GET_AML_OFFICER_PUB_DECISIONS_H */
/**
* Type of the function that receives the result of a
@@ -463,9 +463,9 @@ TALER_EXCHANGE_aml_decisions_get_set_options_ (
* @param result result returned by the HTTP server
*/
typedef void
-(*TALER_EXCHANGE_AmlDecisionsGetCallback)(
- TALER_EXCHANGE__AML_DECISIONS_GET_RESULT_CLOSURE *cls,
- const struct TALER_EXCHANGE_AmlDecisionsGetResult *result);
+(*TALER_EXCHANGE_GetAmlDecisionsCallback)(
+ TALER_EXCHANGE_GET_AML_DECISIONS_RESULT_CLOSURE *cls,
+ const struct TALER_EXCHANGE_GetAmlDecisionsResponse *result);
/**
@@ -474,26 +474,30 @@ typedef void
* @param[in,out] adgh operation to start
* @param cb function to call with the exchange's result
* @param cb_cls closure for @a cb
- * @return status code
+ * @return status code, #TALER_EC_NONE on success
*/
enum TALER_ErrorCode
-TALER_EXCHANGE_aml_decisions_get_start (
- struct TALER_EXCHANGE_AmlDecisionsGetHandle *adgh,
- TALER_EXCHANGE_AmlDecisionsGetCallback cb,
- TALER_EXCHANGE__AML_DECISIONS_GET_RESULT_CLOSURE *cb_cls);
+TALER_EXCHANGE_get_aml_decisions_start (
+ struct TALER_EXCHANGE_GetAmlDecisionsHandle *adgh,
+ TALER_EXCHANGE_GetAmlDecisionsCallback cb,
+ TALER_EXCHANGE_GET_AML_DECISIONS_RESULT_CLOSURE *cb_cls);
/**
- * Cancel GET /aml/$OPUB/decisions operation.
+ * Cancel GET /aml/$OPUB/decisions operation. This function
+ * must not be called by clients after the
+ * TALER_EXCHANGE_GetAmlDecisionsCallback has been invoked
+ * (as in those cases it'll be called internally by the
+ * implementation already).
*
* @param[in] adgh operation to cancel
*/
void
-TALER_EXCHANGE_aml_decisions_get_cancel (
- struct TALER_EXCHANGE_AmlDecisionsGetHandle *adgh);
+TALER_EXCHANGE_get_aml_decisions_cancel (
+ struct TALER_EXCHANGE_GetAmlDecisionsHandle *adgh);
-/* **************** Old-style API ***************** */
+/* **************** deprecated legacy API ***************** */
/**