exchange

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

get_denomination_pending.h (2519B)


      1 /*
      2    This file is part of TALER
      3    Copyright (C) 2024 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 #ifndef AUDITOR_DATABASE_GET_DENOMINATION_PENDING_H
     17 #define AUDITOR_DATABASE_GET_DENOMINATION_PENDING_H
     18 
     19 #include "taler/taler_util.h"
     20 #include "taler/taler_json_lib.h"
     21 #include "auditordb_lib.h"
     22 
     23 
     24 #ifndef TALER_AUDITORDB_DENOMINATION_PENDING_RESULT_CLOSURE
     25 /**
     26  * Type of the closure for #TALER_AUDITORDB_DenominationPendingCallback.
     27  */
     28 #define TALER_AUDITORDB_DENOMINATION_PENDING_RESULT_CLOSURE void
     29 #endif
     30 typedef enum GNUNET_GenericReturnValue
     31 (*TALER_AUDITORDB_DenominationPendingCallback)(
     32   TALER_AUDITORDB_DENOMINATION_PENDING_RESULT_CLOSURE *cls,
     33   uint64_t serial_id,
     34   const struct TALER_AUDITORDB_DenominationPending *dc);
     35 
     36 
     37 /* Callback typedefs */
     38 typedef enum GNUNET_GenericReturnValue
     39 (*TALER_AUDITORDB_DenominationPendingCallback)(
     40   TALER_AUDITORDB_DENOMINATION_PENDING_RESULT_CLOSURE *cls,
     41   uint64_t serial_id,
     42   const struct TALER_AUDITORDB_DenominationPending *dc);
     43 
     44 /**
     45  * Get information about denomination-pending from the database.
     46  *
     47  * @param pg the database context
     48  * @param limit number of records to return, negative for descending
     49  * @param offset table row to start from, exclusive, direction determined by @a limit
     50  * @param cb function to call with results
     51  * @param cb_cls closure for @a cb
     52  * @return query result status
     53  */
     54 enum GNUNET_DB_QueryStatus
     55 TALER_AUDITORDB_get_denomination_pending (struct
     56                                           TALER_AUDITORDB_PostgresContext *pg,
     57                                           int64_t limit,
     58                                           uint64_t offset,
     59                                           TALER_AUDITORDB_DenominationPendingCallback
     60                                           cb,
     61                                           TALER_AUDITORDB_DENOMINATION_PENDING_RESULT_CLOSURE
     62                                           *cb_cls);
     63 
     64 #endif