summaryrefslogtreecommitdiff
path: root/src/include/taler_util.h
diff options
context:
space:
mode:
authorJonathan Buchanan <jonathan.russ.buchanan@gmail.com>2020-06-12 15:16:40 -0400
committerChristian Grothoff <christian@grothoff.org>2020-07-05 16:50:14 +0200
commit0c4eca0d4858651d7415951c8a708c3380ccbb64 (patch)
tree1a69a37f71a099bc441091c2ace8d8f6067e0a75 /src/include/taler_util.h
parentc9d94bc9f2729f0cbbc36eba672d4c4e38fa5f6b (diff)
downloadexchange-0c4eca0d4858651d7415951c8a708c3380ccbb64.tar.gz
exchange-0c4eca0d4858651d7415951c8a708c3380ccbb64.tar.bz2
exchange-0c4eca0d4858651d7415951c8a708c3380ccbb64.zip
moved yna to exchange
Diffstat (limited to 'src/include/taler_util.h')
-rw-r--r--src/include/taler_util.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/include/taler_util.h b/src/include/taler_util.h
index c7bf9c02a..07b78a432 100644
--- a/src/include/taler_util.h
+++ b/src/include/taler_util.h
@@ -298,4 +298,41 @@ char *
TALER_xtalerbank_account_from_payto (const char *payto);
+/**
+ * Possible values for a binary filter.
+ */
+enum TALER_EXCHANGE_YesNoAll
+{
+ /**
+ * If condition is yes.
+ */
+ TALER_EXCHANGE_YNA_YES = 1,
+
+ /**
+ * If condition is no.
+ */
+ TALER_EXCHANGE_YNA_NO = 2,
+
+ /**
+ * Condition disabled.
+ */
+ TALER_EXCHANGE_YNA_ALL = 3
+};
+
+
+/**
+ * Convert query argument to @a yna value.
+ *
+ * @param connection connection to take query argument from
+ * @param arg argument to try for
+ * @param default_val value to assign if the argument is not present
+ * @param[out] value to set
+ * @return true on success, false if the parameter was malformed
+ */
+bool
+TALER_arg_to_yna (struct MHD_Connection *connection,
+ const char *arg,
+ enum TALER_EXCHANGE_YesNoAll default_val,
+ enum TALER_EXCHANGE_YesNoAll *yna);
+
#endif