style, indentation and type fixes for lib/

This commit is contained in:
Christian Grothoff 2020-03-17 17:47:53 +01:00
parent c17909d820
commit 86f2d65daf
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
11 changed files with 162 additions and 197 deletions

View File

@ -114,11 +114,11 @@ enum TALER_AUDITOR_VersionCompatibility
* @param compat protocol compatibility information * @param compat protocol compatibility information
*/ */
typedef void typedef void
(*TALER_AUDITOR_VersionCallback) (void *cls, (*TALER_AUDITOR_VersionCallback) (
const struct void *cls,
TALER_AUDITOR_VersionInformation *vi, const struct
enum TALER_AUDITOR_VersionCompatibility TALER_AUDITOR_VersionInformation *vi,
compat); enum TALER_AUDITOR_VersionCompatibility compat);
/** /**
@ -214,32 +214,24 @@ typedef void
* signatures fail to verify). In this case, the callback is not called. * signatures fail to verify). In this case, the callback is not called.
*/ */
struct TALER_AUDITOR_DepositConfirmationHandle * struct TALER_AUDITOR_DepositConfirmationHandle *
TALER_AUDITOR_deposit_confirmation (struct TALER_AUDITOR_Handle *auditor, TALER_AUDITOR_deposit_confirmation (
const struct GNUNET_HashCode *h_wire, struct TALER_AUDITOR_Handle *auditor,
const struct const struct GNUNET_HashCode *h_wire,
GNUNET_HashCode *h_contract_terms, const struct GNUNET_HashCode *h_contract_terms,
struct GNUNET_TIME_Absolute timestamp, struct GNUNET_TIME_Absolute timestamp,
struct GNUNET_TIME_Absolute refund_deadline, struct GNUNET_TIME_Absolute refund_deadline,
const struct const struct TALER_Amount *amount_without_fee,
TALER_Amount *amount_without_fee, const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct const struct TALER_MerchantPublicKeyP *merchant_pub,
TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_ExchangePublicKeyP *exchange_pub,
const struct const struct TALER_ExchangeSignatureP *exchange_sig,
TALER_MerchantPublicKeyP *merchant_pub, const struct TALER_MasterPublicKeyP *master_pub,
const struct struct GNUNET_TIME_Absolute ep_start,
TALER_ExchangePublicKeyP *exchange_pub, struct GNUNET_TIME_Absolute ep_expire,
const struct struct GNUNET_TIME_Absolute ep_end,
TALER_ExchangeSignatureP *exchange_sig, const struct TALER_MasterSignatureP *master_sig,
const struct TALER_AUDITOR_DepositConfirmationResultCallback cb,
TALER_MasterPublicKeyP *master_pub, void *cb_cls);
struct GNUNET_TIME_Absolute ep_start,
struct GNUNET_TIME_Absolute ep_expire,
struct GNUNET_TIME_Absolute ep_end,
const struct
TALER_MasterSignatureP *master_sig,
TALER_AUDITOR_DepositConfirmationResultCallback
cb,
void *cb_cls);
/** /**
@ -249,9 +241,8 @@ TALER_AUDITOR_deposit_confirmation (struct TALER_AUDITOR_Handle *auditor,
* @param deposit_confirmation the deposit-confirmation permission request handle * @param deposit_confirmation the deposit-confirmation permission request handle
*/ */
void void
TALER_AUDITOR_deposit_confirmation_cancel (struct TALER_AUDITOR_deposit_confirmation_cancel (
TALER_AUDITOR_DepositConfirmationHandle struct TALER_AUDITOR_DepositConfirmationHandle *deposit_confirmation);
*deposit_confirmation);
/** /**
@ -290,13 +281,13 @@ struct TALER_AUDITOR_ExchangeInfo
* @param raw_response raw JSON response * @param raw_response raw JSON response
*/ */
typedef void typedef void
(*TALER_AUDITOR_ListExchangesResultCallback)(void *cls, (*TALER_AUDITOR_ListExchangesResultCallback)(
unsigned int http_status, void *cls,
enum TALER_ErrorCode ec, unsigned int http_status,
unsigned int num_exchanges, enum TALER_ErrorCode ec,
const struct unsigned int num_exchanges,
TALER_AUDITOR_ExchangeInfo *ei, const struct TALER_AUDITOR_ExchangeInfo *ei,
const json_t *raw_response); const json_t *raw_response);
/** /**
* Submit an /exchanges request to the auditor and get the * Submit an /exchanges request to the auditor and get the
@ -322,8 +313,8 @@ TALER_AUDITOR_list_exchanges (struct TALER_AUDITOR_Handle *auditor,
* @param leh the list exchanges request handle * @param leh the list exchanges request handle
*/ */
void void
TALER_AUDITOR_list_exchanges_cancel (struct TALER_AUDITOR_list_exchanges_cancel (
TALER_AUDITOR_ListExchangesHandle *leh); struct TALER_AUDITOR_ListExchangesHandle *leh);
#endif /* _TALER_AUDITOR_SERVICE_H */ #endif /* _TALER_AUDITOR_SERVICE_H */

