donau

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

do_insert_receipt_issued.h (2081B)


      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 src/include/donau-database/do_do_insert_receipt_issued.h
     18  * @brief implementation of the do_insert_receipt_issued function for Postgres
     19  * @author Johannes Casaburi
     20  */
     21 #ifndef DONAU_DATABASE_DO_INSERT_RECEIPT_ISSUED_H
     22 #define DONAU_DATABASE_DO_INSERT_RECEIPT_ISSUED_H
     23 
     24 #include "donaudb_lib.h"
     25 
     26 
     27 /**
     28  * Insert issued blinded donation receipt to the charity.
     29  *
     30  * @param ctx closure
     31  * @param year the current year
     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[out] smaller_than_max_per_year new receipts to day smaller than the max?
     38  * @param[out] charity_unknown set to true if there is no charity with
     39  *             @a charity_id; in that case nothing was written and
     40  *             @a smaller_than_max_per_year is meaningless
     41  * @return transaction status code
     42  */
     43 enum GNUNET_DB_QueryStatus
     44 DONAUDB_do_insert_receipt_issued (
     45   struct DONAUDB_PostgresContext *ctx,
     46   uint32_t year,
     47   size_t num_blinded_sig,
     48   const struct DONAU_BlindedDonationUnitSignature signatures[num_blinded_sig],
     49   uint64_t charity_id,
     50   const struct DONAU_DonationReceiptHashP *h_receipt,
     51   const struct TALER_Amount *amount_receipts_request,
     52   bool *smaller_than_max_per_year,
     53   bool *charity_unknown);
     54 
     55 #endif