gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-exchange] branch master updated (027da0f -> 7a1146f)


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated (027da0f -> 7a1146f)
Date: Mon, 28 May 2018 17:23:38 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a change to branch master
in repository exchange.

    from 027da0f  Commenting the "wire" CMD.
     new d972604  Commenting the "fresh coins" trait.
     new 939c1dd  Commenting the "peer key" trait.
     new 7a1146f  Commenting the remaining "lib" traits.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/bank-lib/testing_api_cmd_history.c            |   2 +-
 src/exchange-lib/testing_api_trait_amount.c       |  19 +++-
 src/exchange-lib/testing_api_trait_blinding_key.c |  33 ++++---
 src/exchange-lib/testing_api_trait_coin_priv.c    |  22 +++--
 src/exchange-lib/testing_api_trait_denom_pub.c    |  18 ++--
 src/exchange-lib/testing_api_trait_denom_sig.c    |  34 ++++---
 src/exchange-lib/testing_api_trait_fresh_coin.c   |  21 ++--
 src/exchange-lib/testing_api_trait_json.c         |  20 ++--
 src/exchange-lib/testing_api_trait_key_peer.c     |  40 +++++---
 src/exchange-lib/testing_api_trait_number.c       |  38 ++++----
 src/exchange-lib/testing_api_trait_process.c      |  56 +++++++----
 src/exchange-lib/testing_api_trait_reserve_priv.c |  34 ++++---
 src/exchange-lib/testing_api_trait_string.c       | 113 ++++++++++++----------
 src/exchange-lib/testing_api_traits.c             |   8 +-
 14 files changed, 274 insertions(+), 184 deletions(-)