View File

@ -517,9 +517,9 @@ TALER_EXCHANGE_get_base_url (const struct TALER_EXCHANGE_Handle *exchange);
* found * found
*/ */
const struct TALER_EXCHANGE_DenomPublicKey * const struct TALER_EXCHANGE_DenomPublicKey *
TALER_EXCHANGE_get_denomination_key (const struct TALER_EXCHANGE_Keys *keys, TALER_EXCHANGE_get_denomination_key (
const struct const struct TALER_EXCHANGE_Keys *keys,
TALER_DenominationPublicKey *pk); const struct TALER_DenominationPublicKey *pk);
/** /**
@ -529,8 +529,8 @@ TALER_EXCHANGE_get_denomination_key (const struct TALER_EXCHANGE_Keys *keys,
* @returns a copy, must be freed with #TALER_EXCHANGE_destroy_denomination_key * @returns a copy, must be freed with #TALER_EXCHANGE_destroy_denomination_key
*/ */
struct TALER_EXCHANGE_DenomPublicKey * struct TALER_EXCHANGE_DenomPublicKey *
TALER_EXCHANGE_copy_denomination_key (const struct TALER_EXCHANGE_copy_denomination_key (
TALER_EXCHANGE_DenomPublicKey *key); const struct TALER_EXCHANGE_DenomPublicKey *key);
/** /**
@ -540,8 +540,8 @@ TALER_EXCHANGE_copy_denomination_key (const struct
* @param key key to destroy. * @param key key to destroy.
*/ */
void void
TALER_EXCHANGE_destroy_denomination_key (struct TALER_EXCHANGE_destroy_denomination_key (
TALER_EXCHANGE_DenomPublicKey *key); struct TALER_EXCHANGE_DenomPublicKey *key);
/** /**

View File

@ -261,32 +261,24 @@ verify_signatures (const struct GNUNET_HashCode *h_wire,
* signatures fail to verify). In this case, the callback is not called. * signatures fail to verify). In this case, the callback is not called.
*/ */
struct TALER_AUDITOR_DepositConfirmationHandle * struct TALER_AUDITOR_DepositConfirmationHandle *
TALER_AUDITOR_deposit_confirmation (struct TALER_AUDITOR_Handle *auditor, TALER_AUDITOR_deposit_confirmation (
const struct GNUNET_HashCode *h_wire, struct TALER_AUDITOR_Handle *auditor,
const struct const struct GNUNET_HashCode *h_wire,
GNUNET_HashCode *h_contract_terms, const struct GNUNET_HashCode *h_contract_terms,
struct GNUNET_TIME_Absolute timestamp, struct GNUNET_TIME_Absolute timestamp,
struct GNUNET_TIME_Absolute refund_deadline, struct GNUNET_TIME_Absolute refund_deadline,
const struct const struct TALER_Amount *amount_without_fee,
TALER_Amount *amount_without_fee, const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct const struct TALER_MerchantPublicKeyP *merchant_pub,
TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_ExchangePublicKeyP *exchange_pub,
const struct const struct TALER_ExchangeSignatureP *exchange_sig,
TALER_MerchantPublicKeyP *merchant_pub, const struct TALER_MasterPublicKeyP *master_pub,
const struct struct GNUNET_TIME_Absolute ep_start,
TALER_ExchangePublicKeyP *exchange_pub, struct GNUNET_TIME_Absolute ep_expire,
const struct struct GNUNET_TIME_Absolute ep_end,
TALER_ExchangeSignatureP *exchange_sig, const struct TALER_MasterSignatureP *master_sig,
const struct TALER_AUDITOR_DepositConfirmationResultCallback cb,
TALER_MasterPublicKeyP *master_pub, void *cb_cls)
struct GNUNET_TIME_Absolute ep_start,
struct GNUNET_TIME_Absolute ep_expire,
struct GNUNET_TIME_Absolute ep_end,
const struct
TALER_MasterSignatureP *master_sig,
TALER_AUDITOR_DepositConfirmationResultCallback
cb,
void *cb_cls)
{ {
struct TALER_AUDITOR_DepositConfirmationHandle *dh; struct TALER_AUDITOR_DepositConfirmationHandle *dh;
struct GNUNET_CURL_Context *ctx; struct GNUNET_CURL_Context *ctx;
@ -398,9 +390,8 @@ TALER_AUDITOR_deposit_confirmation (struct TALER_AUDITOR_Handle *auditor,
* @param deposit_confirmation the deposit-confirmation permission request handle * @param deposit_confirmation the deposit-confirmation permission request handle
*/ */
void void
TALER_AUDITOR_deposit_confirmation_cancel (struct TALER_AUDITOR_deposit_confirmation_cancel (
TALER_AUDITOR_DepositConfirmationHandle struct TALER_AUDITOR_DepositConfirmationHandle *deposit_confirmation)
*deposit_confirmation)
{ {
if (NULL != deposit_confirmation->job) if (NULL != deposit_confirmation->job)
{ {

View File

@ -43,15 +43,14 @@
* #GNUNET_SYSERR if there was a protocol violation in @a history * #GNUNET_SYSERR if there was a protocol violation in @a history
*/ */
int int
TALER_EXCHANGE_parse_reserve_history (struct TALER_EXCHANGE_Handle *exchange, TALER_EXCHANGE_parse_reserve_history (
const json_t *history, struct TALER_EXCHANGE_Handle *exchange,
const struct const json_t *history,
TALER_ReservePublicKeyP *reserve_pub, const struct TALER_ReservePublicKeyP *reserve_pub,
const char *currency, const char *currency,
struct TALER_Amount *balance, struct TALER_Amount *balance,
unsigned int history_length, unsigned int history_length,
struct TALER_EXCHANGE_ReserveHistory * struct TALER_EXCHANGE_ReserveHistory *rhistory)
rhistory)
{ {
struct GNUNET_HashCode uuid[history_length]; struct GNUNET_HashCode uuid[history_length];
unsigned int uuid_off; unsigned int uuid_off;
@ -417,9 +416,9 @@ TALER_EXCHANGE_parse_reserve_history (struct TALER_EXCHANGE_Handle *exchange,
* @param len number of entries in @a rhistory * @param len number of entries in @a rhistory
*/ */
void void
TALER_EXCHANGE_free_reserve_history (struct TALER_EXCHANGE_free_reserve_history (
TALER_EXCHANGE_ReserveHistory *rhistory, struct TALER_EXCHANGE_ReserveHistory *rhistory,
unsigned int len) unsigned int len)
{ {
for (unsigned int i = 0; i<len; i++) for (unsigned int i = 0; i<len; i++)
{ {
@ -452,13 +451,12 @@ TALER_EXCHANGE_free_reserve_history (struct
* @return #GNUNET_OK if @a history is valid, #GNUNET_SYSERR if not * @return #GNUNET_OK if @a history is valid, #GNUNET_SYSERR if not
*/ */
int int
TALER_EXCHANGE_verify_coin_history (const struct TALER_EXCHANGE_verify_coin_history (
TALER_EXCHANGE_DenomPublicKey *dk, const struct TALER_EXCHANGE_DenomPublicKey *dk,
const char *currency, const char *currency,
const struct const struct TALER_CoinSpendPublicKeyP *coin_pub,
TALER_CoinSpendPublicKeyP *coin_pub, json_t *history,
json_t *history, struct TALER_Amount *total)
struct TALER_Amount *total)
{ {
size_t len; size_t len;
struct TALER_Amount rtotal; struct TALER_Amount rtotal;
@ -797,11 +795,9 @@ TALER_EXCHANGE_verify_coin_history (const struct
* @return NULL on error (@a exchange_pub not known) * @return NULL on error (@a exchange_pub not known)
*/ */
const struct TALER_EXCHANGE_SigningPublicKey * const struct TALER_EXCHANGE_SigningPublicKey *
TALER_EXCHANGE_get_signing_key_info (const struct TALER_EXCHANGE_get_signing_key_info (
TALER_EXCHANGE_Keys *keys, const struct TALER_EXCHANGE_Keys *keys,
const struct const struct TALER_ExchangePublicKeyP *exchange_pub)
TALER_ExchangePublicKeyP *
exchange_pub)
{ {
for (unsigned int i = 0; i<keys->num_sign_keys; i++) for (unsigned int i = 0; i<keys->num_sign_keys; i++)
{ {

View File

@ -241,9 +241,9 @@ verify_deposit_signature_ok (struct TALER_EXCHANGE_DepositHandle *dh,
* @return #GNUNET_OK if the signature(s) is valid, #GNUNET_SYSERR if not * @return #GNUNET_OK if the signature(s) is valid, #GNUNET_SYSERR if not
*/ */
static int static int
verify_deposit_signature_forbidden (const struct verify_deposit_signature_forbidden (
TALER_EXCHANGE_DepositHandle *dh, const struct TALER_EXCHANGE_DepositHandle *dh,
const json_t *json) const json_t *json)
{ {
json_t *history; json_t *history;
struct TALER_Amount total; struct TALER_Amount total;

View File

@ -88,10 +88,10 @@ struct TALER_EXCHANGE_DepositGetHandle
* @return #GNUNET_OK if the signature is valid, #GNUNET_SYSERR if not * @return #GNUNET_OK if the signature is valid, #GNUNET_SYSERR if not
*/ */
static int static int
verify_deposit_wtid_signature_ok (const struct verify_deposit_wtid_signature_ok (
TALER_EXCHANGE_DepositGetHandle *dwh, const struct TALER_EXCHANGE_DepositGetHandle *dwh,
const json_t *json, const json_t *json,
struct TALER_ExchangePublicKeyP *exchange_pub) struct TALER_ExchangePublicKeyP *exchange_pub)
{ {
struct TALER_ExchangeSignatureP exchange_sig; struct TALER_ExchangeSignatureP exchange_sig;
const struct TALER_EXCHANGE_Keys *key_state; const struct TALER_EXCHANGE_Keys *key_state;
@ -277,16 +277,14 @@ handle_deposit_wtid_finished (void *cls,
* @return handle to abort request * @return handle to abort request
*/ */
struct TALER_EXCHANGE_DepositGetHandle * struct TALER_EXCHANGE_DepositGetHandle *
TALER_EXCHANGE_deposits_get (struct TALER_EXCHANGE_Handle *exchange, TALER_EXCHANGE_deposits_get (
const struct struct TALER_EXCHANGE_Handle *exchange,
TALER_MerchantPrivateKeyP *merchant_priv, const struct TALER_MerchantPrivateKeyP *merchant_priv,
const struct GNUNET_HashCode *h_wire, const struct GNUNET_HashCode *h_wire,
const struct const struct GNUNET_HashCode *h_contract_terms,
GNUNET_HashCode *h_contract_terms, const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_EXCHANGE_DepositGetCallback cb,
TALER_CoinSpendPublicKeyP *coin_pub, void *cb_cls)
TALER_EXCHANGE_DepositGetCallback cb,
void *cb_cls)
{ {
struct TALER_DepositTrackPS dtp; struct TALER_DepositTrackPS dtp;
struct TALER_MerchantSignatureP merchant_sig; struct TALER_MerchantSignatureP merchant_sig;

View File

@ -665,8 +665,8 @@ parse_json_auditor (struct TALER_EXCHANGE_AuditorInformation *auditor,
* @param compat protocol compatibility information * @param compat protocol compatibility information
*/ */
static void static void
auditor_version_cb auditor_version_cb (
(void *cls, void *cls,
const struct TALER_AUDITOR_VersionInformation *vi, const struct TALER_AUDITOR_VersionInformation *vi,
enum TALER_AUDITOR_VersionCompatibility compat) enum TALER_AUDITOR_VersionCompatibility compat)
{ {
@ -1635,8 +1635,7 @@ deserialize_data (struct TALER_EXCHANGE_Handle *exchange,
* otherwise JSON object owned by the caller * otherwise JSON object owned by the caller
*/ */
json_t * json_t *
TALER_EXCHANGE_serialize_data TALER_EXCHANGE_serialize_data (struct TALER_EXCHANGE_Handle *exchange)
(struct TALER_EXCHANGE_Handle *exchange)
{ {
const struct TALER_EXCHANGE_Keys *kd = &exchange->key_data; const struct TALER_EXCHANGE_Keys *kd = &exchange->key_data;
struct GNUNET_TIME_Absolute now; struct GNUNET_TIME_Absolute now;
@ -1886,8 +1885,8 @@ TALER_EXCHANGE_serialize_data
* @return the exchange handle; NULL upon error * @return the exchange handle; NULL upon error
*/ */
struct TALER_EXCHANGE_Handle * struct TALER_EXCHANGE_Handle *
TALER_EXCHANGE_connect TALER_EXCHANGE_connect (
(struct GNUNET_CURL_Context *ctx, struct GNUNET_CURL_Context *ctx,
const char *url, const char *url,
TALER_EXCHANGE_CertificationCallback cert_cb, TALER_EXCHANGE_CertificationCallback cert_cb,
void *cert_cb_cls, void *cert_cb_cls,
@ -2126,9 +2125,9 @@ TALER_EXCHANGE_get_base_url (const struct TALER_EXCHANGE_Handle *exchange)
* not found * not found
*/ */
const struct TALER_EXCHANGE_DenomPublicKey * const struct TALER_EXCHANGE_DenomPublicKey *
TALER_EXCHANGE_get_denomination_key (const struct TALER_EXCHANGE_Keys *keys, TALER_EXCHANGE_get_denomination_key (
const struct const struct TALER_EXCHANGE_Keys *keys,
TALER_DenominationPublicKey *pk) const struct TALER_DenominationPublicKey *pk)
{ {
for (unsigned int i = 0; i<keys->num_denom_keys; i++) for (unsigned int i = 0; i<keys->num_denom_keys; i++)
if (0 == GNUNET_CRYPTO_rsa_public_key_cmp (pk->rsa_public_key, if (0 == GNUNET_CRYPTO_rsa_public_key_cmp (pk->rsa_public_key,
@ -2146,8 +2145,8 @@ TALER_EXCHANGE_get_denomination_key (const struct TALER_EXCHANGE_Keys *keys,
* @returns a copy, must be freed with #TALER_EXCHANGE_destroy_denomination_key * @returns a copy, must be freed with #TALER_EXCHANGE_destroy_denomination_key
*/ */
struct TALER_EXCHANGE_DenomPublicKey * struct TALER_EXCHANGE_DenomPublicKey *
TALER_EXCHANGE_copy_denomination_key (const struct TALER_EXCHANGE_copy_denomination_key (
TALER_EXCHANGE_DenomPublicKey *key) const struct TALER_EXCHANGE_DenomPublicKey *key)
{ {
struct TALER_EXCHANGE_DenomPublicKey *copy; struct TALER_EXCHANGE_DenomPublicKey *copy;
@ -2167,8 +2166,8 @@ TALER_EXCHANGE_copy_denomination_key (const struct
* @param key key to destroy. * @param key key to destroy.
*/ */
void void
TALER_EXCHANGE_destroy_denomination_key (struct TALER_EXCHANGE_destroy_denomination_key (
TALER_EXCHANGE_DenomPublicKey *key) struct TALER_EXCHANGE_DenomPublicKey *key)
{ {
GNUNET_CRYPTO_rsa_public_key_free (key->key.rsa_public_key);; GNUNET_CRYPTO_rsa_public_key_free (key->key.rsa_public_key);;
GNUNET_free (key); GNUNET_free (key);
@ -2183,9 +2182,9 @@ TALER_EXCHANGE_destroy_denomination_key (struct
* @return details about the given denomination key * @return details about the given denomination key
*/ */
const struct TALER_EXCHANGE_DenomPublicKey * const struct TALER_EXCHANGE_DenomPublicKey *
TALER_EXCHANGE_get_denomination_key_by_hash (const struct TALER_EXCHANGE_get_denomination_key_by_hash (
TALER_EXCHANGE_Keys *keys, const struct TALER_EXCHANGE_Keys *keys,
const struct GNUNET_HashCode *hc) const struct GNUNET_HashCode *hc)
{ {
for (unsigned int i = 0; i<keys->num_denom_keys; i++) for (unsigned int i = 0; i<keys->num_denom_keys; i++)
if (0 == GNUNET_memcmp (hc, if (0 == GNUNET_memcmp (hc,

View File

@ -88,10 +88,9 @@ serialize_melted_coin (const struct MeltedCoin *mc,
size_t off) size_t off)
{ {
struct MeltedCoinP mcp; struct MeltedCoinP mcp;
unsigned int i; void *pbuf;
char *pbuf;
size_t pbuf_size; size_t pbuf_size;
char *sbuf; void *sbuf;
size_t sbuf_size; size_t sbuf_size;
sbuf_size = GNUNET_CRYPTO_rsa_signature_encode (mc->sig.rsa_signature, sbuf_size = GNUNET_CRYPTO_rsa_signature_encode (mc->sig.rsa_signature,
@ -117,7 +116,7 @@ serialize_melted_coin (const struct MeltedCoin *mc,
&mc->fee_melt); &mc->fee_melt);
TALER_amount_hton (&mcp.original_value, TALER_amount_hton (&mcp.original_value,
&mc->original_value); &mc->original_value);
for (i = 0; i<TALER_CNC_KAPPA; i++) for (unsigned int i = 0; i<TALER_CNC_KAPPA; i++)
mcp.transfer_priv[i] = mc->transfer_priv[i]; mcp.transfer_priv[i] = mc->transfer_priv[i];
mcp.expire_deposit = GNUNET_TIME_absolute_hton (mc->expire_deposit); mcp.expire_deposit = GNUNET_TIME_absolute_hton (mc->expire_deposit);
mcp.pbuf_size = htons ((uint16_t) pbuf_size); mcp.pbuf_size = htons ((uint16_t) pbuf_size);
@ -153,7 +152,6 @@ deserialize_melted_coin (struct MeltedCoin *mc,
int *ok) int *ok)
{ {
struct MeltedCoinP mcp; struct MeltedCoinP mcp;
unsigned int i;
size_t pbuf_size; size_t pbuf_size;
size_t sbuf_size; size_t sbuf_size;
size_t off; size_t off;
@ -199,7 +197,7 @@ deserialize_melted_coin (struct MeltedCoin *mc,
&mcp.fee_melt); &mcp.fee_melt);
TALER_amount_ntoh (&mc->original_value, TALER_amount_ntoh (&mc->original_value,
&mcp.original_value); &mcp.original_value);
for (i = 0; i<TALER_CNC_KAPPA; i++) for (unsigned int i = 0; i<TALER_CNC_KAPPA; i++)
mc->transfer_priv[i] = mcp.transfer_priv[i]; mc->transfer_priv[i] = mcp.transfer_priv[i];
mc->expire_deposit = GNUNET_TIME_absolute_ntoh (mcp.expire_deposit); mc->expire_deposit = GNUNET_TIME_absolute_ntoh (mcp.expire_deposit);
return off; return off;
@ -221,7 +219,7 @@ serialize_denomination_key (const struct TALER_DenominationPublicKey *dk,
char *buf, char *buf,
size_t off) size_t off)
{ {
char *pbuf; void *pbuf;
size_t pbuf_size; size_t pbuf_size;
uint32_t be; uint32_t be;
@ -498,17 +496,14 @@ TALER_EXCHANGE_deserialize_melt_data_ (const char *buf,
* Non-null results should be freed using GNUNET_free(). * Non-null results should be freed using GNUNET_free().
*/ */
char * char *
TALER_EXCHANGE_refresh_prepare (const struct TALER_EXCHANGE_refresh_prepare (
TALER_CoinSpendPrivateKeyP *melt_priv, const struct TALER_CoinSpendPrivateKeyP *melt_priv,
const struct TALER_Amount *melt_amount, const struct TALER_Amount *melt_amount,
const struct const struct TALER_DenominationSignature *melt_sig,
TALER_DenominationSignature *melt_sig, const struct TALER_EXCHANGE_DenomPublicKey *melt_pk,
const struct unsigned int fresh_pks_len,
TALER_EXCHANGE_DenomPublicKey *melt_pk, const struct TALER_EXCHANGE_DenomPublicKey *fresh_pks,
unsigned int fresh_pks_len, size_t *res_size)
const struct
TALER_EXCHANGE_DenomPublicKey *fresh_pks,
size_t *res_size)
{ {
struct MeltData md; struct MeltData md;
char *buf; char *buf;

View File

@ -294,13 +294,13 @@ handle_refresh_reveal_finished (void *cls,
* In this case, neither callback will be called. * In this case, neither callback will be called.
*/ */
struct TALER_EXCHANGE_RefreshesRevealHandle * struct TALER_EXCHANGE_RefreshesRevealHandle *
TALER_EXCHANGE_refreshes_reveal (struct TALER_EXCHANGE_Handle *exchange, TALER_EXCHANGE_refreshes_reveal (
size_t refresh_data_length, struct TALER_EXCHANGE_Handle *exchange,
const char *refresh_data, size_t refresh_data_length,
uint32_t noreveal_index, const char *refresh_data,
TALER_EXCHANGE_RefreshesRevealCallback uint32_t noreveal_index,
reveal_cb, TALER_EXCHANGE_RefreshesRevealCallback reveal_cb,
void *reveal_cb_cls) void *reveal_cb_cls)
{ {
struct TALER_EXCHANGE_RefreshesRevealHandle *rrh; struct TALER_EXCHANGE_RefreshesRevealHandle *rrh;
json_t *transfer_privs; json_t *transfer_privs;
@ -494,9 +494,8 @@ TALER_EXCHANGE_refreshes_reveal (struct TALER_EXCHANGE_Handle *exchange,
* @param rrh the refresh reval handle * @param rrh the refresh reval handle
*/ */
void void
TALER_EXCHANGE_refreshes_reveal_cancel (struct TALER_EXCHANGE_refreshes_reveal_cancel (
TALER_EXCHANGE_RefreshesRevealHandle * struct TALER_EXCHANGE_RefreshesRevealHandle *rrh)
rrh)
{ {
if (NULL != rrh->job) if (NULL != rrh->job)
{ {

View File

@ -80,9 +80,9 @@ struct TALER_EXCHANGE_TransfersGetHandle
* #GNUNET_SYSERR if the response was bogus * #GNUNET_SYSERR if the response was bogus
*/ */
static int static int
check_transfers_get_response_ok (struct check_transfers_get_response_ok (
TALER_EXCHANGE_TransfersGetHandle *wdh, struct TALER_EXCHANGE_TransfersGetHandle *wdh,
const json_t *json) const json_t *json)
{ {
json_t *details_j; json_t *details_j;
struct GNUNET_HashCode h_wire; struct GNUNET_HashCode h_wire;
@ -326,11 +326,11 @@ handle_transfers_get_finished (void *cls,
* @return handle to cancel operation * @return handle to cancel operation
*/ */
struct TALER_EXCHANGE_TransfersGetHandle * struct TALER_EXCHANGE_TransfersGetHandle *
TALER_EXCHANGE_transfers_get (struct TALER_EXCHANGE_Handle *exchange, TALER_EXCHANGE_transfers_get (
const struct struct TALER_EXCHANGE_Handle *exchange,
TALER_WireTransferIdentifierRawP *wtid, const struct TALER_WireTransferIdentifierRawP *wtid,
TALER_EXCHANGE_TransfersGetCallback cb, TALER_EXCHANGE_TransfersGetCallback cb,
void *cb_cls) void *cb_cls)
{ {
struct TALER_EXCHANGE_TransfersGetHandle *wdh; struct TALER_EXCHANGE_TransfersGetHandle *wdh;
struct GNUNET_CURL_Context *ctx; struct GNUNET_CURL_Context *ctx;
@ -391,8 +391,8 @@ TALER_EXCHANGE_transfers_get (struct TALER_EXCHANGE_Handle *exchange,
* @param wdh the wire deposits request handle * @param wdh the wire deposits request handle
*/ */
void void
TALER_EXCHANGE_transfers_get_cancel (struct TALER_EXCHANGE_transfers_get_cancel (
TALER_EXCHANGE_TransfersGetHandle *wdh) struct TALER_EXCHANGE_TransfersGetHandle *wdh)
{ {
if (NULL != wdh->job) if (NULL != wdh->job)
{ {
@ -404,4 +404,4 @@ TALER_EXCHANGE_transfers_get_cancel (struct
} }
/* end of exchange_api_wire_deposits.c */ /* end of exchange_api_transfers_get.c */

View File

@ -164,9 +164,9 @@ reserve_withdraw_ok (struct TALER_EXCHANGE_WithdrawHandle *wh,
* @return #GNUNET_OK on success, #GNUNET_SYSERR on errors * @return #GNUNET_OK on success, #GNUNET_SYSERR on errors
*/ */
static int static int
reserve_withdraw_payment_required (struct reserve_withdraw_payment_required (
TALER_EXCHANGE_WithdrawHandle *wh, struct TALER_EXCHANGE_WithdrawHandle *wh,
const json_t *json) const json_t *json)
{ {
struct TALER_Amount balance; struct TALER_Amount balance;
struct TALER_Amount balance_from_history; struct TALER_Amount balance_from_history;
@ -472,14 +472,13 @@ reserve_withdraw_internal (struct TALER_EXCHANGE_Handle *exchange,
* In this case, the callback is not called. * In this case, the callback is not called.
*/ */
struct TALER_EXCHANGE_WithdrawHandle * struct TALER_EXCHANGE_WithdrawHandle *
TALER_EXCHANGE_withdraw (struct TALER_EXCHANGE_Handle *exchange, TALER_EXCHANGE_withdraw (
const struct TALER_EXCHANGE_DenomPublicKey *pk, struct TALER_EXCHANGE_Handle *exchange,
const struct const struct TALER_EXCHANGE_DenomPublicKey *pk,
TALER_ReservePrivateKeyP *reserve_priv, const struct TALER_ReservePrivateKeyP *reserve_priv,
const struct TALER_PlanchetSecretsP *ps, const struct TALER_PlanchetSecretsP *ps,
TALER_EXCHANGE_WithdrawCallback TALER_EXCHANGE_WithdrawCallback res_cb,
res_cb, void *res_cb_cls)
void *res_cb_cls)
{ {
struct TALER_Amount amount_with_fee; struct TALER_Amount amount_with_fee;
struct TALER_ReserveSignatureP reserve_sig; struct TALER_ReserveSignatureP reserve_sig;
@ -556,17 +555,14 @@ TALER_EXCHANGE_withdraw (struct TALER_EXCHANGE_Handle *exchange,
* In this case, the callback is not called. * In this case, the callback is not called.
*/ */
struct TALER_EXCHANGE_WithdrawHandle * struct TALER_EXCHANGE_WithdrawHandle *
TALER_EXCHANGE_withdraw2 (struct TALER_EXCHANGE_Handle *exchange, TALER_EXCHANGE_withdraw2 (
const struct struct TALER_EXCHANGE_Handle *exchange,
TALER_EXCHANGE_DenomPublicKey *pk, const struct TALER_EXCHANGE_DenomPublicKey *pk,
const struct const struct TALER_ReserveSignatureP *reserve_sig,
TALER_ReserveSignatureP *reserve_sig, const struct TALER_ReservePublicKeyP *reserve_pub,
const struct const struct TALER_PlanchetSecretsP *ps,
TALER_ReservePublicKeyP *reserve_pub, TALER_EXCHANGE_WithdrawCallback res_cb,
const struct TALER_PlanchetSecretsP *ps, void *res_cb_cls)
TALER_EXCHANGE_WithdrawCallback
res_cb,
void *res_cb_cls)
{ {
struct TALER_EXCHANGE_WithdrawHandle *wh; struct TALER_EXCHANGE_WithdrawHandle *wh;
struct TALER_PlanchetDetail pd; struct TALER_PlanchetDetail pd;