X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-xreq.h;h=11e199543924691c044e6449691f612c965002a2;hb=b70caad7da2eaea85db06dec8377b1cbebcec997;hp=da966a441ee377ccf62d694b1edc779233fb35a1;hpb=a2cf84ecde926adeebf09bc2c284401513d3fab3;p=src%2Fapp-framework-binder.git diff --git a/src/afb-xreq.h b/src/afb-xreq.h index da966a44..11e19954 100644 --- a/src/afb-xreq.h +++ b/src/afb-xreq.h @@ -59,8 +59,6 @@ struct afb_xreq int hookflags; /**< flags for hooking */ int hookindex; /**< hook index of the request if hooked */ #endif - struct afb_evt_listener *listener; /**< event listener for the request */ - struct afb_cred *cred; /**< client credential if revelant */ struct afb_xreq *caller; /**< caller request if any */ }; @@ -85,6 +83,7 @@ struct afb_xreq /* req wrappers for xreq */ extern struct afb_req_x1 afb_xreq_unstore(struct afb_stored_req *sreq); + extern void afb_xreq_addref(struct afb_xreq *xreq); extern void afb_xreq_unref(struct afb_xreq *xreq); extern void afb_xreq_unhooked_addref(struct afb_xreq *xreq); @@ -96,8 +95,12 @@ extern struct json_object *afb_xreq_json(struct afb_xreq *xreq); extern void afb_xreq_reply(struct afb_xreq *xreq, struct json_object *obj, const char *error, const char *info); extern void afb_xreq_reply_f(struct afb_xreq *xreq, struct json_object *obj, const char *error, const char *info, ...); -extern void afb_xreq_reply_unknown_api(struct afb_xreq *xreq); -extern void afb_xreq_reply_unknown_verb(struct afb_xreq *xreq); +extern int afb_xreq_reply_unknown_api(struct afb_xreq *xreq); +extern int afb_xreq_reply_unknown_verb(struct afb_xreq *xreq); + +extern int afb_xreq_reply_invalid_token(struct afb_xreq *xreq); +extern int afb_xreq_reply_insufficient_scope(struct afb_xreq *xreq, const char *scope); + extern const char *afb_xreq_raw(struct afb_xreq *xreq, size_t *size); @@ -154,8 +157,13 @@ extern void afb_xreq_init(struct afb_xreq *xreq, const struct afb_xreq_query_itf extern void afb_xreq_process(struct afb_xreq *xreq, struct afb_apiset *apiset); +#if WITH_LEGACY_BINDING_V1 extern void afb_xreq_call_verb_v1(struct afb_xreq *xreq, const struct afb_verb_desc_v1 *verb); +#endif +#if WITH_LEGACY_BINDING_V2 extern void afb_xreq_call_verb_v2(struct afb_xreq *xreq, const struct afb_verb_v2 *verb); +#endif + extern void afb_xreq_call_verb_v3(struct afb_xreq *xreq, const struct afb_verb_v3 *verb); extern const char *xreq_on_behalf_cred_export(struct afb_xreq *xreq);