X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=include%2Fafb%2Fafb-binding-v2.h;fp=include%2Fafb%2Fafb-binding-v2.h;h=d869dc6eca946734b0622111e2f2a79dbac7a167;hb=248ba86f06b1903fff3e0538d7b06c02610b4806;hp=19bff05abfffadf0cc6c5b83b14ce5bcd9cf0c35;hpb=e000e3b73ee0582882324e504fe2dae7386534f8;p=src%2Fapp-framework-binder.git diff --git a/include/afb/afb-binding-v2.h b/include/afb/afb-binding-v2.h index 19bff05a..d869dc6e 100644 --- a/include/afb/afb-binding-v2.h +++ b/include/afb/afb-binding-v2.h @@ -19,6 +19,8 @@ #include +#include "afb-session-v2.h" + struct afb_service; struct afb_daemon; struct afb_binding_v2; @@ -43,7 +45,7 @@ struct afb_verb_v2 { const char *verb; /* name of the verb */ void (*callback)(struct afb_req req); /* callback function implementing the verb */ - const struct afb_auth *auth; /* required authorisation */ + const struct afb_auth *auth; /* required authorisation */ uint32_t session; /* authorisation and session requirements of the verb */ }; @@ -78,3 +80,33 @@ struct afb_binding_v2 # define AFB_DEBUG_V2(daemon,...) do{if(afbBindingV2verbosity>=3)afb_daemon_verbose(daemon,7,NULL,0,__VA_ARGS__);}while(0) # endif #endif + +#if AFB_BINDING_VERSION == 2 + +# define afb_binding afb_binding_v2 +# define afb_binding_interface afb_binding_interface_v2 + +# define AFB_SESSION_NONE AFB_SESSION_NONE_V2 +# define AFB_SESSION_CLOSE AFB_SESSION_CLOSE_V2 +# define AFB_SESSION_RENEW AFB_SESSION_REFRESH_V2 +# define AFB_SESSION_REFRESH AFB_SESSION_REFRESH_V2 +# define AFB_SESSION_CHECK AFB_SESSION_CHECK_V2 + +# define AFB_SESSION_LOA_MASK AFB_SESSION_LOA_MASK_V2 + +# define AFB_SESSION_LOA_0 AFB_SESSION_LOA_0_V2 +# define AFB_SESSION_LOA_1 AFB_SESSION_LOA_1_V2 +# define AFB_SESSION_LOA_2 AFB_SESSION_LOA_2_V2 +# define AFB_SESSION_LOA_3 AFB_SESSION_LOA_3_V2 + +# if !defined(AFB_BINDING_PRAGMA_NO_VERBOSE_MACRO) + +# define ERROR AFB_ERROR_V2 +# define WARNING AFB_WARNING_V2 +# define NOTICE AFB_NOTICE_V2 +# define INFO AFB_INFO_V2 +# define DEBUG AFB_DEBUG_V2 + +# endif + +#endif