aqhome-react: add "varsFile" (will write variables later).

This commit is contained in:
Martin Preuss
2024-05-18 13:11:29 +02:00
parent 334d0e8096
commit dde9106a5d
4 changed files with 55 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ void AqHomeReact_free(AQHOME_REACT *aqh)
AQHREACT_Unit_List_free(aqh->unitList);
GWEN_MsgEndpoint_free(aqh->brokerEndpoint);
GWEN_DB_Group_free(aqh->dbArgs);
free(aqh->varsFile);
free(aqh->pidFile);
GWEN_FREE_OBJECT(aqh);
@@ -88,6 +89,23 @@ void AqHomeReact_SetPidFile(AQHOME_REACT *aqh, const char *s)
const char *AqHomeReact_GetVarsFile(const AQHOME_REACT *aqh)
{
return aqh?aqh->varsFile:NULL;
}
void AqHomeReact_SetVarsFile(AQHOME_REACT *aqh, const char *s)
{
if (aqh) {
free(aqh->varsFile);
aqh->varsFile=s?strdup(s):NULL;
}
}
int AqHomeReact_GetTimeout(const AQHOME_REACT *aqh)
{
return aqh?aqh->timeout:0;