+extern int afb_export_preinit_x3(
+ struct afb_export *export,
+ int (*preinit)(void *,struct afb_api_x3*),
+ void *closure);
+
+extern int afb_export_handle_events_v12(
+ struct afb_export *export,
+ void (*on_event)(const char *event, struct json_object *object));
+
+
+extern int afb_export_handle_events_v3(
+ struct afb_export *export,
+ void (*on_event)(struct afb_api_x3 *api, const char *event, struct json_object *object));
+
+
+extern int afb_export_handle_init_v3(
+ struct afb_export *export,
+ int (*oninit)(struct afb_api_x3 *api));
+
+extern int afb_export_start(struct afb_export *export);
+
+extern int afb_export_logmask_get(const struct afb_export *export);
+extern void afb_export_logmask_set(struct afb_export *export, int mask);
+
+extern void *afb_export_userdata_get(const struct afb_export *export);
+extern void afb_export_userdata_set(struct afb_export *export, void *data);
+
+extern int afb_export_event_handler_add(
+ struct afb_export *export,
+ const char *pattern,
+ void (*callback)(void *, const char*, struct json_object*, struct afb_api_x3*),
+ void *closure);
+
+extern int afb_export_event_handler_del(
+ struct afb_export *export,
+ const char *pattern,
+ void **closure);
+
+extern int afb_export_subscribe(struct afb_export *export, struct afb_event_x2 *event);
+extern int afb_export_unsubscribe(struct afb_export *export, struct afb_event_x2 *event);
+extern void afb_export_process_xreq(struct afb_export *export, struct afb_xreq *xreq);
+extern void afb_export_context_init(struct afb_export *export, struct afb_context *context);
+extern struct afb_export *afb_export_from_api_x3(struct afb_api_x3 *api);
+extern struct afb_api_x3 *afb_export_to_api_x3(struct afb_export *export);
+
+#if defined(WITH_LEGACY_BINDING_V1)
+
+struct afb_service_x1;
+struct afb_binding_interface_v1;
+
+extern struct afb_export *afb_export_create_v1(struct afb_apiset *declare_set,
+ struct afb_apiset *call_set,
+ const char *apiname,
+ int (*init)(struct afb_service_x1),
+ void (*onevent)(const char*, struct json_object*),
+ const char* path);
+
+extern struct afb_binding_v1 *afb_export_register_v1(
+ struct afb_export *export,
+ struct afb_binding_v1 *(*regfun)(const struct afb_binding_interface_v1*));