diff --git a/src/bank-lib/testing_api_cmd_history.c 
b/src/bank-lib/testing_api_cmd_history.c
index ccd29e1..d062446 100644
--- a/src/bank-lib/testing_api_cmd_history.c
+++ b/src/bank-lib/testing_api_cmd_history.c
@@ -125,7 +125,7 @@ test_cancelled (struct TALER_TESTING_Interpreter *is,
 
     /* XXX: Errors reported here are NOT fatal */
 
-    /* Rejected wire transfers have hold a reference to a
+    /* Rejected wire transfers have a non-NULL reference to a
      * reject command to mark them as rejected. So errors
      * about "reject traits" not found are NOT fatal here */
     if (GNUNET_OK != TALER_TESTING_get_trait_rejected
diff --git a/src/exchange-lib/testing_api_trait_amount.c 
b/src/exchange-lib/testing_api_trait_amount.c
index f21ec87..9c37783 100644
--- a/src/exchange-lib/testing_api_trait_amount.c
+++ b/src/exchange-lib/testing_api_trait_amount.c
@@ -19,7 +19,7 @@
 
 /**
  * @file exchange-lib/testing_api_trait_amount.c
- * @brief offer amounts as traits
+ * @brief offer amounts as traits.
  * @author Marcello Stanisci
  */
 
@@ -35,10 +35,11 @@
 /**
  * Obtain an amount from a @a cmd.
  *
- * @param cmd command to extract trait from
- * @param selector which amount to pick if @a cmd has multiple
+ * @param cmd command to extract the amount from.
+ * @param index which amount to pick if @a cmd has multiple
  *        on offer
- * @param amount[out] set to the amount
+ * @param amount[out] set to the amount.
+ *
  * @return #GNUNET_OK on success
  */
 int
@@ -53,6 +54,16 @@ TALER_TESTING_get_trait_amount_obj (
                       index);
 }
 
+
+/**
+ * Offer amount.
+ *
+ * @param index which amount to offer, in case there are
+ *        multiple available.
+ * @param amount the amount to offer.
+ *
+ * @return the trait.
+ */
 struct TALER_TESTING_Trait
 TALER_TESTING_make_trait_amount_obj (
   unsigned int index,
diff --git a/src/exchange-lib/testing_api_trait_blinding_key.c 
b/src/exchange-lib/testing_api_trait_blinding_key.c
index 23eb7ac..12ce12a 100644
--- a/src/exchange-lib/testing_api_trait_blinding_key.c
+++ b/src/exchange-lib/testing_api_trait_blinding_key.c
@@ -18,7 +18,7 @@
 */
 /**
  * @file exchange-lib/testing_api_trait_blinding_key.c
- * @brief main interpreter loop for testcases
+ * @brief offer blinding keys as traits.
  * @author Christian Grothoff
  * @author Marcello Stanisci
  */
@@ -36,15 +36,16 @@
  * Obtain a blinding key from a @a cmd.
  *
  * @param cmd command to extract trait from
- * @param selector which coin to pick if @a cmd has multiple on offer
- * @param blinding_key[out] set to the blinding key of the coin
- * @return #GNUNET_OK on success
+ * @param index which coin to pick if @a cmd has multiple on offer.
+ * @param blinding_key[out] set to the offered blinding key.
+ *
+ * @return #GNUNET_OK on success.
  */
 int
-TALER_TESTING_get_trait_blinding_key (
-  const struct TALER_TESTING_Command *cmd,
-  unsigned int index,
-  struct TALER_DenominationBlindingKeyP **blinding_key)
+TALER_TESTING_get_trait_blinding_key
+  (const struct TALER_TESTING_Command *cmd,
+   unsigned int index,
+   struct TALER_DenominationBlindingKeyP **blinding_key)
 {
   return cmd->traits (cmd->cls,
                       (void **) blinding_key,
@@ -53,10 +54,19 @@ TALER_TESTING_get_trait_blinding_key (
 }
 
 
+
+/**
+ * Offer blinding key.
+ *
+ * @param index index number to associate to the offered key.
+ * @param blinding_key blinding key to offer.
+ *
+ * @return the trait.
+ */
 struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_blinding_key (
-  unsigned int index,
-  const struct TALER_DenominationBlindingKeyP *blinding_key)
+TALER_TESTING_make_trait_blinding_key
+  (unsigned int index,
+   const struct TALER_DenominationBlindingKeyP *blinding_key)
 {
   struct TALER_TESTING_Trait ret = {
     .index = index,
@@ -67,5 +77,4 @@ TALER_TESTING_make_trait_blinding_key (
   return ret;
 }
 
-
 /* end of testing_api_trait_blinding_key.c */
diff --git a/src/exchange-lib/testing_api_trait_coin_priv.c 
b/src/exchange-lib/testing_api_trait_coin_priv.c
index 522f728..5e9193f 100644
--- a/src/exchange-lib/testing_api_trait_coin_priv.c
+++ b/src/exchange-lib/testing_api_trait_coin_priv.c
@@ -19,7 +19,7 @@
 
 /**
  * @file exchange-lib/testing_api_trait_coin_priv.c
- * @brief main interpreter loop for testcases
+ * @brief coin priv traits.
  * @author Christian Grothoff
  * @author Marcello Stanisci
  */
@@ -36,11 +36,11 @@
 /**
  * Obtain a coin private key from a @a cmd.
  *
- * @param cmd command to extract trait from
- * @param selector which coin to pick if @a cmd has multiple on
- *        offer
- * @param coin_priv[out] set to the private key of the coin
- * @return #GNUNET_OK on success
+ * @param cmd command to extract trait from.
+ * @param index index of the coin priv to obtain.
+ * @param coin_priv[out] set to the private key of the coin.
+ *
+ * @return #GNUNET_OK on success.
  */
 int
 TALER_TESTING_get_trait_coin_priv
@@ -55,6 +55,15 @@ TALER_TESTING_get_trait_coin_priv
 }
 
 
+
+/**
+ * Offer coin private key.
+ *
+ * @param index index number to associate with offered coin priv.
+ * @param coin_priv coin private key to offer.
+ *
+ * @return the trait.
+ */
 struct TALER_TESTING_Trait
 TALER_TESTING_make_trait_coin_priv
   (unsigned int index,
@@ -69,5 +78,4 @@ TALER_TESTING_make_trait_coin_priv
   return ret;
 }
 
-
 /* end of testing_api_trait_coin_priv.c */
diff --git a/src/exchange-lib/testing_api_trait_denom_pub.c 
b/src/exchange-lib/testing_api_trait_denom_pub.c
index 92c003c..8caaf69 100644
--- a/src/exchange-lib/testing_api_trait_denom_pub.c
+++ b/src/exchange-lib/testing_api_trait_denom_pub.c
@@ -18,7 +18,7 @@
 */
 /**
  * @file exchange-lib/testing_api_trait_denom_pub.c
- * @brief main interpreter loop for testcases
+ * @brief denom pub traits.
  * @author Christian Grothoff
  * @author Marcello Stanisci
  */
@@ -36,10 +36,10 @@
  * Obtain a denomination public key from a @a cmd.
  *
  * @param cmd command to extract trait from
- * @param selector which coin to pick if @a cmd has multiple on
- *        offer
- * @param denom_pub[out] set to the blinding key of the coin
- * @return #GNUNET_OK on success
+ * @param index index number of the denom to obtain.
+ * @param denom_pub[out] set to the offered denom pub.
+ *
+ * @return #GNUNET_OK on success.
  */
 int
 TALER_TESTING_get_trait_denom_pub
@@ -57,10 +57,10 @@ TALER_TESTING_get_trait_denom_pub
 /**
  * Make a trait for a denomination public key.
  *
- * @param selector in case the trait provides multiple
- *        objects, this parameter extracts a particular one.
- * @param denom_pub pointer to the data to be returned from
- *        this trait
+ * @param index index number to associate to the offered denom pub.
+ * @param denom_pub denom pub to offer with this trait.
+ *
+ * @return the trait.
  */
 struct TALER_TESTING_Trait
 TALER_TESTING_make_trait_denom_pub
diff --git a/src/exchange-lib/testing_api_trait_denom_sig.c 
b/src/exchange-lib/testing_api_trait_denom_sig.c
index e50a3ba..5d7d708 100644
--- a/src/exchange-lib/testing_api_trait_denom_sig.c
+++ b/src/exchange-lib/testing_api_trait_denom_sig.c
@@ -36,17 +36,17 @@
 /**
  * Obtain a denomination signature from a @a cmd.
  *
- * @param cmd command to extract trait from
- * @param selector which signature to pick if @a cmd has multiple
- *        on offer
- * @param denom_sig[out] set to the signature
- * @return #GNUNET_OK on success
+ * @param cmd command to extract the denom sig from.
+ * @param index index number associated with the denom sig.
+ * @param denom_sig[out] set to the offered signature.
+ *
+ * @return #GNUNET_OK on success.
  */
 int
-TALER_TESTING_get_trait_denom_sig (
-  const struct TALER_TESTING_Command *cmd,
-  unsigned int index,
-  struct TALER_DenominationSignature **denom_sig)
+TALER_TESTING_get_trait_denom_sig
+  (const struct TALER_TESTING_Command *cmd,
+   unsigned int index,
+   struct TALER_DenominationSignature **denom_sig)
 {
   return cmd->traits (cmd->cls,
                       (void **) denom_sig,
@@ -55,10 +55,20 @@ TALER_TESTING_get_trait_denom_sig (
 }
 
 
+
+/**
+ * Offer denom sig.
+ *
+ * @param index index number to associate to the signature on
+ *        offer.
+ * @param denom_sig the denom sig on offer.
+ *
+ * @return the trait.
+ */
 struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_denom_sig (
-  unsigned int index,
-  const struct TALER_DenominationSignature *denom_sig)
+TALER_TESTING_make_trait_denom_sig
+  (unsigned int index,
+   const struct TALER_DenominationSignature *denom_sig)
 {
   struct TALER_TESTING_Trait ret = {
     .index = index,
diff --git a/src/exchange-lib/testing_api_trait_fresh_coin.c 
b/src/exchange-lib/testing_api_trait_fresh_coin.c
index 985591b..8779593 100644
--- a/src/exchange-lib/testing_api_trait_fresh_coin.c
+++ b/src/exchange-lib/testing_api_trait_fresh_coin.c
@@ -32,13 +32,14 @@
 #define TALER_TESTING_TRAIT_FRESH_COINS "fresh-coins"
 
 /**
- * Obtain a "number" value from @a cmd.
+ * Get a array of fresh coins.
  *
- * @param cmd command to extract trait from
- * @param selector which coin to pick if @a cmd has multiple on
- * offer
- * @param fresh_coins[out] will point to array of fresh coins
- * @return #GNUNET_OK on success
+ * @param cmd command to extract the fresh coin from.
+ * @param index which array to pick if @a cmd has multiple
+ *        on offer.
+ * @param fresh_coins[out] will point to the offered array.
+ *
+ * @return #GNUNET_OK on success.
  */
 int
 TALER_TESTING_get_trait_fresh_coins
@@ -53,10 +54,14 @@ TALER_TESTING_get_trait_fresh_coins
 }
 
 /**
- * @param selector associate the object with this "tag"
+ * Offer a _array_ of fresh coins.
+ *
+ * @param index which array of fresh coins to offer,
+ *        if there are multiple on offer.  Tipically passed as
+ *        zero.
  * @param fresh_coins the array of fresh coins to offer
  *
- * @return the trait, to be put in the traits array of the command
+ * @return the trait,
  */
 struct TALER_TESTING_Trait
 TALER_TESTING_make_trait_fresh_coins
diff --git a/src/exchange-lib/testing_api_trait_json.c 
b/src/exchange-lib/testing_api_trait_json.c
index 40dddbf..675be6c 100644
--- a/src/exchange-lib/testing_api_trait_json.c
+++ b/src/exchange-lib/testing_api_trait_json.c
@@ -34,11 +34,13 @@
 /**
  * Obtain wire details from @a cmd.
  *
- * @param cmd command to extract trait from
- * @param index always (?) zero, as one command sticks
- *        to one bank account
+ * @param cmd command to extract the wire details from.
+ * @param index index number associate with the wire details
+ *        on offer; usually zero, as one command sticks to
+ *        one bank account.
  * @param wire_details[out] where to write the wire details.
- * @return #GNUNET_OK on success
+ *
+ * @return #GNUNET_OK on success.
  */
 int
 TALER_TESTING_get_trait_wire_details
@@ -55,10 +57,12 @@ TALER_TESTING_get_trait_wire_details
 /**
  * Offer wire details in a trait.
  *
- * @param index always (?) zero, as one command sticks
- *        to one bank account
- * @param wire_details wire details to offer
- * @return the trait, to be put in the traits array of the command
+ * @param index index number associate with the wire details
+ *        on offer; usually zero, as one command sticks to
+ *        one bank account.
+ * @param wire_details wire details to offer.
+ *
+ * @return the trait.
  */
 struct TALER_TESTING_Trait
 TALER_TESTING_make_trait_wire_details
diff --git a/src/exchange-lib/testing_api_trait_key_peer.c 
b/src/exchange-lib/testing_api_trait_key_peer.c
index e4aee5d..102fb1b 100644
--- a/src/exchange-lib/testing_api_trait_key_peer.c
+++ b/src/exchange-lib/testing_api_trait_key_peer.c
@@ -36,12 +36,12 @@
  * Obtain a private key from a "peer".  Used e.g. to obtain
  * a merchant's priv to sign a /track request.
  *
- * @param index (tipically zero) which key to return if they
- *        exist in an array.
- * @param selector which coin to pick if @a cmd has multiple on
- * offer
+ * @param cmd command that is offering the key.
+ * @param index (tipically zero) which key to return if there
+ *        are multiple on offer.
  * @param priv[out] set to the key coming from @a cmd.
- * @return #GNUNET_OK on success
+ *
+ * @return #GNUNET_OK on success.
  */
 int
 TALER_TESTING_get_trait_peer_key
@@ -56,11 +56,14 @@ TALER_TESTING_get_trait_peer_key
 }
 
 /**
- * @param index (tipically zero) which key to return if they
- *        exist in an array.
- * @param priv which object should be returned
+ * Offer private key, typically done when CMD_1 needs it to
+ * sign a request.
+ *
+ * @param index (tipically zero) which key to return if there are
+ *        multiple on offer.
+ * @param priv which object should be offered.
  *
- * @return the trait, to be put in the traits array of the command
+ * @return the trait.
  */
 struct TALER_TESTING_Trait
 TALER_TESTING_make_trait_peer_key
@@ -80,10 +83,12 @@ TALER_TESTING_make_trait_peer_key
  * Obtain a public key from a "peer".  Used e.g. to obtain
  * a merchant's public key to use backend's API.
  *
- * @param index (tipically zero) which key to return if they
- *        exist in an array.
+ * @param cmd command offering the key.
+ * @param index (tipically zero) which key to return if there
+ *        are multiple on offer.
  * @param pub[out] set to the key coming from @a cmd.
- * @return #GNUNET_OK on success
+ *
+ * @return #GNUNET_OK on success.
  */
 int
 TALER_TESTING_get_trait_peer_key_pub
@@ -98,11 +103,14 @@ TALER_TESTING_get_trait_peer_key_pub
 }
 
 /**
- * @param index (tipically zero) which key to return if they
- *        exist in an array.
- * @param pub which object should be returned
+ * Offer public key.
+ *
+ * @param index (tipically zero) which key to return if there
+ *        are multiple on offer.  NOTE: if one key is offered, it
+ *        is mandatory to set this as zero.
+ * @param pub which object should be returned.
  *
- * @return the trait, to be put in the traits array of the command
+ * @return the trait.
  */
 struct TALER_TESTING_Trait
 TALER_TESTING_make_trait_peer_key_pub
diff --git a/src/exchange-lib/testing_api_trait_number.c 
b/src/exchange-lib/testing_api_trait_number.c
index 4db8879..67b01ae 100644
--- a/src/exchange-lib/testing_api_trait_number.c
+++ b/src/exchange-lib/testing_api_trait_number.c
@@ -33,13 +33,13 @@
 #define TALER_TESTING_TRAIT_UINT64 "uint-64"
 
 /**
- * Obtain a "number" value from @a cmd.
+ * Obtain a number from @a cmd.
  *
- * @param cmd command to extract trait from
- * @param selector which coin to pick if @a cmd has multiple on
- * offer
+ * @param cmd command to extract the number from.
+ * @param index the number's index number.
  * @param n[out] set to the number coming from @a cmd.
- * @return #GNUNET_OK on success
+ *
+ * @return #GNUNET_OK on success.
  */
 int
 TALER_TESTING_get_trait_uint
@@ -53,11 +53,15 @@ TALER_TESTING_get_trait_uint
                       index);
 }
 
+
+
 /**
- * @param selector associate the object with this "tag"
- * @param n which object should be returned
+ * Offer a number.
+ *
+ * @param index the number's index number.
+ * @param n the number to offer.
  *
- * @return the trait, to be put in the traits array of the command
+ * @return #GNUNET_OK on success.
  */
 struct TALER_TESTING_Trait
 TALER_TESTING_make_trait_uint
@@ -73,13 +77,13 @@ TALER_TESTING_make_trait_uint
 }
 
 /**
- * Obtain a "number" value from @a cmd.
+ * Obtain a "number" value from @a cmd, 64-bit version.
  *
- * @param cmd command to extract trait from
- * @param selector which coin to pick if @a cmd has multiple on
- * offer
+ * @param cmd command to extract the number from.
+ * @param index the number's index number.
  * @param n[out] set to the number coming from @a cmd.
- * @return #GNUNET_OK on success
+ *
+ * @return #GNUNET_OK on success.
  */
 int
 TALER_TESTING_get_trait_uint64
@@ -94,10 +98,10 @@ TALER_TESTING_get_trait_uint64
 }
 
 /**
- * @param selector associate the object with this "tag"
- * @param n which object should be returned
+ * Offer number trait, 64-bit version.
  *
- * @return the trait, to be put in the traits array of the command
+ * @param index the number's index number.
+ * @param n number to offer.
  */
 struct TALER_TESTING_Trait
 TALER_TESTING_make_trait_uint64
@@ -112,6 +116,4 @@ TALER_TESTING_make_trait_uint64
   return ret;
 }
 
-
-
 /* end of testing_api_trait_number.c */
diff --git a/src/exchange-lib/testing_api_trait_process.c 
b/src/exchange-lib/testing_api_trait_process.c
index e3c1bdf..297b5d3 100644
--- a/src/exchange-lib/testing_api_trait_process.c
+++ b/src/exchange-lib/testing_api_trait_process.c
@@ -2,21 +2,24 @@
   This file is part of TALER
   Copyright (C) 2018 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 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 MERCHANTABILITY or FITNESS FOR
-  A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+  TALER is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty
+  of MERCHANTABILITY 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
+  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 exchange-lib/testing_api_trait_process.c
- * @brief trait for a command that launches a process
+ * @brief trait offering process handles.
  * @author Christian Grothoff
  * @author Marcello Stanisci
  */
@@ -31,17 +34,21 @@
 
 
 /**
- * Obtain location where a command stores a pointer to a process
+ * Obtain location where a command stores a pointer to a process.
+ *
+ * @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
+ *        process.
  *
- * @param cmd command to extract trait from
- * @param selector which process to pick if @a cmd has multiple on offer
- * @param coin_priv[out] set to address of the pointer to the process
- * @return #GNUNET_OK on success
+ * @return #GNUNET_OK on success.
  */
 int
-TALER_TESTING_get_trait_process (const struct TALER_TESTING_Command *cmd,
-                                 unsigned int index,
-                                 struct GNUNET_OS_Process ***processp)
+TALER_TESTING_get_trait_process
+  (const struct TALER_TESTING_Command *cmd,
+   unsigned int index,
+   struct GNUNET_OS_Process ***processp)
 {
   return cmd->traits (cmd->cls,
                       (void **) processp,
@@ -50,9 +57,19 @@ TALER_TESTING_get_trait_process (const struct 
TALER_TESTING_Command *cmd,
 }
 
 
+/**
+ * Offer location where a command stores a pointer to a process.
+ * 
+ * @param index offered location index number, in case there are
+ *        multiple on offer.
+ * @param processp process location to offer.
+ *
+ * @return the trait.
+ */
 struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_process (unsigned int index,
-                                  struct GNUNET_OS_Process **processp)
+TALER_TESTING_make_trait_process
+  (unsigned int index,
+   struct GNUNET_OS_Process **processp)
 {
   struct TALER_TESTING_Trait ret = {
     .index = index,
@@ -63,5 +80,4 @@ TALER_TESTING_make_trait_process (unsigned int index,
   return ret;
 }
 
-
 /* end of testing_api_trait_process.c */
diff --git a/src/exchange-lib/testing_api_trait_reserve_priv.c 
b/src/exchange-lib/testing_api_trait_reserve_priv.c
index 971741f..587a11c 100644
--- a/src/exchange-lib/testing_api_trait_reserve_priv.c
+++ b/src/exchange-lib/testing_api_trait_reserve_priv.c
@@ -35,17 +35,17 @@
 /**
  * Obtain a reserve private key from a @a cmd.
  *
- * @param cmd command to extract trait from
- * @param selector which coin to pick if @a cmd has multiple on
- *        offer
- * @param reserve_priv[out] set to the private key of the reserve
- * @return #GNUNET_OK on success
+ * @param cmd command to extract the reserve priv from.
+ * @param index reserve priv's index number.
+ * @param reserve_priv[out] set to the reserve priv.
+ *
+ * @return #GNUNET_OK on success.
  */
 int
-TALER_TESTING_get_trait_reserve_priv (
-  const struct TALER_TESTING_Command *cmd,
-  unsigned int index,
-  struct TALER_ReservePrivateKeyP **reserve_priv)
+TALER_TESTING_get_trait_reserve_priv
+  (const struct TALER_TESTING_Command *cmd,
+   unsigned int index,
+   struct TALER_ReservePrivateKeyP **reserve_priv)
 {
   return cmd->traits (cmd->cls,
                       (void **) reserve_priv,
@@ -54,10 +54,19 @@ TALER_TESTING_get_trait_reserve_priv (
 }
 
 
+
+/**
+ * Offer a reserve private key.
+ *
+ * @param index reserve priv's index number.
+ * @param reserve_priv reserve private key to offer.
+ *
+ * @return the trait.
+ */
 struct TALER_TESTING_Trait
-TALER_TESTING_make_trait_reserve_priv (
-  unsigned int index,
-  const struct TALER_ReservePrivateKeyP *reserve_priv)
+TALER_TESTING_make_trait_reserve_priv
+  (unsigned int index,
+   const struct TALER_ReservePrivateKeyP *reserve_priv)
 {
   struct TALER_TESTING_Trait ret = {
     .index = index,
@@ -67,5 +76,4 @@ TALER_TESTING_make_trait_reserve_priv (
   return ret;
 }
 
-
 /* end of testing_api_trait_reserve_priv.c */
diff --git a/src/exchange-lib/testing_api_trait_string.c 
b/src/exchange-lib/testing_api_trait_string.c
index fb5af93..e04398e 100644
--- a/src/exchange-lib/testing_api_trait_string.c
+++ b/src/exchange-lib/testing_api_trait_string.c
@@ -19,8 +19,7 @@
 
 /**
  * @file exchange-lib/testing_api_trait_string.c
- * @brief offers strings traits.  Mostly used to offer
- *        stringified JSONs.
+ * @brief offers strings traits.
  * @author Marcello Stanisci
  */
 #include "platform.h"
@@ -40,12 +39,12 @@
 /**
  * Obtain contract terms from @a cmd.
  *
- * @param cmd command to extract trait from
- * @param index always (?) zero, as one command sticks
- *        to one bank account
+ * @param cmd command to extract the contract terms from.
+ * @param index contract terms index number.
  * @param contract_terms[out] where to write the contract
  *        terms.
- * @return #GNUNET_OK on success
+ *
+ * @return #GNUNET_OK on success.
  */
 int
 TALER_TESTING_get_trait_contract_terms
@@ -60,10 +59,12 @@ TALER_TESTING_get_trait_contract_terms
 }
 
 /**
- * @param index always (?) zero, as one command sticks
- *        to one bank account
- * @param contract_terms contract terms to offer
- * @return the trait, to be put in the traits array of the command
+ * Offer contract terms.
+ *
+ * @param index contract terms index number.
+ * @param contract_terms contract terms to offer.
+ * 
+ * @return the trait.
  */
 struct TALER_TESTING_Trait
 TALER_TESTING_make_trait_contract_terms
@@ -82,11 +83,13 @@ TALER_TESTING_make_trait_contract_terms
 /**
  * Obtain a transfer subject from @a cmd.
  *
- * @param cmd command to extract trait from
- * @param index always (?) zero, as one command sticks
- *        to one bank transfer
- * @param transfer_subject[out] where to write the wire details.
- * @return #GNUNET_OK on success
+ * @param cmd command to extract the subject from.
+ * @param index index number associated with the transfer
+ *        subject to offer.
+ * @param transfer_subject[out] where to write the offered
+ *        transfer subject.
+ *
+ * @return #GNUNET_OK on success.
  */
 int
 TALER_TESTING_get_trait_transfer_subject
@@ -101,12 +104,13 @@ TALER_TESTING_get_trait_transfer_subject
 }
 
 /**
- * Offer wire details in a trait.
+ * Offer transfer subject.
  *
- * @param index always (?) zero, as one command sticks
- *        to one bank account
- * @param wire_details wire details to offer
- * @return the trait, to be put in the traits array of the command
+ * @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
 TALER_TESTING_make_trait_transfer_subject
@@ -125,11 +129,12 @@ TALER_TESTING_make_trait_transfer_subject
 /**
  * Obtain an amount from @a cmd.
  *
- * @param cmd command to extract trait from
+ * @param cmd command to extract the amount from.
  * @param index which amount is to be picked, in case
  *        multiple are offered.
  * @param amount[out] where to write the wire details.
- * @return #GNUNET_OK on success
+ *
+ * @return #GNUNET_OK on success.
  */
 int
 TALER_TESTING_get_trait_amount
@@ -146,10 +151,11 @@ TALER_TESTING_get_trait_amount
 /**
  * Offer amount in a trait.
  *
- * @param index which amount is to be picked, in case
- *        multiple are offered.
- * @param amount the amount to offer
- * @return the trait, to be put in the traits array of the command
+ * @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
 TALER_TESTING_make_trait_amount
@@ -168,11 +174,12 @@ TALER_TESTING_make_trait_amount
 /**
  * Obtain a url from @a cmd.
  *
- * @param cmd command to extract trait from
+ * @param cmd command to extract the url from.
  * @param index which url is to be picked, in case
  *        multiple are offered.
- * @param amount[out] where to write the url.
- * @return #GNUNET_OK on success
+ * @param url[out] where to write the url.
+ *
+ * @return #GNUNET_OK on success.
  */
 int
 TALER_TESTING_get_trait_url
@@ -189,10 +196,11 @@ TALER_TESTING_get_trait_url
 /**
  * Offer url in a trait.
  *
- * @param index which url is to be picked, in case
- *        multiple are offered.
- * @param url the url to offer
- * @return the trait, to be put in the traits array of the command
+ * @param index which url is to be picked,
+ *        in case multiple are offered.
+ * @param url the url to offer.
+ *
+ * @return the trait.
  */
 struct TALER_TESTING_Trait
 TALER_TESTING_make_trait_url
@@ -211,11 +219,12 @@ TALER_TESTING_make_trait_url
 /**
  * Obtain a order id from @a cmd.
  *
- * @param cmd command to extract trait from
+ * @param cmd command to extract the order id from.
  * @param index which order id is to be picked, in case
  *        multiple are offered.
  * @param order_id[out] where to write the order id.
- * @return #GNUNET_OK on success
+ *
+ * @return #GNUNET_OK on success.
  */
 int
 TALER_TESTING_get_trait_order_id
@@ -232,10 +241,11 @@ TALER_TESTING_get_trait_order_id
 /**
  * Offer order id in a trait.
  *
- * @param index which order id is to be picked, in case
- *        multiple are offered.
- * @param order_id the url to offer
- * @return the trait, to be put in the traits array of the command
+ * @param index which order id is to be offered,
+ *        in case multiple are offered.
+ * @param order_id the order id to offer.
+ *
+ * @return the trait.
  */
 struct TALER_TESTING_Trait
 TALER_TESTING_make_trait_order_id
@@ -251,14 +261,15 @@ TALER_TESTING_make_trait_order_id
 }
 
 /**
- * Obtain the reference from a bank transfer which has
- * been rejected.
+ * Obtain the reference to a "reject" CMD.  Usually offered
+ * by _rejected_ bank transfers.
  *
- * @param cmd command to extract trait from
+ * @param cmd command to extract the reference from.
  * @param index which reference is to be picked, in case
  *        multiple are offered.
- * @param rejected_reference[out] where to write the order id.
- * @return #GNUNET_OK on success
+ * @param rejected_reference[out] where to write the reference.
+ *
+ * @return #GNUNET_OK on success.
  */
 int
 TALER_TESTING_get_trait_rejected
@@ -273,13 +284,13 @@ TALER_TESTING_get_trait_rejected
 }
 
 /**
- * Offer reference to a bank transfer which has been
- * rejected.
+ * Offer a "reject" CMD reference.
  *
- * @param index which reference is to be picked, in case
- *        multiple are offered.
- * @param rejected_reference the url to offer
- * @return the trait, to be put in the traits array of the command
+ * @param index which reference is to be offered,
+ *        in case multiple are offered.
+ * @param rejected_reference the reference to offer.
+ *
+ * @return the trait.
  */
 struct TALER_TESTING_Trait
 TALER_TESTING_make_trait_rejected
@@ -294,6 +305,4 @@ TALER_TESTING_make_trait_rejected
   return ret;
 }
 
-
-
 /* end of testing_api_trait_string.c */
diff --git a/src/exchange-lib/testing_api_traits.c 
b/src/exchange-lib/testing_api_traits.c
index 051bd20..3e6aedd 100644
--- a/src/exchange-lib/testing_api_traits.c
+++ b/src/exchange-lib/testing_api_traits.c
@@ -49,12 +49,12 @@ TALER_TESTING_trait_end ()
 /**
  * Pick the chosen trait from the traits array.
  *
- * @param traits the traits array
- * @param ret where to store the result
+ * @param traits the traits array.
+ * @param ret where to store the result.
  * @param selector which particular object in the trait should be
- *        returned
+ *        returned.
  *
- * @return GNUNET_OK if no error occurred, GNUNET_SYSERR otherwise
+ * @return GNUNET_OK if no error occurred, GNUNET_SYSERR otherwise.
  */
 int
 TALER_TESTING_get_trait (const struct TALER_TESTING_Trait *traits,

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]