iterate_kycauth_in_inconsistencies.h (2558B)
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_kycauth_in_inconsistencies.h 18 * @brief implementation of the iterate_kycauth_in_inconsistencies function for Postgres 19 * @author Christian Grothoff 20 */ 21 #ifndef AUDITOR_DATABASE_ITERATE_KYCAUTH_IN_INCONSISTENCIES_H 22 #define AUDITOR_DATABASE_ITERATE_KYCAUTH_IN_INCONSISTENCIES_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_KYCAUTH_IN_INCONSISTENCY_RESULT_CLOSURE 30 /** 31 * Type of the closure for #TALER_AUDITORDB_KycauthInInconsistencyCallback. 32 */ 33 #define TALER_AUDITORDB_KYCAUTH_IN_INCONSISTENCY_RESULT_CLOSURE void 34 #endif 35 36 /* Callback typedefs */ 37 /** 38 * Function called with information about a KYCAUTH incoming inconsistency. 39 * 40 * @param cls closure 41 * @param dc the inconsistency 42 * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop 43 */ 44 typedef enum GNUNET_GenericReturnValue 45 (*TALER_AUDITORDB_KycauthInInconsistencyCallback)( 46 TALER_AUDITORDB_KYCAUTH_IN_INCONSISTENCY_RESULT_CLOSURE *cls, 47 const struct TALER_AUDITORDB_KycauthInInconsistency *dc); 48 49 50 /** 51 * Get information about kycauth-in-inconsistency from the database. 52 * 53 * @param pg the database context 54 * @param limit number of records to return, negative for descending 55 * @param offset table row to start from, exclusive, direction determined by @a limit 56 * @param return_suppressed should suppressed rows be returned anyway? 57 * @param cb function to call with results 58 * @param cb_cls closure for @a cb 59 * @return query result status 60 */ 61 enum GNUNET_DB_QueryStatus 62 TALER_AUDITORDB_iterate_kycauth_in_inconsistencies ( 63 struct TALER_AUDITORDB_PostgresContext *pg, 64 int64_t limit, 65 uint64_t offset, 66 bool return_suppressed, 67 TALER_AUDITORDB_KycauthInInconsistencyCallback cb, 68 TALER_AUDITORDB_KYCAUTH_IN_INCONSISTENCY_RESULT_CLOSURE *cb_cls); 69 70 #endif