/****************************************************************************
 * 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 AQH_AQHOME_H
#define AQH_AQHOME_H


#include <aqhome/api.h>

#include <gwenhywfar/stringlist.h>
#include <gwenhywfar/db.h>
#include <gwenhywfar/buffer.h>



AQHOME_API int AQH_Init(void);
AQHOME_API void AQH_Fini(void);

AQHOME_API GWEN_DB_NODE *AQH_LoadConfigFile(void);
AQHOME_API void AQH_MergeConfigFileIntoConfig(GWEN_DB_NODE *dbArgs, const char *destDbGroupName);

AQHOME_API GWEN_STRINGLIST *AQH_GetListOfMatchingDataFiles(const char *subFolder, const char *mask);
AQHOME_API GWEN_STRINGLIST *AQH_GetListOfMatchingRuntimeDataFiles(const char *subFolder, const char *mask);
AQHOME_API GWEN_STRINGLIST *AQH_GetListOfMatchingSysconfFiles(const char *subFolder, const char *mask);

AQHOME_API GWEN_BUFFER *AQH_GetRuntimeFilePath(const char *sFilename);

AQHOME_API GWEN_BUFFER *AQH_FindPathOfRuntimeFile(const char *sFilename);
AQHOME_API GWEN_BUFFER *AQH_FindPathOfSysconfFile(const char *sFilename);
AQHOME_API GWEN_BUFFER *AQH_FindPathOfDataFile(const char *sFilename);


AQHOME_API GWEN_STRINGLIST *AQH_GetGlobalDataDirs(void);
AQHOME_API GWEN_STRINGLIST *AQH_GetGlobalSysconfDirs(void);




#endif

