select_wire_out_above_serial_id_by_account.h (3518B)
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 src/include/exchange-database/select_wire_out_above_serial_id_by_account.h 18 * @brief implementation of the select_wire_out_above_serial_id_by_account function for Postgres 19 * @author Christian Grothoff 20 */ 21 #ifndef EXCHANGE_DATABASE_SELECT_WIRE_OUT_ABOVE_SERIAL_ID_BY_ACCOUNT_H 22 #define EXCHANGE_DATABASE_SELECT_WIRE_OUT_ABOVE_SERIAL_ID_BY_ACCOUNT_H 23 24 #include "taler/taler_util.h" 25 #include "taler/taler_json_lib.h" 26 #include "exchangedb_lib.h" 27 28 29 /* Callback typedefs */ 30 /** 31 * Function called with the results of the lookup of the 32 * wire transfer data of the exchange. 33 * 34 * @param cls closure 35 * @param rowid identifier of the respective row in the database 36 * @param date timestamp of the wire transfer (roughly) 37 * @param wtid wire transfer subject 38 * @param payto_uri details of the receiver, URI in payto://-format 39 * @param amount amount that was wired 40 * @return #GNUNET_OK to continue, #GNUNET_SYSERR to stop iteration 41 */ 42 #ifndef TALER_EXCHANGEDB_WIRE_TRANSFER_OUT_RESULT_CLOSURE 43 /** 44 * Type of the closure for #TALER_EXCHANGEDB_WireTransferOutCallback. 45 */ 46 #define TALER_EXCHANGEDB_WIRE_TRANSFER_OUT_RESULT_CLOSURE void 47 #endif 48 typedef enum GNUNET_GenericReturnValue 49 (*TALER_EXCHANGEDB_WireTransferOutCallback)( 50 TALER_EXCHANGEDB_WIRE_TRANSFER_OUT_RESULT_CLOSURE *cls, 51 uint64_t rowid, 52 struct GNUNET_TIME_Timestamp date, 53 const struct TALER_WireTransferIdentifierRawP *wtid, 54 const struct TALER_FullPayto payto_uri, 55 const struct TALER_Amount *amount); 56 57 /** 58 * Function called to select all wire transfers the exchange 59 * executed by account. 60 * 61 * @param pg the database context 62 * @param account_name account to select 63 * @param serial_id highest serial ID to exclude (select strictly larger) 64 * @param cb function to call for ONE unfinished item 65 * @param cb_cls closure for @a cb 66 * @return transaction status code 67 */ 68 enum GNUNET_DB_QueryStatus 69 TALER_TALER_EXCHANGEDB_select_wire_out_above_serial_id_by_account (struct 70 TALER_EXCHANGEDB_PostgresContext 71 *pg, 72 const char * 73 account_name, 74 uint64_t 75 serial_id, 76 TALER_EXCHANGEDB_WireTransferOutCallback 77 cb, 78 TALER_EXCHANGEDB_WIRE_TRANSFER_OUT_RESULT_CLOSURE 79 *cb_cls) 80 ; 81 82 #endif