[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: -use nicer enum
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: -use nicer enum |
Date: |
Tue, 20 Jul 2021 15:38:58 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new d37e4eab -use nicer enum
d37e4eab is described below
commit d37e4eabc4248a16b15363e57ca33882999ad9b1
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Jul 20 15:38:56 2021 +0200
-use nicer enum
---
src/include/taler_json_lib.h | 13 +++++++++++++
src/json/json_wire.c | 4 ++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h
index aefc2806..a9829d4a 100644
--- a/src/include/taler_json_lib.h
+++ b/src/include/taler_json_lib.h
@@ -334,6 +334,19 @@ TALER_JSON_exchange_wire_signature_check (
const struct TALER_MasterPublicKeyP *master_pub);
+/**
+ * Validate payto:// account URL (only account information,
+ * wire subject and amount are ignored).
+ *
+ * @param payto_uri URL to parse
+ * @return #GNUNET_YES if @a payto_uri is a valid payto://iban URI
+ * #GNUNET_NO if @a payto_uri is a payto URI of an unsupported type
(but may be valid)
+ * #GNUNET_SYSERR if the account incorrect or this is not a
payto://-URI at all
+ */
+enum GNUNET_GenericReturnValue
+TALER_JSON_validate_payto (const char *payto_uri);
+
+
/**
* Create a signed wire statement for the given account.
*
diff --git a/src/json/json_wire.c b/src/json/json_wire.c
index 929d5365..bd019a7d 100644
--- a/src/json/json_wire.c
+++ b/src/json/json_wire.c
@@ -222,7 +222,7 @@ cmp_country_code (const void *ptr1,
* @param iban the IBAN number to validate
* @return #GNUNET_YES if correctly formatted; #GNUNET_NO if not
*/
-static int
+static enum GNUNET_GenericReturnValue
validate_iban (const char *iban)
{
char cc[2];
@@ -331,7 +331,7 @@ validate_iban (const char *iban)
* #GNUNET_NO if @a account_url is a payto URI of a different type,
* #GNUNET_SYSERR if the IBAN (checksum) is incorrect or this is not a
payto://-URI
*/
-static int
+static enum GNUNET_GenericReturnValue
validate_payto_iban (const char *account_url)
{
const char *iban;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: -use nicer enum,
gnunet <=