summaryrefslogtreecommitdiff
path: root/src/include/taler_json_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-01-19 21:53:23 +0100
committerChristian Grothoff <christian@grothoff.org>2015-01-19 21:53:23 +0100
commited51946442e5e22a7dea68f14ff2bf563503c755 (patch)
treebcdca621df102a52337ff7348dc262be43a48514 /src/include/taler_json_lib.h
parentf9347d23953f771689d339b544370d3f9fdd97ba (diff)
downloadexchange-ed51946442e5e22a7dea68f14ff2bf563503c755.tar.gz
exchange-ed51946442e5e22a7dea68f14ff2bf563503c755.tar.bz2
exchange-ed51946442e5e22a7dea68f14ff2bf563503c755.zip
more code refactoring to separate parsing, db and response generation nicely
Diffstat (limited to 'src/include/taler_json_lib.h')
-rw-r--r--src/include/taler_json_lib.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h
index b224c4b33..ec354cce7 100644
--- a/src/include/taler_json_lib.h
+++ b/src/include/taler_json_lib.h
@@ -27,8 +27,7 @@
/**
- * Convert a TALER amount to a JSON
- * object.
+ * Convert a TALER amount to a JSON object.
*
* @param amount the amount
* @return a json object describing the amount
@@ -47,6 +46,17 @@ json_t *
TALER_JSON_from_abs (struct GNUNET_TIME_Absolute stamp);
+/**
+ * Convert a signature (with purpose) to a JSON object representation.
+ *
+ * @param purpose purpose of the signature
+ * @param signature the signature
+ * @return the JSON reporesentation of the signature with purpose
+ */
+json_t *
+TALER_JSON_from_sig (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose,
+ const struct GNUNET_CRYPTO_EddsaSignature *signature);
+
/**
* Convert binary data to a JSON string
@@ -65,7 +75,7 @@ TALER_JSON_from_data (const void *data, size_t size);
*
* @param json the json object representing Amount
* @param r_amount where the amount has to be written
- * @return GNUNET_OK upon successful parsing; GNUNET_SYSERR upon error
+ * @return #GNUNET_OK upon successful parsing; GNUNET_SYSERR upon error
*/
int
TALER_JSON_to_amount (json_t *json,
@@ -76,7 +86,7 @@ TALER_JSON_to_amount (json_t *json,
*
* @param json the json object representing absolute time in seconds
* @param r_abs where the time has to be written
- * @return GNUNET_OK upon successful parsing; GNUNET_SYSERR upon error
+ * @return #GNUNET_OK upon successful parsing; GNUNET_SYSERR upon error
*/
int
TALER_JSON_to_abs (json_t *json,
@@ -88,7 +98,7 @@ TALER_JSON_to_abs (json_t *json,
* @param json the json object representing data
* @param out the pointer to hold the parsed data.
* @param out_size the size of r_data.
- * @return GNUNET_OK upon successful parsing; GNUNET_SYSERR upon error
+ * @return #GNUNET_OK upon successful parsing; GNUNET_SYSERR upon error
*/
int
TALER_JSON_to_data (json_t *json,