[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] 67/152: add TALER_yna_to_string()
From: |
gnunet |
Subject: |
[taler-exchange] 67/152: add TALER_yna_to_string() |
Date: |
Sun, 05 Jul 2020 20:47:03 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit 6b6814a205077f4c77f8dd42012fccdd12c0df5d
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Jun 14 15:15:53 2020 +0200
add TALER_yna_to_string()
---
src/include/taler_util.h | 11 +++++++++++
src/util/yna.c | 22 ++++++++++++++++++++++
2 files changed, 33 insertions(+)
diff --git a/src/include/taler_util.h b/src/include/taler_util.h
index 07b78a43..22d7f7f2 100644
--- a/src/include/taler_util.h
+++ b/src/include/taler_util.h
@@ -335,4 +335,15 @@ TALER_arg_to_yna (struct MHD_Connection *connection,
enum TALER_EXCHANGE_YesNoAll default_val,
enum TALER_EXCHANGE_YesNoAll *yna);
+
+/**
+ * Convert YNA value to a string.
+ *
+ * @param yna value to convert
+ * @return string representation ("yes"/"no"/"all").
+ */
+const char *
+TALER_yna_to_string (enum TALER_EXCHANGE_YesNoAll yna);
+
+
#endif
diff --git a/src/util/yna.c b/src/util/yna.c
index 6907df67..fa7cf934 100644
--- a/src/util/yna.c
+++ b/src/util/yna.c
@@ -64,3 +64,25 @@ TALER_arg_to_yna (struct MHD_Connection *connection,
}
return false;
}
+
+
+/**
+ * Convert YNA value to a string.
+ *
+ * @param yna value to convert
+ * @return string representation ("yes"/"no"/"all").
+ */
+const char *
+TALER_yna_to_string (enum TALER_EXCHANGE_YesNoAll yna)
+{
+ switch (yna)
+ {
+ case TALER_EXCHANGE_YNA_YES:
+ return "yes";
+ case TALER_EXCHANGE_YNA_NO:
+ return "no";
+ case TALER_EXCHANGE_YNA_ALL:
+ return "all";
+ }
+ GNUNET_assert (0);
+}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-exchange] 55/152: more ECs, (continued)
- [taler-exchange] 55/152: more ECs, gnunet, 2020/07/05
- [taler-exchange] 58/152: implemented the other functions for taler_sq_lib, gnunet, 2020/07/05
- [taler-exchange] 60/152: taler_error_codes.h auto generated from gnunet/gana.git as a submodule, gnunet, 2020/07/05
- [taler-exchange] 31/152: more ecs, gnunet, 2020/07/05
- [taler-exchange] 34/152: ign, gnunet, 2020/07/05
- [taler-exchange] 41/152: combine sections, gnunet, 2020/07/05
- [taler-exchange] 45/152: modify TALER_EXCHANGE_deposits_get() API to combine returned arguments into a struct (simplifies merchant later), gnunet, 2020/07/05
- [taler-exchange] 33/152: fix status code, gnunet, 2020/07/05
- [taler-exchange] 36/152: void basedb due to signature format change, gnunet, 2020/07/05
- [taler-exchange] 63/152: update gana, gnunet, 2020/07/05
- [taler-exchange] 67/152: add TALER_yna_to_string(),
gnunet <=
- [taler-exchange] 65/152: sync gana, gnunet, 2020/07/05
- [taler-exchange] 70/152: synchronize with latest GANA, gnunet, 2020/07/05
- [taler-exchange] 71/152: add TALER_MHD_parse_internal_json_data(), gnunet, 2020/07/05
- [taler-exchange] 73/152: testing traits for uint32_t and GNUNET_TIME_Relative, gnunet, 2020/07/05
- [taler-exchange] 76/152: Merge branch 'protocolv8' of git+ssh://git.taler.net/exchange into protocolv8, gnunet, 2020/07/05
- [taler-exchange] 79/152: fix FIXME by exposing deposit permission signing in API instead of doing it inside of the testing logic, gnunet, 2020/07/05
- [taler-exchange] 86/152: fix error reporting/handling, gnunet, 2020/07/05
- [taler-exchange] 85/152: move rewind command to exchange, add proper support for rewinding in batches, modify API to rewind to label, gnunet, 2020/07/05
- [taler-exchange] 81/152: response to CB, gnunet, 2020/07/05
- [taler-exchange] 92/152: make tests skip until we have a wallet to regen the DB, gnunet, 2020/07/05