X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=include%2Fafb%2Fafb-service-itf.h;h=490d77e733cc53b5497caeea8c6c76eef8871efd;hb=271bb6fc606fc5068a7b7a8f22b0052aca2fb900;hp=ac40cf79b4ee7d75cd3d21bb3942c22cd4111c32;hpb=5b5a2e4412eea806451c016da9fb285bc09c17ab;p=src%2Fapp-framework-binder.git diff --git a/include/afb/afb-service-itf.h b/include/afb/afb-service-itf.h index ac40cf79..490d77e7 100644 --- a/include/afb/afb-service-itf.h +++ b/include/afb/afb-service-itf.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 "IoT.bzh" + * Copyright (C) 2016, 2017 "IoT.bzh" * Author: José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,26 +17,10 @@ #pragma once -/* avoid inclusion of */ -struct json_object; +#pragma GCC warning "\n\n\ + This header file is OBSOLETE.\n\ + It is provided for COMPATIBILITY ONLY.\n\n\ + Please USE and ADAPT YOUR CODE to new names.\n" -struct afb_service_itf -{ - void (*call)(void *closure, const char *api, const char *verb, struct json_object *args, void (*callback)(void*, int, struct json_object*), void *callback_closure); -}; - -struct afb_service -{ - const struct afb_service_itf *itf; - void *closure; -}; - -extern int pluginAfbV1ServiceInit(struct afb_service service); - -extern void pluginAfbV1ServiceEvent(const char *event, struct json_object *object); - -static inline void afb_service_call(struct afb_service service, const char *api, const char *verb, struct json_object *args, void (*callback)(void*, int, struct json_object*), void *callback_closure) -{ - service.itf->call(service.closure, api, verb, args, callback, callback_closure); -} +#include "afb-binding.h"