/****************************************************************************
 * This file is part of the project AqHome.
 * AqHome (c) by 2025 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.
 ****************************************************************************/

#ifndef AQHOME_REACT_LINK_H
#define AQHOME_REACT_LINK_H


#include <gwenhywfar/list.h>


typedef struct AQHREACT_LINK AQHREACT_LINK;
GWEN_LIST_FUNCTION_DEFS(AQHREACT_LINK, AQHREACT_Link)


#include "aqhome-react/types/unit.h"
#include "aqhome-react/types/port.h"

#include <gwenhywfar/buffer.h>



AQHREACT_LINK *AQHREACT_Link_new();
void AQHREACT_Link_free(AQHREACT_LINK *lnk);


AQHREACT_UNIT *AQHREACT_Link_GetTargetUnit(const AQHREACT_LINK *lnk);
void AQHREACT_Link_SetTargetUnit(AQHREACT_LINK *lnk, AQHREACT_UNIT *unit);

AQHREACT_PORT *AQHREACT_Link_GetTargetPort(const AQHREACT_LINK *lnk);
void AQHREACT_Link_SetTargetPort(AQHREACT_LINK *lnk, AQHREACT_PORT *port);

void AQHREACT_Link_Dump(const AQHREACT_LINK *lnk, GWEN_BUFFER *buf, int indent);
void AQHREACT_Link_List_Dump(const AQHREACT_LINK_LIST *lnkList, GWEN_BUFFER *buf, int indent, const char *title);


#endif

