diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-11-17 17:19:02 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-11-17 17:19:02 +0100 |
commit | e42f014cffae126a52c92fbf8151e6f5cecc9de0 (patch) | |
tree | d4d7754aec574bb35a830db30d690df592a224b1 /src/include | |
parent | cf1ce4786356cba7d3f84a74fab282650f612db9 (diff) |
use more const in taler_testing_lib.h
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_testing_lib.h | 56 |
1 files changed, 37 insertions, 19 deletions
diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h index 7d4094358..73581e3cd 100644 --- a/src/include/taler_testing_lib.h +++ b/src/include/taler_testing_lib.h @@ -434,7 +434,7 @@ struct TALER_TESTING_Command */ int (*traits)(void *cls, - void **ret, + const void **ret, const char *trait, unsigned int index); @@ -1499,7 +1499,7 @@ TALER_TESTING_trait_end (void); */ int TALER_TESTING_get_trait (const struct TALER_TESTING_Trait *traits, - void **ret, + const void **ret, const char *trait, unsigned int index); @@ -1535,7 +1535,7 @@ int TALER_TESTING_get_trait_reserve_priv (const struct TALER_TESTING_Command *cmd, unsigned int index, - struct TALER_ReservePrivateKeyP **reserve_priv); + const struct TALER_ReservePrivateKeyP **reserve_priv); /** @@ -1602,7 +1602,7 @@ TALER_TESTING_get_trait_exchange_pub * @param cmd command to extract trait from. * @param index which process to pick if @a cmd * has multiple on offer. - * @param coin_priv[out] set to the address of the pointer to the + * @param processp[out] set to the address of the pointer to the * process. * * @return #GNUNET_OK on success. @@ -1611,8 +1611,7 @@ int TALER_TESTING_get_trait_process (const struct TALER_TESTING_Command *cmd, unsigned int index, - struct GNUNET_OS_Process ***processp); - + struct GNUNET_OS_Process ***processp); // FIXME: why is this a ***!? ** should do! /** @@ -1627,7 +1626,7 @@ TALER_TESTING_get_trait_process struct TALER_TESTING_Trait TALER_TESTING_make_trait_process (unsigned int index, - struct GNUNET_OS_Process **processp); + struct GNUNET_OS_Process **processp); // FIXME: why is this a "**"? * should do! /** @@ -1658,6 +1657,7 @@ TALER_TESTING_get_trait_coin_priv unsigned int index, const struct TALER_CoinSpendPrivateKeyP **coin_priv); + /** * Offer blinding key. * @@ -1671,6 +1671,7 @@ TALER_TESTING_make_trait_blinding_key (unsigned int index, const struct TALER_DenominationBlindingKeyP *blinding_key); + /** * Obtain a blinding key from a @a cmd. * @@ -1684,7 +1685,8 @@ int TALER_TESTING_get_trait_blinding_key (const struct TALER_TESTING_Command *cmd, unsigned int index, - struct TALER_DenominationBlindingKeyP **blinding_key); + const struct TALER_DenominationBlindingKeyP **blinding_key); + /** * Make a trait for a denomination public key. @@ -1699,6 +1701,7 @@ TALER_TESTING_make_trait_denom_pub (unsigned int index, const struct TALER_EXCHANGE_DenomPublicKey *dpk); + /** * Obtain a denomination public key from a @a cmd. * @@ -1728,7 +1731,8 @@ int TALER_TESTING_get_trait_denom_sig (const struct TALER_TESTING_Command *cmd, unsigned int index, - struct TALER_DenominationSignature **dpk); + const struct TALER_DenominationSignature **dpk); + /** * Offer denom sig. @@ -1756,6 +1760,7 @@ TALER_TESTING_make_trait_uint64 (unsigned int index, const uint64_t *n); + /** * Obtain a "number" value from @a cmd, 64-bit version. * @@ -1771,6 +1776,7 @@ TALER_TESTING_get_trait_uint64 unsigned int index, const uint64_t **n); + /** * Offer a number. * @@ -1784,6 +1790,7 @@ TALER_TESTING_make_trait_uint (unsigned int index, const unsigned int *i); + /** * Obtain a number from @a cmd. * @@ -1797,7 +1804,8 @@ int TALER_TESTING_get_trait_uint (const struct TALER_TESTING_Command *cmd, unsigned int index, - unsigned int **n); + const unsigned int **n); + /** * Information about a fresh coin generated by the refresh @@ -1825,6 +1833,7 @@ struct FreshCoin struct TALER_CoinSpendPrivateKeyP coin_priv; }; + /** * Offer a _array_ of fresh coins. * @@ -1840,6 +1849,7 @@ TALER_TESTING_make_trait_fresh_coins (unsigned int index, struct FreshCoin *fresh_coins); + /** * Get a array of fresh coins. * @@ -1854,7 +1864,7 @@ int TALER_TESTING_get_trait_fresh_coins (const struct TALER_TESTING_Command *cmd, unsigned int index, - struct FreshCoin **fresh_coins); + const struct FreshCoin **fresh_coins); /** @@ -1936,6 +1946,7 @@ TALER_TESTING_get_trait_peer_key unsigned int index, const struct GNUNET_CRYPTO_EddsaPrivateKey **priv); + /** * Offer private key, typically done when CMD_1 needs it to * sign a request. @@ -1943,13 +1954,12 @@ TALER_TESTING_get_trait_peer_key * @param index (tipically zero) which key to return if there are * multiple on offer. * @param priv which object should be offered. - * * @return the trait. */ struct TALER_TESTING_Trait TALER_TESTING_make_trait_peer_key (unsigned int index, - struct GNUNET_CRYPTO_EddsaPrivateKey *priv); + const struct GNUNET_CRYPTO_EddsaPrivateKey *priv); /** @@ -1969,6 +1979,7 @@ TALER_TESTING_get_trait_peer_key_pub unsigned int index, const struct GNUNET_CRYPTO_EddsaPublicKey **pub); + /** * Offer public key. * @@ -1984,6 +1995,7 @@ TALER_TESTING_make_trait_peer_key_pub (unsigned int index, struct GNUNET_CRYPTO_EddsaPublicKey *pub); + /** * Obtain a transfer subject from @a cmd. * @@ -2008,7 +2020,6 @@ TALER_TESTING_get_trait_transfer_subject * @param index index number associated with the transfer * subject being offered. * @param transfer_subject transfer subject to offer. - * * @return the trait. */ struct TALER_TESTING_Trait @@ -2030,20 +2041,20 @@ int TALER_TESTING_get_trait_wtid (const struct TALER_TESTING_Command *cmd, unsigned int index, - struct TALER_WireTransferIdentifierRawP **wtid); + const struct TALER_WireTransferIdentifierRawP **wtid); + /** * Offer a WTID. * * @param index associate the WTID with this index. * @param wtid pointer to the WTID to offer. - * * @return the trait. */ struct TALER_TESTING_Trait TALER_TESTING_make_trait_wtid (unsigned int index, - struct TALER_WireTransferIdentifierRawP *wtid); + const struct TALER_WireTransferIdentifierRawP *wtid); /** @@ -2052,7 +2063,6 @@ TALER_TESTING_make_trait_wtid * @param index which amount is to be offered, * in case multiple are offered. * @param amount the amount to offer. - * * @return the trait. */ struct TALER_TESTING_Trait @@ -2060,6 +2070,7 @@ TALER_TESTING_make_trait_amount (unsigned int index, const char *amount); + /** * Obtain an amount from @a cmd. * @@ -2091,6 +2102,7 @@ TALER_TESTING_make_trait_url (unsigned int index, const char *url); + /** * Obtain a url from @a cmd. * @@ -2124,6 +2136,7 @@ TALER_TESTING_get_trait_order_id unsigned int index, const char **order_id); + /** * Offer order id in a trait. * @@ -2155,6 +2168,7 @@ TALER_TESTING_get_trait_amount_obj unsigned int index, const struct TALER_Amount **amount); + /** * Offer amount. * @@ -2169,6 +2183,7 @@ TALER_TESTING_make_trait_amount_obj (unsigned int index, const struct TALER_Amount *amount); + /** * Offer a "reject" CMD reference. * @@ -2218,6 +2233,7 @@ TALER_TESTING_make_trait_cmd (unsigned int index, const struct TALER_TESTING_Command *cmd); + /** * Obtain a command from @a cmd. * @@ -2226,7 +2242,7 @@ TALER_TESTING_make_trait_cmd * kind of traits do not need this index. For * example, a "meta" CMD returns always the * CMD currently being executed. - * @param cmd_[out] where to write the wire details. + * @param _cmd[out] where to write the wire details. * * @return #GNUNET_OK on success. */ @@ -2235,4 +2251,6 @@ TALER_TESTING_get_trait_cmd (const struct TALER_TESTING_Command *cmd, unsigned int index, struct TALER_TESTING_Command **_cmd); + + #endif |