/**************************************************************************** * This file is part of the project AqHome. * AqHome (c) by 2024 Martin Preuss, all rights reserved. * * The license for this file can be found in the file COPYING which you * should have received along with this file. ****************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "./aqhome_react_p.h" #include #include AQHOME_REACT *AqHomeReact_new() { AQHOME_REACT *aqh; GWEN_NEW_OBJECT(AQHOME_REACT, aqh); return aqh; } void AqHomeReact_free(AQHOME_REACT *aqh) { if (aqh) { GWEN_MsgEndpoint_free(aqh->brokerEndpoint); GWEN_DB_Group_free(aqh->dbArgs); free(aqh->pidFile); GWEN_FREE_OBJECT(aqh); } } GWEN_MSG_ENDPOINT *AqHomeReact_GetBrokerEndpoint(const AQHOME_REACT *aqh) { return aqh?(aqh->brokerEndpoint):NULL; } GWEN_DB_NODE *AqHomeReact_GetDbArgs(const AQHOME_REACT *aqh) { return aqh?(aqh->dbArgs):NULL; } const char *AqHomeReact_GetPidFile(const AQHOME_REACT *aqh) { return aqh?aqh->pidFile:NULL; } void AqHomeReact_SetPidFile(AQHOME_REACT *aqh, const char *s) { if (aqh) { free(aqh->pidFile); aqh->pidFile=s?strdup(s):NULL; } } int AqHomeReact_GetTimeout(const AQHOME_REACT *aqh) { return aqh?aqh->timeout:0; }