diff options
author | Li, Xiaoming <lixm.fnst@cn.fujitsu.com> | 2020-06-22 11:07:30 +0800 |
---|---|---|
committer | Li Xiaoming <lixm.fnst@cn.fujitsu.com> | 2020-07-21 12:31:15 +0000 |
commit | abb024ffcbf800a51dc7a7c513611141d82b2a3b (patch) | |
tree | d527d9ffb743460058ef3f275cd063efcb65a9d8 /binding/binding-api.h | |
parent | 0c6f41e5965d0013cd871659c52c9abb1057550c (diff) |
Fix test folder structureneedlefish_13.93.0needlefish/13.93.0marlin_12.93.0marlin_12.92.0marlin_12.91.0marlin_12.90.1marlin_12.90.0marlin/12.93.0marlin/12.92.0marlin/12.91.0marlin/12.90.1marlin/12.90.0lamprey_11.92.0lamprey_11.91.0lamprey/11.92.0lamprey/11.91.0koi_10.93.0koi_10.92.0koi_10.91.0koi/10.93.0koi/10.92.0koi/10.91.0jellyfish_9.99.4jellyfish_9.99.3jellyfish_9.99.2jellyfish/9.99.4jellyfish/9.99.3jellyfish/9.99.29.99.49.99.39.99.213.93.012.93.012.92.012.91.012.90.112.90.011.92.011.91.010.93.010.92.010.91.0
The test folder should rest in the root of a package.
Bug-AGL: SPEC-2807
Change-Id: I6e44e68f40aaf58d2c59973e6a2413947dcb4eaf
Signed-off-by: Li, Xiaoming <lixm.fnst@cn.fujitsu.com>
Diffstat (limited to 'binding/binding-api.h')
-rw-r--r-- | binding/binding-api.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/binding/binding-api.h b/binding/binding-api.h new file mode 100644 index 0000000..e274f9a --- /dev/null +++ b/binding/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 <afb/afb-binding.h> + +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 |