aboutsummaryrefslogtreecommitdiff
path: root/src/kyclogic/plugin_kyclogic_template.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-08-06 22:10:33 +0200
committerChristian Grothoff <christian@grothoff.org>2022-08-06 22:10:33 +0200
commit8800d0df9b6b996b319f311f91f0b06cf1c507df (patch)
tree8b8ba28642e874f7df51eb191eff721792513105 /src/kyclogic/plugin_kyclogic_template.c
parentfb5037b8e3e84ab49eaf7cf82947aef75d942872 (diff)
-fix schema use
Diffstat (limited to 'src/kyclogic/plugin_kyclogic_template.c')
-rw-r--r--src/kyclogic/plugin_kyclogic_template.c31
1 files changed, 28 insertions, 3 deletions
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
@@ -140,6 +140,21 @@ 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.
*/
struct PluginState *ps;
@@ -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);
}