From 8800d0df9b6b996b319f311f91f0b06cf1c507df Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 6 Aug 2022 22:10:33 +0200 Subject: -fix schema use --- src/kyclogic/plugin_kyclogic_template.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'src/kyclogic/plugin_kyclogic_template.c') diff --git a/src/kyclogic/plugin_kyclogic_template.c b/src/kyclogic/plugin_kyclogic_template.c index a40aad4e..1cc9b97c 100644 --- a/src/kyclogic/plugin_kyclogic_template.c +++ b/src/kyclogic/plugin_kyclogic_template.c @@ -139,6 +139,21 @@ struct TALER_KYCLOGIC_ProofHandle struct TALER_KYCLOGIC_WebhookHandle { + /** + * Continuation to call when done. + */ + TALER_KYCLOGIC_WebhookCallback cb; + + /** + * Closure for @a cb. + */ + void *cb_cls; + + /** + * Task for asynchronous execution. + */ + struct GNUNET_SCHEDULER_Task *task; + /** * Overall plugin state. */ @@ -300,7 +315,7 @@ template_proof_cancel (struct TALER_KYCLOGIC_ProofHandle *ph) * @param cb_cls closure for @a cb * @return handle to cancel operation early */ -static struct TALER_KYCLOGIC_InitiateHandle * +static struct TALER_KYCLOGIC_WebhookHandle * template_webhook (void *cls, const struct TALER_KYCLOGIC_ProviderDetails *pd, TALER_KYCLOGIC_ProviderLookupCallback plc, @@ -313,8 +328,16 @@ template_webhook (void *cls, TALER_KYCLOGIC_WebhookCallback cb, void *cb_cls) { - GNUNET_break_op (0); - return NULL; + struct PluginState *ps = cls; + struct TALER_KYCLOGIC_WebhookHandle *wh; + + wh = GNUNET_new (struct TALER_KYCLOGIC_WebhookHandle); + wh->cb = cb; + wh->cb_cls = cb_cls; + wh->ps = ps; + wh->pd = pd; + GNUNET_break (0); /* FIXME: start activity */ + return wh; } @@ -326,6 +349,8 @@ template_webhook (void *cls, static void template_webhook_cancel (struct TALER_KYCLOGIC_WebhookHandle *wh) { + GNUNET_break (0); /* FIXME: stop activity */ + GNUNET_free (wh); } -- cgit v1.2.3