summaryrefslogtreecommitdiff
path: root/src/include/taler_amount_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/taler_amount_lib.h')
-rw-r--r--src/include/taler_amount_lib.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/include/taler_amount_lib.h b/src/include/taler_amount_lib.h
index a529cfb84..937238d15 100644
--- a/src/include/taler_amount_lib.h
+++ b/src/include/taler_amount_lib.h
@@ -18,6 +18,10 @@
* @brief amount-representation utility functions
* @author Sree Harsha Totakura <sreeharsha@totakura.in>
*/
+#if ! defined (__TALER_UTIL_LIB_H_INSIDE__)
+#error "Only <taler_util.h> can be included directly."
+#endif
+
#ifndef TALER_AMOUNT_LIB_H
#define TALER_AMOUNT_LIB_H
@@ -124,6 +128,16 @@ struct TALER_Amount
/**
+ * Check that the currency code in @a str is well-formed.
+ *
+ * @param str currency code name to validate
+ * @return #GNUNET_OK if @a str is a valid currency code
+ */
+enum GNUNET_GenericReturnValue
+TALER_check_currency (const char *str);
+
+
+/**
* Parse monetary amount, in the format "T:V.F".
*
* @param str amount string
@@ -398,7 +412,7 @@ TALER_amount_multiply (struct TALER_Amount *result,
* #GNUNET_NO if value was already normalized
* #GNUNET_SYSERR if value was invalid or could not be normalized
*/
-int
+enum GNUNET_GenericReturnValue
TALER_amount_normalize (struct TALER_Amount *amount);