diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-10-20 21:19:01 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-10-20 21:19:01 +0200 |
commit | 19f4c50dabd6a4c29749a9c758e7e0da99d9e31f (patch) | |
tree | 559cbffee16240be807eeba641dbcf695891609d /src/include/taler_json_lib.h | |
parent | 63c5706b64a5fe2989514c5f18e2926b91e420de (diff) | |
download | exchange-19f4c50dabd6a4c29749a9c758e7e0da99d9e31f.tar.xz |
rename and move TALER_EXCHANGE_json_get_error_code to TALER_JSON_get_error_code
Diffstat (limited to 'src/include/taler_json_lib.h')
-rw-r--r-- | src/include/taler_json_lib.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h index b47aea5b6..b247ba1f5 100644 --- a/src/include/taler_json_lib.h +++ b/src/include/taler_json_lib.h @@ -25,6 +25,7 @@ #include <jansson.h> #include <gnunet/gnunet_json_lib.h> #include "taler_util.h" +#include "taler_error_codes.h" /** * Print JSON parsing related error information @@ -92,6 +93,17 @@ int TALER_JSON_hash (const json_t *json, struct GNUNET_HashCode *hc); +/** + * Extract the Taler error code from the given @a json object. + * Note that #TALER_EC_NONE is returned if no "code" is present. + * + * @param json response to extract the error code from + * @return the "code" value from @a json + */ +enum TALER_ErrorCode +TALER_JSON_get_error_code (const json_t *json); + + #endif /* TALER_JSON_LIB_H_ */ /* End of taler_json_lib.h */ |