donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

pg_insert_issued_receipt.h (1800B)


      1 /*
      2    This file is part of TALER
      3    Copyright (C) 2023 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 donaudb/pg_insert_issued_receipt.h
     18  * @brief implementation of the insert_issued_receipt function for Postgres
     19  * @author Johannes Casaburi
     20  */
     21 #ifndef PG_INSERT_ISSUED_RECEIPT_H
     22 #define PG_INSERT_ISSUED_RECEIPT_H
     23 
     24 #include <taler/taler_util.h>
     25 #include <taler/taler_json_lib.h>
     26 #include "donaudb_plugin.h"
     27 
     28 /**
     29  * Insert issued blinded donation receipt to the charity.
     30  *
     31  * @param cls closure
     32  * @param num_blinded_sig
     33  * @param signatures blinded signatures
     34  * @param charity_id identifier of the charity
     35  * @param h_receipt hash of the donation receipt
     36  * @param amount_receipts_request donation amount
     37  * @param smaller_than_max_per_year new receipts to day smaller than the max?
     38  * @return transaction status code
     39  */
     40 enum GNUNET_DB_QueryStatus
     41 DH_PG_insert_issued_receipt (
     42   void *cls,
     43   const size_t num_blinded_sig,
     44   const struct DONAU_BlindedDonationUnitSignature signatures[num_blinded_sig],
     45   const uint64_t charity_id,
     46   const struct DONAU_DonationReceiptHashP *h_receipt,
     47   const struct TALER_Amount *amount_receipts_request,
     48   bool *smaller_than_max_per_year
     49   );
     50 
     51 #endif