X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-export.h;h=90f71519d55c18d0773d8bf5c540323c3e4718ad;hb=65353dce81a629e042800bb7b86fcd869a76727e;hp=e8b9a9d4313ea2614f8d1acaa337321a38ff3f7a;hpb=a2cf84ecde926adeebf09bc2c284401513d3fab3;p=src%2Fapp-framework-binder.git diff --git a/src/afb-export.h b/src/afb-export.h index e8b9a9d4..90f71519 100644 --- a/src/afb-export.h +++ b/src/afb-export.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2019 "IoT.bzh" + * Copyright (C) 2015-2020 "IoT.bzh" * Author: José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,8 +24,6 @@ struct afb_apiset; struct afb_context; struct afb_xreq; -struct afb_binding_v2; -struct afb_binding_data_v2; struct afb_api_v3; struct afb_api_x3; struct afb_event_x2; @@ -39,15 +37,6 @@ extern struct afb_export *afb_export_create_none_for_path( int (*creator)(void*, struct afb_api_x3*), void *closure); -extern struct afb_export *afb_export_create_v2(struct afb_apiset *declare_set, - struct afb_apiset *call_set, - const char *apiname, - const struct afb_binding_v2 *binding, - struct afb_binding_data_v2 *data, - int (*init)(), - void (*onevent)(const char*, struct json_object*), - const char* path); - extern struct afb_export *afb_export_create_v3(struct afb_apiset *declare_set, struct afb_apiset *call_set, const char *apiname, @@ -74,11 +63,6 @@ extern int afb_export_preinit_x3( 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)); @@ -118,7 +102,7 @@ extern struct afb_api_x3 *afb_export_to_api_x3(struct afb_export *export); extern void afb_export_update_hooks(struct afb_export *export); #endif -#if defined(WITH_LEGACY_BINDING_V1) +#if WITH_LEGACY_BINDING_V1 struct afb_service_x1; struct afb_binding_interface_v1; @@ -136,3 +120,26 @@ extern struct afb_binding_v1 *afb_export_register_v1( #endif +#if WITH_LEGACY_BINDING_V2 + +struct afb_binding_v2; +struct afb_binding_data_v2; + +extern struct afb_export *afb_export_create_v2(struct afb_apiset *declare_set, + struct afb_apiset *call_set, + const char *apiname, + const struct afb_binding_v2 *binding, + struct afb_binding_data_v2 *data, + int (*init)(), + void (*onevent)(const char*, struct json_object*), + const char* path); + +#endif + +#if WITH_LEGACY_BINDING_V1 || WITH_LEGACY_BINDING_V2 +extern int afb_export_handle_events_v12( + struct afb_export *export, + void (*on_event)(const char *event, struct json_object *object)); +#endif + +