summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-06-20 22:16:24 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2018-06-20 22:16:24 +0200
commitfeec78dd56f261dac02899c2dc96019d95f94d13 (patch)
treefe15b91541bdbdec602aaf131fdcb7e8790d959f /src/include
parentd5684648f9e47fd49f8c699191b8740de783b1b8 (diff)
downloadexchange-feec78dd56f261dac02899c2dc96019d95f94d13.tar.gz
exchange-feec78dd56f261dac02899c2dc96019d95f94d13.tar.bz2
exchange-feec78dd56f261dac02899c2dc96019d95f94d13.zip
Implementing #5306.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_testing_lib.h57
1 files changed, 46 insertions, 11 deletions
diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h
index 4cfb25a9b..b63bd8c67 100644
--- a/src/include/taler_testing_lib.h
+++ b/src/include/taler_testing_lib.h
@@ -1115,6 +1115,23 @@ TALER_TESTING_cmd_check_keys
unsigned int num_denom_keys,
struct TALER_EXCHANGE_Handle *exchange);
+/**
+ * Create a "batch" command. Such command takes a
+ * end_CMD-terminated array of CMDs and executed them.
+ * Once it hits the end CMD, it passes the control
+ * to the next top-level CMD, regardless of it being
+ * another batch or ordinary CMD.
+ *
+ * @param label the command label.
+ * @param batch array of CMDs to execute.
+ *
+ * @return the command.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_batch (const char *label,
+ struct TALER_TESTING_Command *batch);
+
+
/* *** Generic trait logic for implementing traits ********* */
/**
@@ -1808,18 +1825,36 @@ TALER_TESTING_get_trait_rejected
/**
- * Create a "batch" command. Such command takes a
- * end_CMD-terminated array of CMDs and executed them.
- * Once it hits the end CMD, it passes the control
- * to the next top-level CMD, regardless of it being
- * another batch or ordinary CMD.
+ * Offer a command in a trait.
*
- * @param label the command label.
- * @param batch array of CMDs to execute.
+ * @param index always zero. Commands offering this
+ * kind of traits do not need this index. For
+ * example, a "meta" CMD returns always the
+ * CMD currently being executed.
+ * @param cmd wire details to offer.
*
- * @return the command.
+ * @return the trait.
*/
-struct TALER_TESTING_Command
-TALER_TESTING_cmd_batch (const char *label,
- struct TALER_TESTING_Command *batch);
+struct TALER_TESTING_Trait
+TALER_TESTING_make_trait_cmd
+ (unsigned int index,
+ const struct TALER_TESTING_Command *cmd);
+
+/**
+ * Obtain a command from @a cmd.
+ *
+ * @param cmd command to extract the command from.
+ * @param index always zero. Commands offering this
+ * 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.
+ *
+ * @return #GNUNET_OK on success.
+ */
+int
+TALER_TESTING_get_trait_cmd
+ (const struct TALER_TESTING_Command *cmd,
+ unsigned int index,
+ struct TALER_TESTING_Command **_cmd);
#endif