summaryrefslogtreecommitdiff
path: root/src/util/yna.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-06-14 15:15:53 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-05 16:50:14 +0200
commita32a5ef25aa35c7c9228e5f8f9541aaef7f525c4 (patch)
tree1c983076b6fd2aa5b99a59590b4b206003070108 /src/util/yna.c
parent0c4eca0d4858651d7415951c8a708c3380ccbb64 (diff)
downloadexchange-a32a5ef25aa35c7c9228e5f8f9541aaef7f525c4.tar.gz
exchange-a32a5ef25aa35c7c9228e5f8f9541aaef7f525c4.tar.bz2
exchange-a32a5ef25aa35c7c9228e5f8f9541aaef7f525c4.zip
add TALER_yna_to_string()
Diffstat (limited to 'src/util/yna.c')
-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 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);
+}