/****************************************************************************
 * This file is part of the project Gwenhywfar.
 * Gwenhywfar (c) by 2023 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 AQH_OBJECT_P_H
#define AQH_OBJECT_P_H


#include "./object.h"


typedef struct AQH_LINK AQH_LINK;
GWEN_LIST_FUNCTION_DEFS(AQH_LINK, AQH_Link)



struct AQH_LINK {
  GWEN_LIST_ELEMENT(AQH_LINK)

  uint32_t signalIdForSender;
  uint32_t signalIdForTarget;
  AQH_OBJECT *targetObject;
};



struct AQH_OBJECT {
  GWEN_INHERIT_ELEMENT(AQH_OBJECT)
  GWEN_LIST_ELEMENT(AQH_OBJECT)

  uint32_t flags;
  AQH_EVENT_LOOP *eventLoop;

  AQH_LINK_LIST *linkList;

  AQH_OBJECT_SIGNALHANDLER_FN signalHandlerFn;
  AQH_OBJECT_ENABLE_FN enableFn;
  AQH_OBJECT_DISABLE_FN disableFn;

  int refCount;
};


#endif
