X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=include%2Fafb%2Fafb-request.h;h=8e909bba94bf99c277c901fe0fbfb038d935e278;hb=refs%2Fchanges%2F45%2F14345%2F1;hp=26b2ef11cacd26ef610397418ffc69ea7987771f;hpb=325e6a7f034c80562096d60ab01f2e4532eea98c;p=src%2Fapp-framework-binder.git diff --git a/include/afb/afb-request.h b/include/afb/afb-request.h index 26b2ef11..8e909bba 100644 --- a/include/afb/afb-request.h +++ b/include/afb/afb-request.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016, 2017 "IoT.bzh" + * Copyright (C) 2016, 2017, 2018 "IoT.bzh" * Author: José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,7 +19,25 @@ #include "afb-request-itf.h" -typedef struct afb_request afb_request; +static inline struct afb_dynapi *afb_request_get_dynapi(struct afb_request *request) +{ + return request->dynapi; +} + +static inline void *afb_request_get_vcbdata(struct afb_request *request) +{ + return request->vcbdata; +} + +static inline const char *afb_request_get_api(struct afb_request *request) +{ + return request->api; +} + +static inline const char *afb_request_get_verb(struct afb_request *request) +{ + return request->verb; +} /* * Gets from the request 'request' the argument of 'name'. @@ -358,3 +376,14 @@ static inline char *afb_request_get_application_id(struct afb_request *request) return request->itf->get_application_id(request); } +/* + * Get the user identifier (UID) of the client for the + * request 'request'. + * + * Returns -1 when the application can not be identified. + */ +static inline int afb_request_get_uid(struct afb_request *request) +{ + return request->itf->get_uid(request); +} +