aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/yna.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/util/yna.c b/src/util/yna.c
index 6907df675..fa7cf9348 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);
+}