get_deposit_confirmations.h (2138B)
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 typedef enum GNUNET_GenericReturnValue 38 (*TALER_AUDITORDB_DepositConfirmationCallback)( 39 void *cls, 40 const struct TALER_AUDITORDB_DepositConfirmation *dc); 41 42 /** 43 * Get information about deposit confirmations from the database. 44 * 45 * @param pg the database context 46 * @param limit number of records to return, negative for descending 47 * @param offset table row to start from, exclusive, direction determined by @a limit 48 * @param return_suppressed should suppressed rows be returned anyway? 49 * @param cb function to call with results 50 * @param cb_cls closure for @a cb 51 * @return query result status 52 */ 53 enum GNUNET_DB_QueryStatus 54 TALER_AUDITORDB_get_deposit_confirmations ( 55 struct TALER_AUDITORDB_PostgresContext *pg, 56 int64_t limit, 57 uint64_t offset, 58 bool return_suppressed, 59 TALER_AUDITORDB_DepositConfirmationCallback cb, 60 void *cb_cls); 61 62 #endif