summaryrefslogtreecommitdiff
path: root/src/include/taler_exchange_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-31 14:32:06 +0200
committerChristian Grothoff <christian@grothoff.org>2016-05-31 14:32:06 +0200
commitce3d7c360b7b0bd5cbdbe93ec86e1cb3c9108ea9 (patch)
treed560d18697432ba6ef91d7f8b24a6529e27b771b /src/include/taler_exchange_service.h
parent0cef479e00a89a6649c747f91aba5208affd30e0 (diff)
downloadexchange-ce3d7c360b7b0bd5cbdbe93ec86e1cb3c9108ea9.tar.gz
exchange-ce3d7c360b7b0bd5cbdbe93ec86e1cb3c9108ea9.tar.bz2
exchange-ce3d7c360b7b0bd5cbdbe93ec86e1cb3c9108ea9.zip
add support for /keys cache control (#4036)
Diffstat (limited to 'src/include/taler_exchange_service.h')
-rw-r--r--src/include/taler_exchange_service.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h
index 1da42b897..e65a9faee 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -220,7 +220,7 @@ struct TALER_EXCHANGE_Keys
*
* @param cls closure
* @param keys information about the various keys used
- * by the exchange
+ * by the exchange, NULL if /keys failed
*/
typedef void
(*TALER_EXCHANGE_CertificationCallback) (void *cls,
@@ -244,7 +244,8 @@ struct TALER_EXCHANGE_Handle;
*
* @param ctx the context
* @param url HTTP base URL for the exchange
- * @param cert_cb function to call with the exchange's certification information
+ * @param cert_cb function to call with the exchange's certification information,
+ * possibly called repeatedly if the information changes
* @param cert_cb_cls closure for @a cert_cb
* @param ... list of additional arguments, terminated by #TALER_EXCHANGE_OPTION_END.
* @return the exchange handle; NULL upon error
@@ -273,18 +274,28 @@ TALER_EXCHANGE_disconnect (struct TALER_EXCHANGE_Handle *exchange);
* @return the exchange's key set
*/
const struct TALER_EXCHANGE_Keys *
-TALER_EXCHANGE_get_keys (const struct TALER_EXCHANGE_Handle *exchange);
+TALER_EXCHANGE_get_keys (struct TALER_EXCHANGE_Handle *exchange);
/**
- * Obtain the keys from the exchange in the
- * raw JSON format
+ * Check if our current response for /keys is valid, and if
+ * not, trigger /keys download.
+ *
+ * @param exchange exchange to check keys for
+ * @return until when the response is current, 0 if we are re-downloading
+ */
+struct GNUNET_TIME_Absolute
+TALER_EXCHANGE_check_keys_current (struct TALER_EXCHANGE_Handle *exchange);
+
+
+/**
+ * Obtain the keys from the exchange in the raw JSON format.
*
* @param exchange the exchange handle
* @return the exchange's keys in raw JSON
*/
json_t *
-TALER_EXCHANGE_get_keys_raw (const struct TALER_EXCHANGE_Handle *exchange);
+TALER_EXCHANGE_get_keys_raw (struct TALER_EXCHANGE_Handle *exchange);
/**