diff --git a/apps/aqhome-tool/data/watch.c b/apps/aqhome-tool/data/watch.c index 42b994d..aff6cb2 100644 --- a/apps/aqhome-tool/data/watch.c +++ b/apps/aqhome-tool/data/watch.c @@ -89,7 +89,7 @@ int AQH_Tool_Watch(GWEN_DB_NODE *dbGlobalArgs, int argc, char **argv) -int _handleResponseMessage(AQH_OBJECT *o, const AQH_MESSAGE *msg, const GWEN_TAG16_LIST *tagList, int first) +int _handleResponseMessage(AQH_OBJECT *o, const AQH_MESSAGE *msg, const GWEN_TAG16_LIST *tagList, GWEN_UNUSED int first) { uint16_t code; GWEN_DB_NODE *dbArgs; @@ -110,7 +110,7 @@ int _handleResponseMessage(AQH_OBJECT *o, const AQH_MESSAGE *msg, const GWEN_TAG -void _handleDataResponse(const AQH_MESSAGE *msg, const GWEN_TAG16_LIST *tagList, const char *tmpl) +void _handleDataResponse(GWEN_UNUSED const AQH_MESSAGE *msg, const GWEN_TAG16_LIST *tagList, const char *tmpl) { AQH_VALUE *value; diff --git a/aqhome/ipc2/endpoint.c b/aqhome/ipc2/endpoint.c index 173f8eb..f8c6b10 100644 --- a/aqhome/ipc2/endpoint.c +++ b/aqhome/ipc2/endpoint.c @@ -115,6 +115,33 @@ void GWENHYWFAR_CB _freeData(GWEN_UNUSED void *bp, void *p) +int AQH_Endpoint_GetApiCode(const AQH_OBJECT *o) +{ + if (o) { + AQH_ENDPOINT *xo; + + xo=GWEN_INHERIT_GETDATA(AQH_OBJECT, AQH_ENDPOINT, o); + if (xo) + return xo->apiCode; + } + return 0; +} + + + +void AQH_Endpoint_SetApiCode(AQH_OBJECT *o, int i) +{ + if (o) { + AQH_ENDPOINT *xo; + + xo=GWEN_INHERIT_GETDATA(AQH_OBJECT, AQH_ENDPOINT, o); + if (xo) + xo->apiCode=i; + } +} + + + const char *AQH_Endpoint_GetServiceName(const AQH_OBJECT *o) { if (o) { diff --git a/aqhome/ipc2/endpoint.h b/aqhome/ipc2/endpoint.h index 2a0f524..669a5aa 100644 --- a/aqhome/ipc2/endpoint.h +++ b/aqhome/ipc2/endpoint.h @@ -34,6 +34,9 @@ enum { */ AQHOME_API AQH_OBJECT *AQH_Endpoint_new(AQH_EVENT_LOOP *eventLoop, AQH_OBJECT *msgReader, AQH_OBJECT *msgWriter); +AQHOME_API int AQH_Endpoint_GetApiCode(const AQH_OBJECT *o); +AQHOME_API void AQH_Endpoint_SetApiCode(AQH_OBJECT *o, int i); + AQHOME_API const char *AQH_Endpoint_GetServiceName(const AQH_OBJECT *o); AQHOME_API void AQH_Endpoint_SetServiceName(AQH_OBJECT *o, const char *s); diff --git a/aqhome/ipc2/endpoint_p.h b/aqhome/ipc2/endpoint_p.h index 4441e1a..d2de283 100644 --- a/aqhome/ipc2/endpoint_p.h +++ b/aqhome/ipc2/endpoint_p.h @@ -20,6 +20,7 @@ struct AQH_ENDPOINT { AQH_OBJECT *msgWriter; AQH_OBJECT *msgReader; + int apiCode; uint32_t lastMsgId; int state; uint32_t permissions;