aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-07-21 20:21:08 +0200
committerChristian Grothoff <christian@grothoff.org>2021-07-21 20:21:08 +0200
commit95f0fdf36988327c8377bb891c5bf726defc387e (patch)
tree24856e510d09de818bfcb83be101aea3fe89d772 /src/include
parent5828dfad1df1ff9c4f2cec18a9a85c87f7364930 (diff)
distinguish between input failure and internal failures when hashing contracts
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_json_lib.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h
index a9829d4a0..145a5d2e2 100644
--- a/src/include/taler_json_lib.h
+++ b/src/include/taler_json_lib.h
@@ -191,9 +191,11 @@ TALER_JSON_spec_i18n_str (const char *name,
*
* @param[in] json some JSON value to hash
* @param[out] hc resulting hash code
- * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
+ * @return #GNUNET_OK on success,
+ * #GNUNET_NO if @a json was malformed
+ * #GNUNET_SYSERR on internal error
*/
-int
+enum GNUNET_GenericReturnValue
TALER_JSON_contract_hash (const json_t *json,
struct GNUNET_HashCode *hc);
@@ -207,7 +209,7 @@ TALER_JSON_contract_hash (const json_t *json,
* @param[in,out] json JSON to transform
* @return #GNUNET_OK on success
*/
-int
+enum GNUNET_GenericReturnValue
TALER_JSON_contract_seed_forgettable (json_t *json);
@@ -218,7 +220,7 @@ TALER_JSON_contract_seed_forgettable (json_t *json);
* @param field name of the field to mark as forgettable
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
*/
-int
+enum GNUNET_GenericReturnValue
TALER_JSON_contract_mark_forgettable (json_t *json,
const char *field);
@@ -232,7 +234,7 @@ TALER_JSON_contract_mark_forgettable (json_t *json,
* #GNUNET_NO if the field was already forgotten before
* #GNUNET_SYSERR on error
*/
-int
+enum GNUNET_GenericReturnValue
TALER_JSON_contract_part_forget (json_t *json,
const char *field);
@@ -262,7 +264,7 @@ typedef void
* @param cb_cls closure for the callback.
* @return #GNUNET_OK on success, #GNUNET_SYSERR if @e path is invalid.
*/
-int
+enum GNUNET_GenericReturnValue
TALER_JSON_expand_path (json_t *json,
const char *path,
TALER_JSON_ExpandPathCallback cb,