persist_aml_program_result.h (2016B)
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 persist_aml_program_result.h 18 * @brief implementation of the persist_aml_program_result function for Postgres 19 * @author Christian Grothoff 20 */ 21 #ifndef EXCHANGE_DATABASE_PERSIST_AML_PROGRAM_RESULT_H 22 #define EXCHANGE_DATABASE_PERSIST_AML_PROGRAM_RESULT_H 23 24 #include "taler/taler_util.h" 25 #include "taler/taler_json_lib.h" 26 #include "exchangedb_lib.h" 27 #include "exchange-database/set_aml_lock.h" 28 #include "exchange-database/clear_aml_lock.h" 29 30 31 /** 32 * Persist the given @a apr for the given process and account 33 * into the database via @a pg. Called within an open 34 * database transaction. 35 * 36 * @param pg database API handle 37 * @param process_row row identifying the legitimization process that was run, 38 * 0 if there was no legi process (for example, due to rule 39 * expiration triggering something) and we should simply 40 * create a new row 41 * @param account_id hash of account the result is about 42 * @param ret_pprs 43 * @param apr AML program result to persist 44 */ 45 enum GNUNET_DB_QueryStatus 46 TALER_EXCHANGEDB_persist_aml_program_result ( 47 struct TALER_EXCHANGEDB_PostgresContext *pg, 48 uint64_t process_row, 49 const struct TALER_NormalizedPaytoHashP *account_id, 50 const struct TALER_KYCLOGIC_AmlProgramResult *apr, 51 enum TALER_EXCHANGEDB_PersistProgramResultStatus *ret_pprs); 52 53 #endif