donau

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

commit fb272d8be79d84debd0a6d01134284b308141d9b
parent bc37d0f1b6a5de4e58d10736e61a050f4f092f97
Author: Casaburi Johannes <johannes.casaburi@students.bfh.ch>
Date:   Tue,  5 Dec 2023 15:53:22 +0100

[db] cleanup

Diffstat:
Dsrc/donaudb/plugin_donaudb_common.c | 199-------------------------------------------------------------------------------
Dsrc/donaudb/plugin_donaudb_common.h | 52----------------------------------------------------
2 files changed, 0 insertions(+), 251 deletions(-)

diff --git a/src/donaudb/plugin_donaudb_common.c b/src/donaudb/plugin_donaudb_common.c @@ -1,199 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2015, 2016, 2020 Taler Systems SA - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of CHARITYABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> -*/ -/** - * @file donaudb/plugin_donaudb_common.c - * @brief Functions shared across plugins, this file is meant to be - * included in each plugin. - * @author Christian Grothoff - */ -#include "taler/platform.h" -#include "plugin_donaudb_common.h" - - -// void -// TEH_COMMON_free_reserve_history ( -// void *cls, -// struct DONAUDB_ReserveHistory *rh) -// { -// (void) cls; -// while (NULL != rh) -// { -// switch (rh->type) -// { -// case DONAUDB_RO_BANK_TO_DONAU: -// { -// struct DONAUDB_BankTransfer *bt; - -// bt = rh->details.bank; -// GNUNET_free (bt->sender_account_details); -// GNUNET_free (bt); -// break; -// } -// case DONAUDB_RO_WITHDRAW_COIN: -// { -// struct DONAUDB_CollectableBlindcoin *cbc; - -// cbc = rh->details.withdraw; -// TALER_blinded_denom_sig_free (&cbc->sig); -// GNUNET_free (cbc); -// break; -// } -// case DONAUDB_RO_RECOUP_COIN: -// { -// struct DONAUDB_Recoup *recoup; - -// recoup = rh->details.recoup; -// TALER_denom_sig_free (&recoup->coin.denom_sig); -// GNUNET_free (recoup); -// break; -// } -// case DONAUDB_RO_DONAU_TO_BANK: -// { -// struct DONAUDB_ClosingTransfer *closing; - -// closing = rh->details.closing; -// GNUNET_free (closing->receiver_account_details); -// GNUNET_free (closing); -// break; -// } -// case DONAUDB_RO_PURSE_MERGE: -// { -// struct DONAUDB_PurseMerge *merge; - -// merge = rh->details.merge; -// GNUNET_free (merge); -// break; -// } -// case DONAUDB_RO_HISTORY_REQUEST: -// { -// struct DONAUDB_HistoryRequest *history; - -// history = rh->details.history; -// GNUNET_free (history); -// break; -// } -// case DONAUDB_RO_OPEN_REQUEST: -// { -// struct DONAUDB_OpenRequest *or; - -// or = rh->details.open_request; -// GNUNET_free (or); -// break; -// } -// case DONAUDB_RO_CLOSE_REQUEST: -// { -// struct DONAUDB_CloseRequest *cr; - -// cr = rh->details.close_request; -// GNUNET_free (cr); -// break; -// } -// } -// { -// struct DONAUDB_ReserveHistory *next; - -// next = rh->next; -// GNUNET_free (rh); -// rh = next; -// } -// } -// } - - -// void -// TEH_COMMON_free_coin_transaction_list ( -// void *cls, -// struct DONAUDB_TransactionList *tl) -// { -// (void) cls; -// while (NULL != tl) -// { -// switch (tl->type) -// { -// case DONAUDB_TT_DEPOSIT: -// { -// struct DONAUDB_DepositListEntry *deposit; - -// deposit = tl->details.deposit; -// GNUNET_free (deposit->receiver_wire_account); -// GNUNET_free (deposit); -// break; -// } -// case DONAUDB_TT_MELT: -// GNUNET_free (tl->details.melt); -// break; -// case DONAUDB_TT_OLD_COIN_RECOUP: -// { -// struct DONAUDB_RecoupRefreshListEntry *rr; - -// rr = tl->details.old_coin_recoup; -// TALER_denom_sig_free (&rr->coin.denom_sig); -// GNUNET_free (rr); -// break; -// } -// case DONAUDB_TT_REFUND: -// GNUNET_free (tl->details.refund); -// break; -// case DONAUDB_TT_RECOUP: -// GNUNET_free (tl->details.recoup); -// break; -// case DONAUDB_TT_RECOUP_REFRESH: -// { -// struct DONAUDB_RecoupRefreshListEntry *rr; - -// rr = tl->details.recoup_refresh; -// TALER_denom_sig_free (&rr->coin.denom_sig); -// GNUNET_free (rr); -// break; -// } -// case DONAUDB_TT_PURSE_DEPOSIT: -// { -// struct DONAUDB_PurseDepositListEntry *deposit; - -// deposit = tl->details.purse_deposit; -// GNUNET_free (deposit->donau_base_url); -// GNUNET_free (deposit); -// break; -// } -// case DONAUDB_TT_PURSE_REFUND: -// { -// struct DONAUDB_PurseRefundListEntry *prefund; - -// prefund = tl->details.purse_refund; -// GNUNET_free (prefund); -// break; -// } -// case DONAUDB_TT_RESERVE_OPEN: -// { -// struct DONAUDB_ReserveOpenListEntry *role; - -// role = tl->details.reserve_open; -// GNUNET_free (role); -// break; -// } -// } -// { -// struct DONAUDB_TransactionList *next; - -// next = tl->next; -// GNUNET_free (tl); -// tl = next; -// } -// } -// } - - -/* end of plugin_donaudb_common.c */ diff --git a/src/donaudb/plugin_donaudb_common.h b/src/donaudb/plugin_donaudb_common.h @@ -1,52 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2022 Taler Systems SA - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of CHARITYABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - */ -/** - * @file plugin_donaudb_common.h - * @brief implementation of database-independent functions - * @author Christian Grothoff - */ -#ifndef PLUGIN_DONAUDB_COMMON_H -#define PLUGIN_DONAUDB_COMMON_H - -#include "taler/taler_util.h" -#include "taler/taler_json_lib.h" -#include "donaudb_plugin.h" - -struct DONAUDB_ReserveHistory; -/** - * Free memory associated with the given reserve history. - * - * @param cls the @e cls of this struct with the plugin-specific state (unused) - * @param[in] rh history to free. - */ -void -TEH_COMMON_free_reserve_history ( - void *cls, - struct DONAUDB_ReserveHistory *rh); - - -/** - * Free linked list of transactions. - * - * @param cls the @e cls of this struct with the plugin-specific state (unused) - * @param[in] tl list to free - */ -// void -// TEH_COMMON_free_coin_transaction_list ( -// void *cls, -// struct DONAUDB_TransactionList *tl); - -#endif