iterate_kyc_reference.h (3397B)
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 iterate_kyc_reference.h 18 * @brief implementation of the iterate_kyc_reference function 19 * @author Christian Grothoff 20 */ 21 #ifndef EXCHANGE_DATABASE_ITERATE_KYC_REFERENCE_H 22 #define EXCHANGE_DATABASE_ITERATE_KYC_REFERENCE_H 23 24 #include "taler/taler_util.h" 25 #include "taler/taler_json_lib.h" 26 #include "exchangedb_lib.h" 27 28 29 /** 30 * Function called on all legitimization operations 31 * we have performed for the given account so far 32 * (and that have not yet expired). 33 * 34 * @param cls closure 35 * @param kyc_provider_name name of the provider 36 * of the respective KYC process 37 * @param provider_user_id UID at a provider (can be NULL) 38 * @param legi_id legitimization process ID (can be NULL) 39 */ 40 #ifndef TALER_EXCHANGEDB_LEGITIMIZATION_PROCESS_RESULT_CLOSURE 41 /** 42 * Type of the closure for #TALER_EXCHANGEDB_LegitimizationProcessCallback. 43 */ 44 #define TALER_EXCHANGEDB_LEGITIMIZATION_PROCESS_RESULT_CLOSURE void 45 #endif 46 typedef void 47 (*TALER_EXCHANGEDB_LegitimizationProcessCallback)( 48 TALER_EXCHANGEDB_LEGITIMIZATION_PROCESS_RESULT_CLOSURE *cls, 49 const char *kyc_provider_name, 50 const char *provider_user_id, 51 const char *legi_id); 52 53 54 /* Callback typedefs */ 55 /** 56 * Function called on all legitimization operations 57 * we have performed for the given account so far 58 * (and that have not yet expired). 59 * 60 * @param cls closure 61 * @param kyc_provider_name name of the provider 62 * of the respective KYC process 63 * @param provider_user_id UID at a provider (can be NULL) 64 * @param legi_id legitimization process ID (can be NULL) 65 */ 66 typedef void 67 (*TALER_EXCHANGEDB_LegitimizationProcessCallback)( 68 TALER_EXCHANGEDB_LEGITIMIZATION_PROCESS_RESULT_CLOSURE *cls, 69 const char *kyc_provider_name, 70 const char *provider_user_id, 71 const char *legi_id); 72 73 /** 74 * Call us on KYC legitimization processes satisfied and not expired for the 75 * given account. 76 * 77 * @param pg the database context 78 * @param h_payto account identifier 79 * @param lpc function to call for each satisfied KYC legitimization process 80 * @param lpc_cls closure for @a lpc 81 * @return transaction status code 82 */ 83 enum GNUNET_DB_QueryStatus 84 TALER_EXCHANGEDB_iterate_kyc_reference (struct 85 TALER_EXCHANGEDB_PostgresContext *pg, 86 const struct 87 TALER_NormalizedPaytoHashP * 88 h_payto, 89 TALER_EXCHANGEDB_LegitimizationProcessCallback 90 lpc, 91 TALER_EXCHANGEDB_LEGITIMIZATION_PROCESS_RESULT_CLOSURE 92 *lpc_cls); 93 94 #endif