do_persist_aml_program_result.h (2137B)
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 do_persist_aml_program_result.h 18 * @brief implementation of the do_persist_aml_program_result function for Postgres 19 * @author Christian Grothoff 20 */ 21 #ifndef EXCHANGE_DATABASE_DO_PERSIST_AML_PROGRAM_RESULT_H 22 #define EXCHANGE_DATABASE_DO_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/update_to_aml_locked.h" 28 #include "exchange-database/update_to_aml_unlocked.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 * Primary test table: `legitimization_outcomes` (see test_legitimization_outcomes.c). 37 * 38 * @param pg database API handle 39 * @param process_row row identifying the legitimization process that was run, 40 * 0 if there was no legi process (for example, due to rule 41 * expiration triggering something) and we should simply 42 * create a new row 43 * @param account_id hash of account the result is about 44 * @param ret_pprs 45 * @param apr AML program result to persist 46 */ 47 enum GNUNET_DB_QueryStatus 48 TALER_EXCHANGEDB_do_persist_aml_program_result ( 49 struct TALER_EXCHANGEDB_PostgresContext *pg, 50 uint64_t process_row, 51 const struct TALER_NormalizedPaytoHashP *account_id, 52 const struct TALER_KYCLOGIC_AmlProgramResult *apr, 53 enum TALER_EXCHANGEDB_PersistProgramResultStatus *ret_pprs); 54 55 #endif