/****************************************************************************
 * 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.
 ****************************************************************************/

#ifndef AQH_PATH_H
#define AQH_PATH_H

#include <inttypes.h>

#include <aqhome/api.h>


#define AQH_PATH_FLAGS_PATHMUSTEXIST          0x00100000
#define AQH_PATH_FLAGS_PATHMUSTNOTEXIST       0x00200000
#define AQH_PATH_FLAGS_PATHCREATE             0x00400000
#define AQH_PATH_FLAGS_LASTMUSTNOTEXIST       0x00800000
#define AQH_PATH_FLAGS_LASTCREATE             0x01000000
#define AQH_PATH_FLAGS_VARIABLE               0x02000000
#define AQH_PATH_FLAGS_PARSEIDX               0x04000000

#define AQH_PATH_FLAGS_LAST                   0x80000000



typedef void *(*AQH_PATH_HANDLERFN)(const char *entry, void *data, int idx, uint32_t flags);




AQHOME_API void *AQH_Path_Handle(const char *path, void *data, uint32_t flags, const char *delimiters, AQH_PATH_HANDLERFN fn);





#endif
