exchange

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

iterate_aml_staff.h (2641B)


      1 /*
      2    This file is part of TALER
      3    Copyright (C) 2026 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/auditor-database/iterate_aml_staff.h
     18  * @brief implementation of the iterate_aml_staff function for Postgres
     19  * @author Christian Grothoff
     20  */
     21 #ifndef AUDITOR_DATABASE_ITERATE_AML_STAFF_H
     22 #define AUDITOR_DATABASE_ITERATE_AML_STAFF_H
     23 
     24 #include "taler/taler_util.h"
     25 #include "auditordb_lib.h"
     26 
     27 
     28 #ifndef TALER_AUDITORDB_AML_STAFF_RESULT_CLOSURE
     29 /**
     30  * Type of the closure for #TALER_AUDITORDB_AmlStaffCallback.
     31  */
     32 #define TALER_AUDITORDB_AML_STAFF_RESULT_CLOSURE void
     33 #endif
     34 
     35 /* Callback typedefs */
     36 /**
     37  * Function called with an AML staff status change the auditor recorded
     38  * earlier.
     39  *
     40  * @param cls closure
     41  * @param decider_pub public key of the staff member
     42  * @param decider_name legal name of the staff member
     43  * @param is_active true if the staff member could act from @a last_change on
     44  * @param read_only true if the staff member had read-only access
     45  * @param master_sig_valid true if the exchange's offline master key really
     46  *        did sign this status
     47  * @param last_change when the status took effect
     48  * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
     49  */
     50 typedef enum GNUNET_GenericReturnValue
     51 (*TALER_AUDITORDB_AmlStaffCallback)(
     52   TALER_AUDITORDB_AML_STAFF_RESULT_CLOSURE *cls,
     53   const struct TALER_AmlOfficerPublicKeyP *decider_pub,
     54   const char *decider_name,
     55   bool is_active,
     56   bool read_only,
     57   bool master_sig_valid,
     58   struct GNUNET_TIME_Timestamp last_change);
     59 
     60 
     61 /**
     62  * Get all AML staff status changes the auditor has recorded, oldest first,
     63  * so that the caller can reconstruct who was allowed to decide when.
     64  *
     65  * @param pg the database context
     66  * @param cb function to call with results
     67  * @param cb_cls closure for @a cb
     68  * @return query result status
     69  */
     70 enum GNUNET_DB_QueryStatus
     71 TALER_AUDITORDB_iterate_aml_staff (
     72   struct TALER_AUDITORDB_PostgresContext *pg,
     73   TALER_AUDITORDB_AmlStaffCallback cb,
     74   TALER_AUDITORDB_AML_STAFF_RESULT_CLOSURE *cb_cls);
     75 
     76 #endif