more renaming

This commit is contained in:
Christian Grothoff 2020-03-04 12:10:11 +01:00
parent c6874cdb1b
commit 642992f9c3
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
6 changed files with 58 additions and 59 deletions

View File

@ -66,7 +66,7 @@ struct HTD_Context
static void static void
handle_link_data (void *cls, handle_link_data (void *cls,
const struct TALER_TransferPublicKeyP *transfer_pub, const struct TALER_TransferPublicKeyP *transfer_pub,
const struct TALER_EXCHANGEDB_LinkDataList *ldl) const struct TALER_EXCHANGEDB_LinkList *ldl)
{ {
struct HTD_Context *ctx = cls; struct HTD_Context *ctx = cls;
json_t *list; json_t *list;
@ -77,7 +77,7 @@ handle_link_data (void *cls,
if (NULL == (list = json_array ())) if (NULL == (list = json_array ()))
goto fail; goto fail;
for (const struct TALER_EXCHANGEDB_LinkDataList *pos = ldl; for (const struct TALER_EXCHANGEDB_LinkList *pos = ldl;
NULL != pos; NULL != pos;
pos = pos->next) pos = pos->next)
{ {

View File

@ -141,7 +141,7 @@ struct RefreshMeltContext
* noreveal_index is only initialized during * noreveal_index is only initialized during
* #melt_transaction(). * #melt_transaction().
*/ */
struct TALER_EXCHANGEDB_RefreshSession refresh_session; struct TALER_EXCHANGEDB_Refresh refresh_session;
/** /**
* Information about the @e coin's value. * Information about the @e coin's value.

View File

@ -299,7 +299,7 @@ refresh_reveal_transaction (void *cls,
int *mhd_ret) int *mhd_ret)
{ {
struct RevealContext *rctx = cls; struct RevealContext *rctx = cls;
struct TALER_EXCHANGEDB_RefreshMelt melt; struct TALER_EXCHANGEDB_Melt melt;
enum GNUNET_DB_QueryStatus qs; enum GNUNET_DB_QueryStatus qs;
/* Obtain basic information about the refresh operation and what /* Obtain basic information about the refresh operation and what
@ -542,7 +542,7 @@ resolve_refresh_reveal_denominations (struct TEH_KS_StateHandle *key_state,
struct GNUNET_HashCode dki_h[num_fresh_coins]; struct GNUNET_HashCode dki_h[num_fresh_coins];
struct TALER_RefreshCoinData rcds[num_fresh_coins]; struct TALER_RefreshCoinData rcds[num_fresh_coins];
struct TALER_CoinSpendSignatureP link_sigs[num_fresh_coins]; struct TALER_CoinSpendSignatureP link_sigs[num_fresh_coins];
struct TALER_EXCHANGEDB_RefreshMelt melt; struct TALER_EXCHANGEDB_Melt melt;
int res; int res;
/* Parse denomination key hashes */ /* Parse denomination key hashes */

View File

@ -3398,7 +3398,7 @@ static enum GNUNET_DB_QueryStatus
postgres_get_melt (void *cls, postgres_get_melt (void *cls,
struct TALER_EXCHANGEDB_Session *session, struct TALER_EXCHANGEDB_Session *session,
const struct TALER_RefreshCommitmentP *rc, const struct TALER_RefreshCommitmentP *rc,
struct TALER_EXCHANGEDB_RefreshMelt *melt) struct TALER_EXCHANGEDB_Melt *melt)
{ {
struct PostgresClosure *pg = cls; struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = { struct GNUNET_PQ_QueryParam params[] = {
@ -3483,7 +3483,7 @@ static enum GNUNET_DB_QueryStatus
postgres_insert_melt (void *cls, postgres_insert_melt (void *cls,
struct TALER_EXCHANGEDB_Session *session, struct TALER_EXCHANGEDB_Session *session,
const struct const struct
TALER_EXCHANGEDB_RefreshSession *refresh_session) TALER_EXCHANGEDB_Refresh *refresh_session)
{ {
struct GNUNET_PQ_QueryParam params[] = { struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (&refresh_session->rc), GNUNET_PQ_query_param_auto_from_type (&refresh_session->rc),
@ -3787,7 +3787,7 @@ struct LinkDataContext
/** /**
* Function to call on each result. * Function to call on each result.
*/ */
TALER_EXCHANGEDB_LinkDataCallback ldc; TALER_EXCHANGEDB_LinkCallback ldc;
/** /**
* Closure for @e ldc. * Closure for @e ldc.
@ -3803,7 +3803,7 @@ struct LinkDataContext
/** /**
* Link data for @e transfer_pub * Link data for @e transfer_pub
*/ */
struct TALER_EXCHANGEDB_LinkDataList *last; struct TALER_EXCHANGEDB_LinkList *last;
/** /**
* Status, set to #GNUNET_SYSERR on errors, * Status, set to #GNUNET_SYSERR on errors,
@ -3820,9 +3820,9 @@ struct LinkDataContext
*/ */
static void static void
free_link_data_list (void *cls, free_link_data_list (void *cls,
struct TALER_EXCHANGEDB_LinkDataList *ldl) struct TALER_EXCHANGEDB_LinkList *ldl)
{ {
struct TALER_EXCHANGEDB_LinkDataList *next; struct TALER_EXCHANGEDB_LinkList *next;
(void) cls; (void) cls;
while (NULL != ldl) while (NULL != ldl)
@ -3855,10 +3855,10 @@ add_ldl (void *cls,
for (int i = num_results - 1; i >= 0; i--) for (int i = num_results - 1; i >= 0; i--)
{ {
struct TALER_EXCHANGEDB_LinkDataList *pos; struct TALER_EXCHANGEDB_LinkList *pos;
struct TALER_TransferPublicKeyP transfer_pub; struct TALER_TransferPublicKeyP transfer_pub;
pos = GNUNET_new (struct TALER_EXCHANGEDB_LinkDataList); pos = GNUNET_new (struct TALER_EXCHANGEDB_LinkList);
{ {
struct GNUNET_PQ_ResultSpec rs[] = { struct GNUNET_PQ_ResultSpec rs[] = {
GNUNET_PQ_result_spec_auto_from_type ("transfer_pub", GNUNET_PQ_result_spec_auto_from_type ("transfer_pub",
@ -3921,7 +3921,7 @@ static enum GNUNET_DB_QueryStatus
postgres_get_link_data (void *cls, postgres_get_link_data (void *cls,
struct TALER_EXCHANGEDB_Session *session, struct TALER_EXCHANGEDB_Session *session,
const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_CoinSpendPublicKeyP *coin_pub,
TALER_EXCHANGEDB_LinkDataCallback ldc, TALER_EXCHANGEDB_LinkCallback ldc,
void *ldc_cls) void *ldc_cls)
{ {
struct GNUNET_PQ_QueryParam params[] = { struct GNUNET_PQ_QueryParam params[] = {
@ -5559,7 +5559,7 @@ struct RefreshsSerialContext
/** /**
* Callback to call. * Callback to call.
*/ */
TALER_EXCHANGEDB_RefreshSessionCallback cb; TALER_EXCHANGEDB_RefreshesCallback cb;
/** /**
* Closure for @e cb. * Closure for @e cb.
@ -5662,7 +5662,7 @@ postgres_select_refreshs_above_serial_id (void *cls,
struct TALER_EXCHANGEDB_Session * struct TALER_EXCHANGEDB_Session *
session, session,
uint64_t serial_id, uint64_t serial_id,
TALER_EXCHANGEDB_RefreshSessionCallback TALER_EXCHANGEDB_RefreshesCallback
cb, cb,
void *cb_cls) void *cb_cls)
{ {

View File

@ -448,9 +448,9 @@ static struct DenomKeyPair **new_dkp;
static void static void
handle_link_data_cb (void *cls, handle_link_data_cb (void *cls,
const struct TALER_TransferPublicKeyP *transfer_pub, const struct TALER_TransferPublicKeyP *transfer_pub,
const struct TALER_EXCHANGEDB_LinkDataList *ldl) const struct TALER_EXCHANGEDB_LinkList *ldl)
{ {
for (const struct TALER_EXCHANGEDB_LinkDataList *ldlp = ldl; for (const struct TALER_EXCHANGEDB_LinkList *ldlp = ldl;
NULL != ldlp; NULL != ldlp;
ldlp = ldlp->next) ldlp = ldlp->next)
{ {
@ -488,8 +488,8 @@ handle_link_data_cb (void *cls,
static int static int
test_melting (struct TALER_EXCHANGEDB_Session *session) test_melting (struct TALER_EXCHANGEDB_Session *session)
{ {
struct TALER_EXCHANGEDB_RefreshSession refresh_session; struct TALER_EXCHANGEDB_Refresh refresh_session;
struct TALER_EXCHANGEDB_RefreshMelt ret_refresh_session; struct TALER_EXCHANGEDB_Melt ret_refresh_session;
struct DenomKeyPair *dkp; struct DenomKeyPair *dkp;
struct TALER_DenominationPublicKey *new_denom_pubs; struct TALER_DenominationPublicKey *new_denom_pubs;
int ret; int ret;
@ -2070,7 +2070,7 @@ run (void *cls)
case TALER_EXCHANGEDB_TT_MELT: case TALER_EXCHANGEDB_TT_MELT:
FAILIF (0 != memcmp (&melt, FAILIF (0 != memcmp (&melt,
&tlp->details.melt, &tlp->details.melt,
sizeof (struct TALER_EXCHANGEDB_RefreshMelt))); sizeof (struct TALER_EXCHANGEDB_Melt)));
matched |= 2; matched |= 2;
break; break;
#endif #endif

View File

@ -729,7 +729,7 @@ struct TALER_EXCHANGEDB_Refund
/** /**
* @brief Specification for coin in a /refresh/melt operation. * @brief Specification for coin in a /refresh/melt operation.
*/ */
struct TALER_EXCHANGEDB_RefreshSession struct TALER_EXCHANGEDB_Refresh
{ {
/** /**
* Information about the coin that is being melted. * Information about the coin that is being melted.
@ -808,13 +808,13 @@ struct TALER_EXCHANGEDB_MeltListEntry
/** /**
* Information about a melt operation. * Information about a melt operation.
*/ */
struct TALER_EXCHANGEDB_RefreshMelt struct TALER_EXCHANGEDB_Melt
{ {
/** /**
* Overall session data. * Overall session data.
*/ */
struct TALER_EXCHANGEDB_RefreshSession session; struct TALER_EXCHANGEDB_Refresh session;
/** /**
* Melt fee the exchange charged. * Melt fee the exchange charged.
@ -827,12 +827,12 @@ struct TALER_EXCHANGEDB_RefreshMelt
/** /**
* @brief Linked list of refresh information linked to a coin. * @brief Linked list of refresh information linked to a coin.
*/ */
struct TALER_EXCHANGEDB_LinkDataList struct TALER_EXCHANGEDB_LinkList
{ {
/** /**
* Information is stored in a NULL-terminated linked list. * Information is stored in a NULL-terminated linked list.
*/ */
struct TALER_EXCHANGEDB_LinkDataList *next; struct TALER_EXCHANGEDB_LinkList *next;
/** /**
* Denomination public key, determines the value of the coin. * Denomination public key, determines the value of the coin.
@ -920,38 +920,38 @@ struct TALER_EXCHANGEDB_TransactionList
{ {
/** /**
* Details if transaction was a /deposit operation. * Details if transaction was a deposit operation.
* (#TALER_EXCHANGEDB_TT_DEPOSIT) * (#TALER_EXCHANGEDB_TT_DEPOSIT)
*/ */
struct TALER_EXCHANGEDB_DepositListEntry *deposit; struct TALER_EXCHANGEDB_DepositListEntry *deposit;
/** /**
* Details if transaction was a /refresh/melt operation. * Details if transaction was a melt operation.
* (#TALER_EXCHANGEDB_TT_MELT) * (#TALER_EXCHANGEDB_TT_MELT)
*/ */
struct TALER_EXCHANGEDB_MeltListEntry *melt; struct TALER_EXCHANGEDB_MeltListEntry *melt;
/** /**
* Details if transaction was a /refund operation. * Details if transaction was a refund operation.
* (#TALER_EXCHANGEDB_TT_REFUND) * (#TALER_EXCHANGEDB_TT_REFUND)
*/ */
struct TALER_EXCHANGEDB_RefundListEntry *refund; struct TALER_EXCHANGEDB_RefundListEntry *refund;
/** /**
* Details if transaction was a /recoup-refund operation where * Details if transaction was a recoup-refund operation where
* this coin was the OLD coin. * this coin was the OLD coin.
* (#TALER_EXCHANGEDB_TT_OLD_COIN_RECOUP). * (#TALER_EXCHANGEDB_TT_OLD_COIN_RECOUP).
*/ */
struct TALER_EXCHANGEDB_RecoupRefreshListEntry *old_coin_recoup; struct TALER_EXCHANGEDB_RecoupRefreshListEntry *old_coin_recoup;
/** /**
* Details if transaction was a /recoup operation. * Details if transaction was a recoup operation.
* (#TALER_EXCHANGEDB_TT_RECOUP) * (#TALER_EXCHANGEDB_TT_RECOUP)
*/ */
struct TALER_EXCHANGEDB_RecoupListEntry *recoup; struct TALER_EXCHANGEDB_RecoupListEntry *recoup;
/** /**
* Details if transaction was a /recoup-refund operation where * Details if transaction was a recoup-refund operation where
* this coin was the REFRESHED coin. * this coin was the REFRESHED coin.
* (#TALER_EXCHANGEDB_TT_RECOUP_REFRESH) * (#TALER_EXCHANGEDB_TT_RECOUP_REFRESH)
*/ */
@ -1076,20 +1076,20 @@ typedef int
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
*/ */
typedef int typedef int
(*TALER_EXCHANGEDB_RefreshSessionCallback)(void *cls, (*TALER_EXCHANGEDB_RefreshesCallback)(void *cls,
uint64_t rowid, uint64_t rowid,
const struct const struct
TALER_DenominationPublicKey * TALER_DenominationPublicKey *
denom_pub, denom_pub,
const struct const struct
TALER_CoinSpendPublicKeyP *coin_pub, TALER_CoinSpendPublicKeyP *coin_pub,
const struct const struct
TALER_CoinSpendSignatureP *coin_sig, TALER_CoinSpendSignatureP *coin_sig,
const struct const struct
TALER_Amount *amount_with_fee, TALER_Amount *amount_with_fee,
uint32_t noreveal_index, uint32_t noreveal_index,
const struct const struct
TALER_RefreshCommitmentP *rc); TALER_RefreshCommitmentP *rc);
/** /**
@ -1108,7 +1108,7 @@ typedef int
/** /**
* Information about a coin that was revealed to the exchange * Information about a coin that was revealed to the exchange
* during /refresh/reveal. * during reveal.
*/ */
struct TALER_EXCHANGEDB_RefreshRevealedCoin struct TALER_EXCHANGEDB_RefreshRevealedCoin
{ {
@ -1255,17 +1255,16 @@ typedef int
* @param ldl link data for @a transfer_pub * @param ldl link data for @a transfer_pub
*/ */
typedef void typedef void
(*TALER_EXCHANGEDB_LinkDataCallback)(void *cls, (*TALER_EXCHANGEDB_LinkCallback)(void *cls,
const struct const struct
TALER_TransferPublicKeyP *transfer_pub, TALER_TransferPublicKeyP *transfer_pub,
const struct const struct TALER_EXCHANGEDB_LinkList *ldl);
TALER_EXCHANGEDB_LinkDataList *ldl);
/** /**
* Function called with the results of the lookup of the * Function called with the results of the lookup of the wire transfer
* wire transfer identifier information. Only called if * identifier information. Only called if we are at least aware of the
* we are at least aware of the transaction existing. * transaction existing.
* *
* @param cls closure * @param cls closure
* @param wtid wire transfer identifier, NULL * @param wtid wire transfer identifier, NULL
@ -2078,7 +2077,7 @@ struct TALER_EXCHANGEDB_Plugin
enum GNUNET_DB_QueryStatus enum GNUNET_DB_QueryStatus
(*insert_melt)(void *cls, (*insert_melt)(void *cls,
struct TALER_EXCHANGEDB_Session *session, struct TALER_EXCHANGEDB_Session *session,
const struct TALER_EXCHANGEDB_RefreshSession *refresh_session); const struct TALER_EXCHANGEDB_Refresh *refresh_session);
/** /**
@ -2096,7 +2095,7 @@ struct TALER_EXCHANGEDB_Plugin
(*get_melt)(void *cls, (*get_melt)(void *cls,
struct TALER_EXCHANGEDB_Session *session, struct TALER_EXCHANGEDB_Session *session,
const struct TALER_RefreshCommitmentP *rc, const struct TALER_RefreshCommitmentP *rc,
struct TALER_EXCHANGEDB_RefreshMelt *melt); struct TALER_EXCHANGEDB_Melt *melt);
/** /**
@ -2181,7 +2180,7 @@ struct TALER_EXCHANGEDB_Plugin
(*get_link_data)(void *cls, (*get_link_data)(void *cls,
struct TALER_EXCHANGEDB_Session *session, struct TALER_EXCHANGEDB_Session *session,
const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_CoinSpendPublicKeyP *coin_pub,
TALER_EXCHANGEDB_LinkDataCallback ldc, TALER_EXCHANGEDB_LinkCallback ldc,
void *tdc_cls); void *tdc_cls);
@ -2504,7 +2503,7 @@ struct TALER_EXCHANGEDB_Plugin
(*select_refreshs_above_serial_id)(void *cls, (*select_refreshs_above_serial_id)(void *cls,
struct TALER_EXCHANGEDB_Session *session, struct TALER_EXCHANGEDB_Session *session,
uint64_t serial_id, uint64_t serial_id,
TALER_EXCHANGEDB_RefreshSessionCallback cb, TALER_EXCHANGEDB_RefreshesCallback cb,
void *cb_cls); void *cb_cls);