diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-10-13 08:15:02 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-10-13 08:15:02 +0200 |
commit | c09c900922079be0314009719042a9fd08df798e (patch) | |
tree | be01288ec82d6cd1c8fb16cf3145acb68540e76c /src/include | |
parent | eb1b6fbc97895356f2794927f81463d43c23c76a (diff) |
implement deserialization logic for #5136
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_exchange_service.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index a18672f5a..1ddd7c13e 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014-2017 Taler Systems SA + Copyright (C) 2014-2018 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software @@ -39,8 +39,16 @@ enum TALER_EXCHANGE_Option /** * Terminator (end of option list). */ - TALER_EXCHANGE_OPTION_END = 0 + TALER_EXCHANGE_OPTION_END = 0, + /** + * Followed by a "const json_t *" that was previously returned for + * this exchange URL by #TALER_EXCHANGE_serialize_data(). Used to + * resume a connection to an exchange without having to re-download + * /keys data (or at least only download the deltas). + */ + TALER_EXCHANGE_OPTION_DATA + }; @@ -349,6 +357,19 @@ TALER_EXCHANGE_connect (struct GNUNET_CURL_Context *ctx, /** + * Serialize the latest key data from @a exchange to be persisted + * on disk (to be used with #TALER_EXCHANGE_OPTION_DATA to more + * efficiently recover the state). + * + * @param exchange which exchange's key and wire data should be serialized + * @return NULL on error (i.e. no current data available); otherwise + * json object owned by the caller + */ +json_t * +TALER_EXCHANGE_serialize_data (struct TALER_EXCHANGE_Handle *exchange); + + +/** * Disconnect from the exchange. * * @param exchange the exchange handle |