get_deposit_confirmations.h (2445B)
1 /* 2 This file is part of TALER 3 Copyright (C) 2022 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 get_deposit_confirmations.h 18 * @brief implementation of the get_deposit_confirmations function 19 * @author Christian Grothoff 20 */ 21 #ifndef AUDITOR_DATABASE_GET_DEPOSIT_CONFIRMATIONS_H 22 #define AUDITOR_DATABASE_GET_DEPOSIT_CONFIRMATIONS_H 23 24 #include "taler/taler_util.h" 25 #include "taler/taler_json_lib.h" 26 #include "auditordb_lib.h" 27 28 29 /** 30 * Function called with deposit confirmations stored in 31 * the auditor's database. 32 * 33 * @param cls closure 34 * @param dc the deposit confirmation itself 35 * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating 36 */ 37 #ifndef TALER_AUDITORDB_DEPOSIT_CONFIRMATION_RESULT_CLOSURE 38 /** 39 * Type of the closure for #TALER_AUDITORDB_DepositConfirmationCallback. 40 */ 41 #define TALER_AUDITORDB_DEPOSIT_CONFIRMATION_RESULT_CLOSURE void 42 #endif 43 typedef enum GNUNET_GenericReturnValue 44 (*TALER_AUDITORDB_DepositConfirmationCallback)( 45 TALER_AUDITORDB_DEPOSIT_CONFIRMATION_RESULT_CLOSURE *cls, 46 const struct TALER_AUDITORDB_DepositConfirmation *dc); 47 48 /** 49 * Get information about deposit confirmations from the database. 50 * 51 * @param pg the database context 52 * @param limit number of records to return, negative for descending 53 * @param offset table row to start from, exclusive, direction determined by @a limit 54 * @param return_suppressed should suppressed rows be returned anyway? 55 * @param cb function to call with results 56 * @param cb_cls closure for @a cb 57 * @return query result status 58 */ 59 enum GNUNET_DB_QueryStatus 60 TALER_AUDITORDB_get_deposit_confirmations ( 61 struct TALER_AUDITORDB_PostgresContext *pg, 62 int64_t limit, 63 uint64_t offset, 64 bool return_suppressed, 65 TALER_AUDITORDB_DepositConfirmationCallback cb, 66 TALER_AUDITORDB_DEPOSIT_CONFIRMATION_RESULT_CLOSURE *cb_cls); 67 68 #endif