/****************************************************************************
 * This file is part of the project AqHome.
 * AqHome (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 AQHOME_DATA_P_H
#define AQHOME_DATA_P_H


#include "./aqhome_data.h"

#include <gwenhywfar/mutex.h>


#define AQHOME_DATA_DEFAULT_PIDFILE           "/var/run/aqhome-data.pid"
#define AQHOME_DATA_DEFAULT_DATADIR           "/var/lib/aqhome-data/data"
#define AQHOME_DATA_DEFAULT_IPC_PORT          45456

#define AQHOME_DATA_STATEFILENAME             "statefile"



struct AQHOME_DATA {
  GWEN_MSG_ENDPOINT *ipcdEndpoint;

  GWEN_DB_NODE *dbArgs;

  AQH_STORAGE *storage;

  char *pidFile;

  int timeout;   /* timeout for run e.g. inside valgrind */

  GWEN_MUTEX *storageMutex;

};


#endif

