X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=include%2Fafb%2Fafb-service-v1.h;fp=include%2Fafb%2Fafb-service-itf.h;h=6e85a293d785bb540948b6abe7b66e1652eb2303;hb=95c29ef579d6320a721f96d7146efd10f74a201b;hp=e2e61dc8a82569fc30d7e35f3e7a7153291af665;hpb=e9040472b72ff699964d89dda03ef07ce72b487b;p=src%2Fapp-framework-binder.git diff --git a/include/afb/afb-service-itf.h b/include/afb/afb-service-v1.h similarity index 72% rename from include/afb/afb-service-itf.h rename to include/afb/afb-service-v1.h index e2e61dc8..6e85a293 100644 --- a/include/afb/afb-service-itf.h +++ b/include/afb/afb-service-v1.h @@ -17,32 +17,6 @@ #pragma once -/* avoid inclusion of */ -struct json_object; - -/* - * Interface for internal of services - * It records the functions to be called for the request. - * Don't use this structure directly. - * Use the helper functions documented below. - */ -struct afb_service_itf -{ - /* CAUTION: respect the order, add at the end */ - - void (*call)(void *closure, const char *api, const char *verb, struct json_object *args, - void (*callback)(void*, int, struct json_object*), void *callback_closure); -}; - -/* - * Object that encapsulate accesses to service items - */ -struct afb_service -{ - const struct afb_service_itf *itf; - void *closure; -}; - /** * Calls the 'verb' of the 'api' with the arguments 'args' and 'verb' in the name of the binding. * The result of the call is delivered to the 'callback' function with the 'callback_closure'. @@ -63,7 +37,7 @@ struct afb_service * * @see also 'afb_req_subcall' */ -static inline void afb_service_call( +static inline void afb_service_call_v1( struct afb_service service, const char *api, const char *verb,