aqhome-data, aqhome-tool: more work on new protocol.

This commit is contained in:
Martin Preuss
2025-02-27 23:50:18 +01:00
parent d887747b3c
commit f2d527cd2f
35 changed files with 2070 additions and 2353 deletions

View File

@@ -13,6 +13,8 @@
#include <aqhome/ipc2/message.h>
#define AQH_ENDPOINT_FLAGS_WANTUPDATES 0x0001
enum {
AQH_ENDPOINT_SIGNAL_CLOSED=AQH_OBJECT_SIGNAL_LAST,

View File

@@ -209,7 +209,7 @@ void AQH_MsgRequest_SetTimestamps(AQH_MSG_REQUEST *rq, int expiresInSecs)
int AQH_MsgRequest_HandleResponse(AQH_MSG_REQUEST *rq, AQH_MESSAGE *msg)
int AQH_MsgRequest_HandleResponse(AQH_MSG_REQUEST *rq, const AQH_MESSAGE *msg)
{
if (rq && rq->handleResponseFn)
return (rq->handleResponseFn)(rq, msg);

View File

@@ -35,7 +35,7 @@ typedef struct AQH_MSG_REQUEST AQH_MSG_REQUEST;
GWEN_INHERIT_FUNCTION_LIB_DEFS(AQH_MSG_REQUEST, AQHOME_API)
GWEN_TREE2_FUNCTION_LIB_DEFS(AQH_MSG_REQUEST, AQH_MsgRequest, AQHOME_API)
typedef int (*AQH_MSG_REQUEST_HANDLERESPONSE_FN)(AQH_MSG_REQUEST *rq, AQH_MESSAGE *msg);
typedef int (*AQH_MSG_REQUEST_HANDLERESPONSE_FN)(AQH_MSG_REQUEST *rq, const AQH_MESSAGE *msg);
typedef void (*AQH_MSG_REQUEST_SUBREQUESTFINISHED_FN)(AQH_MSG_REQUEST *rq, AQH_MSG_REQUEST *subRq, int reason);
typedef void (*AQH_MSG_REQUEST_ABORT_FN)(AQH_MSG_REQUEST *rq, int reason);
@@ -74,7 +74,7 @@ AQHOME_API int AQH_MsgRequest_GetState(const AQH_MSG_REQUEST *rq);
AQHOME_API void AQH_MsgRequest_SetState(AQH_MSG_REQUEST *rq, int i);
AQHOME_API int AQH_MsgRequest_HandleResponse(AQH_MSG_REQUEST *rq, AQH_MESSAGE *msg);
AQHOME_API int AQH_MsgRequest_HandleResponse(AQH_MSG_REQUEST *rq, const AQH_MESSAGE *msg);
AQHOME_API void AQH_MsgRequest_SubRequestFinished(AQH_MSG_REQUEST *rq, AQH_MSG_REQUEST *subRq, int reason);
AQHOME_API void AQH_MsgRequest_Abort(AQH_MSG_REQUEST *rq, int reason);

View File

@@ -60,6 +60,13 @@ uint32_t AQH_IpcMessageResult_GetResult(const GWEN_TAG16_LIST *tagList)
char *AQH_IpcMessageResult_GetText(const GWEN_TAG16_LIST *tagList)
{
return tagList?AQH_Tag16_GetTagDataAsNewString(tagList, AQH_MSGDATA_RESULT_TAGS_TEXT, NULL):0;
}
void AQH_IpcMessageResult_DumpToBuffer(const AQH_MESSAGE *msg, const GWEN_TAG16_LIST *tagList, GWEN_BUFFER *dbuf, const char *sText)
{
int result=0;

View File

@@ -40,6 +40,7 @@ AQHOME_API AQH_MESSAGE *AQH_IpcMessageResult_new(uint8_t protoId, uint8_t protoV
int result, const char *text);
AQHOME_API uint32_t AQH_IpcMessageResult_GetResult(const GWEN_TAG16_LIST *tagList);
AQHOME_API char *AQH_IpcMessageResult_GetText(const GWEN_TAG16_LIST *tagList);
AQHOME_API void AQH_IpcMessageResult_DumpToBuffer(const AQH_MESSAGE *msg, const GWEN_TAG16_LIST *tagList,
GWEN_BUFFER *dbuf, const char *sText);