iterate_auditor_aml_holds.h (2401B)
1 /* 2 This file is part of TALER 3 Copyright (C) 2026 Taler Systems SA 4 5 TALER is free software; you can redistribute it and/or modify it under the 6 terms of the GNU General Public License as published by the Free Software 7 Foundation; either version 3, or (at your option) any later version. 8 9 TALER is distributed in the hope that it will be useful, but WITHOUT ANY 10 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 11 A PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 13 You should have received a copy of the GNU General Public License along with 14 TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> 15 */ 16 /** 17 * @file src/include/auditor-database/iterate_auditor_aml_holds.h 18 * @brief implementation of the iterate_auditor_aml_holds function 19 * @author Christian Grothoff 20 */ 21 #ifndef AUDITOR_DATABASE_ITERATE_AUDITOR_AML_HOLDS_H 22 #define AUDITOR_DATABASE_ITERATE_AUDITOR_AML_HOLDS_H 23 24 #include "taler/taler_util.h" 25 #include "taler/taler_json_lib.h" 26 #include "auditordb_lib.h" 27 28 29 #ifndef TALER_AUDITORDB_AUDITOR_AML_HOLD_RESULT_CLOSURE 30 /** 31 * Type of the closure for #TALER_AUDITORDB_AuditorAmlHoldCallback. 32 */ 33 #define TALER_AUDITORDB_AUDITOR_AML_HOLD_RESULT_CLOSURE void 34 #endif 35 36 /** 37 * Function called with holds stored in the auditor's database. 38 * 39 * @param cls closure 40 * @param ah the structure itself 41 * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating 42 */ 43 typedef enum GNUNET_GenericReturnValue 44 (*TALER_AUDITORDB_AuditorAmlHoldCallback)( 45 TALER_AUDITORDB_AUDITOR_AML_HOLD_RESULT_CLOSURE *cls, 46 const struct TALER_AUDITORDB_AmlHold *ah); 47 48 49 /** 50 * Get information about held wire transfers from the database. 51 * 52 * @param pg the database context 53 * @param limit number of records to return, negative for descending 54 * @param offset table row to start from, exclusive, direction determined by @a limit 55 * @param return_suppressed should suppressed rows be returned anyway? 56 * @param cb function to call with results 57 * @param cb_cls closure for @a cb 58 * @return query result status 59 */ 60 enum GNUNET_DB_QueryStatus 61 TALER_AUDITORDB_iterate_auditor_aml_holds ( 62 struct TALER_AUDITORDB_PostgresContext *pg, 63 int64_t limit, 64 uint64_t offset, 65 bool return_suppressed, 66 TALER_AUDITORDB_AuditorAmlHoldCallback cb, 67 TALER_AUDITORDB_AUDITOR_AML_HOLD_RESULT_CLOSURE *cb_cls); 68 69 #endif