X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-ditf.h;h=a24eb0ae3b39970c49bf7af541b0187d2674fe0a;hb=3e56dc3fc7ce31cb932fbd86e78eea02049d0b7e;hp=3e8d99a7ee104c2d556698057fccec55fe3c6624;hpb=a8e971702f23ee67e02b4716ad4159f12cefdca6;p=src%2Fapp-framework-binder.git diff --git a/src/afb-ditf.h b/src/afb-ditf.h index 3e8d99a7..a24eb0ae 100644 --- a/src/afb-ditf.h +++ b/src/afb-ditf.h @@ -15,33 +15,31 @@ * limitations under the License. */ -#define _GNU_SOURCE -#define NO_BINDING_VERBOSE_MACRO +#pragma once -#include -#include -#include +struct afb_binding_interface_v1; +struct afb_binding_data_v2; -#include - -#include "afb-svc.h" -#include "afb-evt.h" -#include "afb-common.h" -#include "afb-context.h" -#include "afb-api-so.h" -#include "afb-xreq.h" -#include "verbose.h" - - -struct afb_binding_interface; +enum afb_ditf_state +{ + Daemon_Pre_Init, + Daemon_Init, + Daemon_Run +}; struct afb_ditf { - struct afb_binding_interface interface; - const char *prefix; + int version; + enum afb_ditf_state state; + const char *api; + union { + struct afb_binding_interface_v1 *v1; + struct afb_binding_data_v2 *v2; + }; }; -extern void afb_ditf_init(struct afb_ditf *ditf, const char *prefix); -extern void afb_ditf_rename(struct afb_ditf *ditf, const char *prefix); +extern void afb_ditf_init_v1(struct afb_ditf *ditf, const char *api, struct afb_binding_interface_v1 *itf); +extern void afb_ditf_init_v2(struct afb_ditf *ditf, const char *api, struct afb_binding_data_v2 *data); +extern void afb_ditf_rename(struct afb_ditf *ditf, const char *api); extern void afb_ditf_update_hook(struct afb_ditf *ditf);