-struct api_so_desc {
- struct AFB_plugin *plugin; /* descriptor */
- size_t apilength;
- void *handle; /* context of dlopen */
- struct AFB_interface interface; /* interface */
-};
-
-static int api_timeout = 15;
-
-static const char plugin_register_function[] = "pluginAfbV1Register";
-
-static void afb_api_so_event_sender_push(struct api_so_desc *desc, const char *name, struct json_object *object)
-{
- size_t length;
- char *event;
-
- assert(desc->plugin != NULL);
- length = strlen(name);
- event = alloca(length + 2 + desc->apilength);
- memcpy(event, desc->plugin->v1.prefix, desc->apilength);
- event[desc->apilength] = '/';
- memcpy(event + desc->apilength + 1, name, length + 1);
- ctxClientEventSend(NULL, event, object);
-}
-
-static const struct afb_event_sender_itf event_sender_itf = {
- .push = (void*)afb_api_so_event_sender_push
-};
-
-static struct afb_event_sender afb_api_so_get_event_sender(struct api_so_desc *desc)