summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_amount_lib.h10
-rw-r--r--src/include/taler_util.h17
2 files changed, 27 insertions, 0 deletions
diff --git a/src/include/taler_amount_lib.h b/src/include/taler_amount_lib.h
index 555894f4b..e6c36fed8 100644
--- a/src/include/taler_amount_lib.h
+++ b/src/include/taler_amount_lib.h
@@ -152,6 +152,16 @@ TALER_amount_get_zero (const char *cur,
/**
+ * Test if the given amount is valid.
+ *
+ * @param amount amount to check
+ * @return #GNUNET_OK if @a amount is valid
+ */
+int
+TALER_amount_is_valid (const struct TALER_Amount *amount);
+
+
+/**
* Convert amount from host to network representation.
*
* @param res where to store amount in network representation
diff --git a/src/include/taler_util.h b/src/include/taler_util.h
index c115594f5..34e07a351 100644
--- a/src/include/taler_util.h
+++ b/src/include/taler_util.h
@@ -111,6 +111,23 @@ TALER_config_get_denom (const struct GNUNET_CONFIGURATION_Handle *cfg,
/**
+ * Allow user to specify an amount on the command line.
+ *
+ * @param shortName short name of the option
+ * @param name long name of the option
+ * @param argumentHelp help text for the option argument
+ * @param description long help text for the option
+ * @param[out] amount set to the amount specified at the command line
+ */
+struct GNUNET_GETOPT_CommandLineOption
+TALER_getopt_get_amount (char shortName,
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ struct TALER_Amount *amount);
+
+
+/**
* Return default project data used by Taler.
*/
const struct GNUNET_OS_ProjectData *