| | |
| | | extern "C" { |
| | | #endif |
| | | |
| | | struct BHSrcInfo; |
| | | struct BHServerCallbackTag; |
| | | typedef int (*FBHApiIn1Out1)(const void *proc_info, |
| | | const int proc_info_len, |
| | | void **reply, |
| | | int *reply_len, |
| | | const int timeout_ms); |
| | | |
| | | bool BHRegister(const void *proc_info, |
| | | const int proc_info_len, |
| | | void **reply, |
| | | int *reply_len, |
| | | const int timeout_ms); |
| | | |
| | | bool BHRegisterTopics(const void *topics, |
| | | const int topics_len, |
| | | int BHApiIn1Out1Proxy(FBHApiIn1Out1 func, |
| | | const void *request, |
| | | const int request_len, |
| | | void **reply, |
| | | int *reply_len, |
| | | const int timeout_ms); |
| | | |
| | | bool BHSubscribeTopics(const void *topics, |
| | | const int topics_len, |
| | | void **reply, |
| | | int *reply_len, |
| | | const int timeout_ms); |
| | | int BHRegister(const void *proc_info, |
| | | const int proc_info_len, |
| | | void **reply, |
| | | int *reply_len, |
| | | const int timeout_ms); |
| | | |
| | | typedef void (*FSubDataCallback)(const void *proc_id, |
| | | const int proc_id_len, |
| | | const void *data, |
| | | const int data_len); |
| | | |
| | | typedef void (*FServerCallback)(const void *proc_id, |
| | | const int proc_id_len, |
| | | const void *data, |
| | | const int data_len, |
| | | BHServerCallbackTag *tag); |
| | | |
| | | typedef void (*FClientCallback)(const void *proc_id, |
| | | const int proc_id_len, |
| | | const void *msg_id, |
| | | const int msg_id_len, |
| | | const void *data, |
| | | const int data_len); |
| | | |
| | | void BHStartWorker(FServerCallback server_cb, FSubDataCallback sub_cb, FClientCallback client_cb); |
| | | bool BHServerCallbackReply(const BHServerCallbackTag *tag, |
| | | const void *data, |
| | | const int data_len); |
| | | |
| | | bool BHHeartBeatEasy(const int timeout_ms); |
| | | bool BHHeartBeat(const void *proc_info, |
| | | int BHUnregister(const void *proc_info, |
| | | const int proc_info_len, |
| | | void **reply, |
| | | int *reply_len, |
| | | const int timeout_ms); |
| | | |
| | | bool BHPublish(const void *msgpub, |
| | | const int msgpub_len, |
| | | const int timeout_ms); |
| | | int BHRegisterTopics(const void *topics, |
| | | const int topics_len, |
| | | void **reply, |
| | | int *reply_len, |
| | | const int timeout_ms); |
| | | |
| | | bool BHReadSub(const void *proc_id, |
| | | const int proc_id_len, |
| | | void **msgpub, |
| | | int *msgpub_len, |
| | | const int timeout_ms); |
| | | int BHQueryTopicAddress(const void *remote, |
| | | const int remote_len, |
| | | const void *topics, |
| | | const int topics_len, |
| | | void **reply, |
| | | int *reply_len, |
| | | const int timeout_ms); |
| | | |
| | | bool BHAsyncRequest(const void *request, |
| | | const int request_len, |
| | | void **msg_id, |
| | | int *msg_id_len); |
| | | int BHQueryProcs(const void *remote, |
| | | const int remote_len, |
| | | const void *query, |
| | | const int query_len, |
| | | void **reply, |
| | | int *reply_len, |
| | | const int timeout_ms); |
| | | |
| | | bool BHRequest(const void *request, |
| | | const int request_len, |
| | | void **proc_id, |
| | | int *proc_id_len, |
| | | void **reply, |
| | | int *reply_len, |
| | | const int timeout_ms); |
| | | int BHSubscribeTopics(const void *topics, |
| | | const int topics_len, |
| | | void **reply, |
| | | int *reply_len, |
| | | const int timeout_ms); |
| | | int BHSubscribeNetTopics(const void *topics, |
| | | const int topics_len, |
| | | void **reply, |
| | | int *reply_len, |
| | | const int timeout_ms); |
| | | |
| | | bool BHReadRequest(void **proc_id, |
| | | int *proc_id_len, |
| | | void **request, |
| | | int *request_len, |
| | | BHSrcInfo **src, |
| | | const int timeout_ms); |
| | | typedef void (*FSubDataCallback)(const void *proc_id, |
| | | int proc_id_len, |
| | | const void *data, |
| | | int data_len); |
| | | |
| | | bool BHSendReply(BHSrcInfo *src, |
| | | const void *reply, |
| | | const int reply_len); |
| | | typedef void (*FServerCallback)(const void *proc_id, |
| | | int proc_id_len, |
| | | const void *data, |
| | | int data_len, |
| | | void *src); |
| | | |
| | | // int BHCleanUp(); |
| | | typedef void (*FClientCallback)(const void *proc_id, |
| | | int proc_id_len, |
| | | const void *msg_id, |
| | | int msg_id_len, |
| | | const void *data, |
| | | int data_len); |
| | | |
| | | void BHStartWorker(FServerCallback server_cb, FSubDataCallback sub_cb, FClientCallback client_cb); |
| | | |
| | | int BHHeartbeatEasy(const int timeout_ms); |
| | | int BHHeartbeat(const void *proc_info, |
| | | const int proc_info_len, |
| | | void **reply, |
| | | int *reply_len, |
| | | const int timeout_ms); |
| | | |
| | | int BHPublish(const void *msgpub, |
| | | const int msgpub_len, |
| | | const int timeout_ms); |
| | | |
| | | int BHReadSub(void **proc_id, |
| | | int *proc_id_len, |
| | | void **msgpub, |
| | | int *msgpub_len, |
| | | const int timeout_ms); |
| | | |
| | | int BHAsyncRequest(const void *remote, |
| | | const int remote_len, |
| | | const void *request, |
| | | const int request_len, |
| | | void **msg_id, |
| | | int *msg_id_len); |
| | | |
| | | int BHRequest(const void *remote, |
| | | const int remote_len, |
| | | const void *request, |
| | | const int request_len, |
| | | void **proc_id, |
| | | int *proc_id_len, |
| | | void **reply, |
| | | int *reply_len, |
| | | const int timeout_ms); |
| | | |
| | | int BHReadRequest(void **proc_id, |
| | | int *proc_id_len, |
| | | void **request, |
| | | int *request_len, |
| | | void **src, |
| | | const int timeout_ms); |
| | | |
| | | int BHSendReply(void *src, |
| | | const void *reply, |
| | | const int reply_len); |
| | | |
| | | int BHCleanup(); |
| | | |
| | | void BHFree(void *buf, int size); |
| | | |
| | | int BHGetLastError(void **msg, int &msg_len); |
| | | int BHGetLastError(void **msg, int *msg_len); |
| | | |
| | | #ifdef __cplusplus |
| | | } |