From 15c1a877c617fd29ff61e2ebd1f6fac72e54afce Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Fri, 14 Dec 2018 00:34:35 +0100 Subject: /history API semantics extended. That API has now a new 'ordering' flag that lets the client choose what ordering the results should have: ascending or descending. In particular, this change adapted the fakebank and tests logic to such introduction. --- src/include/taler_bank_service.h | 2 ++ src/include/taler_testing_bank_lib.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/taler_bank_service.h b/src/include/taler_bank_service.h index 1cad5710a..2f4a06023 100644 --- a/src/include/taler_bank_service.h +++ b/src/include/taler_bank_service.h @@ -257,6 +257,7 @@ typedef void * @param auth authentication data to use * @param account_number which account number should we query * @param direction what kinds of wire transfers should be returned + * @param ascending if GNUNET_YES, history elements will be returned in chronological order. * @param start_row from which row on do we want to get results, use UINT64_MAX for the latest; exclusive * @param num_results how many results do we want; negative numbers to go into the past, * positive numbers to go into the future starting at @a start_row; @@ -273,6 +274,7 @@ TALER_BANK_history (struct GNUNET_CURL_Context *ctx, const struct TALER_BANK_AuthenticationData *auth, uint64_t account_number, enum TALER_BANK_Direction direction, + unsigned int ascending, uint64_t start_row, int64_t num_results, TALER_BANK_HistoryResultCallback hres_cb, diff --git a/src/include/taler_testing_bank_lib.h b/src/include/taler_testing_bank_lib.h index fd027c5b8..a3cc741e6 100644 --- a/src/include/taler_testing_bank_lib.h +++ b/src/include/taler_testing_bank_lib.h @@ -90,7 +90,8 @@ TALER_TESTING_prepare_bank (const char *config_filename); * operation. * @param account_no bank account number to ask the history for. * @param direction which direction this operation is interested - * in. + * @param ascending if GNUNET_YES, it ask the bank to return results + * in chronological order. * @param start_row_reference reference to a command that can * offer a row identifier, to be used as the starting row * to accept in the result. @@ -104,6 +105,7 @@ TALER_TESTING_cmd_bank_history const char *bank_url, uint64_t account_no, enum TALER_BANK_Direction direction, + unsigned int ascending, const char *start_row_reference, long long num_results); -- cgit v1.2.3