From 0c6f41e5965d0013cd871659c52c9abb1057550c Mon Sep 17 00:00:00 2001 From: Shoichi Hiramatsu Date: Mon, 6 Apr 2020 22:16:50 +0900 Subject: Check in demonstration POI binding Bug-AGL: SPEC-3291 Signed-off-by: Shoichi Hiramatsu Change-Id: Iac3488f240f7ae1c19fa6c650bcfcd240e88224a --- binding/src/binding-api.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 binding/src/binding-api.h (limited to 'binding/src/binding-api.h') diff --git a/binding/src/binding-api.h b/binding/src/binding-api.h new file mode 100644 index 0000000..e274f9a --- /dev/null +++ b/binding/src/binding-api.h @@ -0,0 +1,49 @@ +#pragma once + +#ifndef AFB_BINDING_VERSION +#define AFB_BINDING_VERSION 3 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +extern afb_event_t gEventRequestReceived; +extern afb_event_t gEventResponseReceived; + +// Verbs +extern void send_request(afb_req_t req); +extern void request_processed(afb_req_t req); +extern void subscribe_requests(afb_req_t req); +extern void unsubscribe_requests(afb_req_t req); +extern void subscribe_responses(afb_req_t req); +extern void unsubscribe_responses(afb_req_t req); + +#define POIAPI_BINDING_API_NAME "poi" + +#define POIAPI_BINDING_VERB_SEND_REQUEST "send-request" +#define POIAPI_BINDING_VERB_REQUEST_PROCESSED "request-processed" +#define POIAPI_BINDING_VERB_SUBSCRIBE_REQUESTS "subscribe-requests" +#define POIAPI_BINDING_VERB_UNSUBSCRIBE_REQUESTS "unsubscribe-requests" +#define POIAPI_BINDING_VERB_SUBSCRIBE_RESPONSES "subscribe-responses" +#define POIAPI_BINDING_VERB_UNSUBSCRIBE_RESPONSES "unsubscribe-responses" + +#define POIAPI_BINDING_EVENT_REQUEST_RECEIVED "reqest-received-event" +#define POIAPI_BINDING_EVENT_RESPONSE_RECEIVED "response-received-event" + +// Some definitions is not used in this project + +#define POIAPI_BINDING_PARAMETER_KEY_REQUEST_ID "request-id" +#define POIAPI_BINDING_PARAMETER_KEY_REQUEST_OBJECT "request-object" +#define POIAPI_BINDING_PARAMETER_KEY_RESPONSE_OBJECT "response-object" + +#define POIAPI_BINDING_REQUEST_OBJECT_KEY_REQUEST_TYPE "request-type" +#define POIAPI_BINDING_REQUEST_OBJECT_KEY_REQUEST_PARAMETER "request-parameter" + +#define POIAPI_BINDING_REQUEST_TYPE_EXTERNAL_ONLINE_REQUEST_HTTP_GET_JSON "external-online-request-http-get-json" + +#ifdef __cplusplus +} // extern "C" +#endif -- cgit 1.2.3-korg