summaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_handle.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-01-13 16:22:16 +0100
committerChristian Grothoff <christian@grothoff.org>2019-01-13 16:22:16 +0100
commit91566ddee24dc0685cf33519583d55c813b26974 (patch)
tree08af1dd3c1d7fc1adc06240b69feedfb67478916 /src/lib/exchange_api_handle.h
parent54fc83ee6b910d482948c6ec8185df7aab1b0cb1 (diff)
downloadexchange-91566ddee24dc0685cf33519583d55c813b26974.tar.gz
exchange-91566ddee24dc0685cf33519583d55c813b26974.tar.bz2
exchange-91566ddee24dc0685cf33519583d55c813b26974.zip
more code towards fixing #5447
Diffstat (limited to 'src/lib/exchange_api_handle.h')
-rw-r--r--src/lib/exchange_api_handle.h55
1 files changed, 52 insertions, 3 deletions
diff --git a/src/lib/exchange_api_handle.h b/src/lib/exchange_api_handle.h
index f06fa4eef..2c01e319a 100644
--- a/src/lib/exchange_api_handle.h
+++ b/src/lib/exchange_api_handle.h
@@ -27,21 +27,70 @@
/**
+ * Entry in DLL of auditors used by an exchange.
+ */
+struct TEAH_AuditorListEntry;
+
+
+/**
+ * Entry in list of ongoing interactions with an auditor.
+ */
+struct TEAH_AuditorInteractionEntry
+{
+ /**
+ * DLL entry.
+ */
+ struct TEAH_AuditorInteractionEntry *next;
+
+ /**
+ * DLL entry.
+ */
+ struct TEAH_AuditorInteractionEntry *prev;
+
+ /**
+ * Which auditor is this action associated with?
+ */
+ struct TEAH_AuditorListEntry *ale;
+
+ /**
+ * Interaction state.
+ */
+ struct TALER_AUDITOR_DepositConfirmationHandle *dch;
+};
+
+
+/**
* Function called for each auditor to give us a chance to possibly
- * launch a deposit confirmation interaction.
- *
+ * launch a deposit confirmation interaction.
+ *
* @param cls closure
* @param ah handle to the auditor
* @param auditor_pub public key of the auditor
* @return NULL if no deposit confirmation interaction was launched
*/
-typedef struct TALER_AUDITOR_DepositConfirmationHandle *
+typedef struct TEAH_AuditorInteractionEntry *
(*TEAH_AuditorCallback)(void *cls,
struct TALER_AUDITOR_Handle *ah,
const struct TALER_AuditorPublicKeyP *auditor_pub);
/**
+ * Signature of functions called with the result from our call to the
+ * auditor's /deposit-confirmation handler.
+ *
+ * @param cls closure of type `struct TEAH_AuditorInteractionEntry *`
+ * @param http_status HTTP status code, 200 on success
+ * @param ec taler protocol error status code, 0 on success
+ * @param json raw json response
+ */
+void
+TEAH_acc_confirmation_cb (void *cls,
+ unsigned int http_status,
+ enum TALER_ErrorCode ec,
+ const json_t *json);
+
+
+/**
* Iterate over all available auditors for @a h, calling
* @param ah and giving it a chance to start a deposit
* confirmation interaction.