exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

iterate_kyc_reference.h (2985B)


      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 typedef void
     41 (*TALER_EXCHANGEDB_LegitimizationProcessCallback)(
     42   void *cls,
     43   const char *kyc_provider_name,
     44   const char *provider_user_id,
     45   const char *legi_id);
     46 
     47 
     48 /* Callback typedefs */
     49 /**
     50  * Function called on all legitimization operations
     51  * we have performed for the given account so far
     52  * (and that have not yet expired).
     53  *
     54  * @param cls closure
     55  * @param kyc_provider_name name of the provider
     56  *        of the respective KYC process
     57  * @param provider_user_id UID at a provider (can be NULL)
     58  * @param legi_id legitimization process ID (can be NULL)
     59  */
     60 typedef void
     61 (*TALER_EXCHANGEDB_LegitimizationProcessCallback)(
     62   void *cls,
     63   const char *kyc_provider_name,
     64   const char *provider_user_id,
     65   const char *legi_id);
     66 
     67 /**
     68  * Call us on KYC legitimization processes satisfied and not expired for the
     69  * given account.
     70  *
     71  * @param pg the database context
     72  * @param h_payto account identifier
     73  * @param lpc function to call for each satisfied KYC legitimization process
     74  * @param lpc_cls closure for @a lpc
     75  * @return transaction status code
     76  */
     77 enum GNUNET_DB_QueryStatus
     78 TALER_EXCHANGEDB_iterate_kyc_reference (struct
     79                                         TALER_EXCHANGEDB_PostgresContext *pg,
     80                                         const struct
     81                                         TALER_NormalizedPaytoHashP *
     82                                         h_payto,
     83                                         TALER_EXCHANGEDB_LegitimizationProcessCallback
     84                                         lpc,
     85                                         void *lpc_cls);
     86 
     87 #endif