diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-04-23 14:38:03 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-07-29 12:18:38 +0200 |
commit | 0198ab66b78c250bf7896efef9724d10ba6d6188 (patch) | |
tree | a1346676ead7596063946c13ae963e907e311436 /src/json | |
parent | 19f98d1575261034b4fa7c634be9be0999a17533 (diff) |
a bit of work on the service API, update signature API
Diffstat (limited to 'src/json')
-rw-r--r-- | src/json/json_helper.c | 51 |
1 files changed, 2 insertions, 49 deletions
diff --git a/src/json/json_helper.c b/src/json/json_helper.c index 2ade19446..e25212d56 100644 --- a/src/json/json_helper.c +++ b/src/json/json_helper.c @@ -815,7 +815,8 @@ TALER_JSON_spec_blinded_denom_sig ( struct GNUNET_JSON_Specification TALER_JSON_spec_blinded_planchet (const char *field, - struct TALER_BlindedPlanchet *blinded_planchet) + struct TALER_BlindedPlanchet *blinded_planchet + ) { blinded_planchet->blinded_message = NULL; return GNUNET_JSON_spec_blinded_message (field, @@ -1142,54 +1143,6 @@ TALER_JSON_spec_ec (const char *field, /** - * Parse given JSON object with AML decision. - * - * @param cls closure, NULL - * @param root the json object representing data - * @param[out] spec where to write the data - * @return #GNUNET_OK upon successful parsing; #GNUNET_SYSERR upon error - */ -static enum GNUNET_GenericReturnValue -parse_aml_decision (void *cls, - json_t *root, - struct GNUNET_JSON_Specification *spec) -{ - enum TALER_AmlDecisionState *aml = spec->ptr; - json_int_t num; - - (void) cls; - if (! json_is_integer (root)) - { - GNUNET_break_op (0); - return GNUNET_SYSERR; - } - num = json_integer_value (root); - if ( (num > TALER_AML_MAX) || - (num < 0) ) - { - GNUNET_break_op (0); - return GNUNET_SYSERR; - } - *aml = (enum TALER_AmlDecisionState) num; - return GNUNET_OK; -} - - -struct GNUNET_JSON_Specification -TALER_JSON_spec_aml_decision (const char *field, - enum TALER_AmlDecisionState *aml_state) -{ - struct GNUNET_JSON_Specification ret = { - .parser = &parse_aml_decision, - .field = field, - .ptr = aml_state - }; - - return ret; -} - - -/** * Parse given JSON object to web URL. * * @param cls closure, NULL |