From ce23b9e7ff8443c46ed21804277d8db90671a3b4 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Fri, 22 Sep 2017 07:58:05 +0200 Subject: Prepare subscription to eventid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie3f75377009be36f7f5bd52bdb31d0611cd49778 Signed-off-by: José Bollo --- include/afb/afb-request-itf.h | 8 ++++++++ include/afb/afb-request.h | 10 ++++------ 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/afb/afb-request-itf.h b/include/afb/afb-request-itf.h index 4c62b3de..a5c3f82a 100644 --- a/include/afb/afb-request-itf.h +++ b/include/afb/afb-request-itf.h @@ -163,5 +163,13 @@ struct afb_request_itf void *(*create_value)(void *creation_closure), void (*free_value)(void*), void *creation_closure); + + int (*subscribe_eventid)( + struct afb_request *request, + struct afb_eventid *eventid); + + int (*unsubscribe_eventid)( + struct afb_request *request, + struct afb_eventid *eventid); }; diff --git a/include/afb/afb-request.h b/include/afb/afb-request.h index c2585fc5..acfb7ea1 100644 --- a/include/afb/afb-request.h +++ b/include/afb/afb-request.h @@ -21,8 +21,6 @@ typedef struct afb_request afb_request; -#include "afb-event.h" - /* * Gets from the request 'request' the argument of 'name'. * Returns a PLAIN structure of type 'struct afb_arg'. @@ -244,9 +242,9 @@ static inline int afb_request_session_set_LOA(struct afb_request *request, unsig * to the 'event'. * Returns 0 in case of successful subscription or -1 in case of error. */ -static inline int afb_request_subscribe(struct afb_request *request, struct afb_event event) +static inline int afb_request_subscribe(struct afb_request *request, struct afb_eventid *eventid) { - return request->itf->subscribe(request, event); + return request->itf->subscribe_eventid(request, eventid); } /* @@ -254,9 +252,9 @@ static inline int afb_request_subscribe(struct afb_request *request, struct afb_ * link identified by 'request'. * Returns 0 in case of successful subscription or -1 in case of error. */ -static inline int afb_request_unsubscribe(struct afb_request *request, struct afb_event event) +static inline int afb_request_unsubscribe(struct afb_request *request, struct afb_eventid *eventid) { - return request->itf->unsubscribe(request, event); + return request->itf->unsubscribe_eventid(request, eventid); } /* -- cgit 1.2.3-korg