path.h
Go to the documentation of this file.
/***************************************************************************
begin : Tue Sep 09 2003
copyright : (C) 2003-2010 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
* MA 02111-1307 USA *
* *
***************************************************************************/
#ifndef GWENHYWFAR_PATH_H
#define GWENHYWFAR_PATH_H
#include <gwenhywfar/gwenhywfarapi.h>
#include <gwenhywfar/types.h>
#include <gwenhywfar/buffer.h>
#ifdef __cplusplus
extern "C" {
#endif
#define GWEN_PATH_FLAGS_PATHMUSTEXIST 0x00000001
#define GWEN_PATH_FLAGS_PATHMUSTNOTEXIST 0x00000002
#define GWEN_PATH_FLAGS_PATHCREATE 0x00000004
#define GWEN_PATH_FLAGS_NAMEMUSTEXIST 0x00000008
#define GWEN_PATH_FLAGS_NAMEMUSTNOTEXIST 0x00000010
#define GWEN_PATH_FLAGS_CREATE_GROUP 0x00000020
#define GWEN_PATH_FLAGS_CREATE_VAR 0x00000040
#define GWEN_PATH_FLAGS_VARIABLE 0x00000080
#define GWEN_PATH_FLAGS_ESCAPE 0x00000100
#define GWEN_PATH_FLAGS_UNESCAPE 0x00000100
/* be more tolerant, don't escape common characters such as '.' */
#define GWEN_PATH_FLAGS_TOLERANT_ESCAPE 0x00000200
#define GWEN_PATH_FLAGS_CONVERT_LAST 0x00000400
#define GWEN_PATH_FLAGS_CHECKROOT 0x00000800
#define GWEN_PATH_FLAGS_NO_IDX 0x00001000
#define GWEN_PATH_FLAGS_RFU1 0x00002000
#define GWEN_PATH_FLAGS_INTERNAL 0x0000c000
#define GWEN_PATH_FLAGS_LAST 0x00004000
#define GWEN_PATH_FLAGS_ROOT 0x00008000
typedef void *(*GWEN_PATHHANDLERPTR)(const char *entry,
void *data,
uint32_t flags);
typedef void *(*GWEN_PATHIDXHANDLERPTR)(const char *entry,
void *data,
int idx,
uint32_t flags);
GWENHYWFAR_API
void *GWEN_Path_Handle(const char *path,
void *data,
uint32_t flags,
GWEN_PATHHANDLERPTR elementFunction);
GWENHYWFAR_API
void *GWEN_Path_HandleWithIdx(const char *path,
void *data,
uint32_t flags,
GWEN_PATHIDXHANDLERPTR elementFunction);
GWENHYWFAR_API
int GWEN_Path_Convert(const char *path,
GWEN_BUFFER *buffer,
uint32_t flags);
GWENHYWFAR_API
int GWEN_Path_GetPathBetween(const char *path1, const char *path2, GWEN_BUFFER *diffBuf);
/* defgroup */
#ifdef __cplusplus
}
#endif
#endif /* GWENHYWFAR_PATH_H */
buffer.h
GWEN_BUFFER
struct GWEN_BUFFER GWEN_BUFFER
A dynamically resizeable text buffer.
Definition buffer.h:38
gwenhywfarapi.h
GWENHYWFAR_API
#define GWENHYWFAR_API
Definition gwenhywfarapi.h:67
GWEN_Path_Convert
GWENHYWFAR_API int GWEN_Path_Convert(const char *path, GWEN_BUFFER *buffer, uint32_t flags)
GWEN_Path_GetPathBetween
GWENHYWFAR_API int GWEN_Path_GetPathBetween(const char *path1, const char *path2, GWEN_BUFFER *diffBuf)
GWEN_PATHHANDLERPTR
void *(* GWEN_PATHHANDLERPTR)(const char *entry, void *data, uint32_t flags)
Definition path.h:180
GWEN_Path_HandleWithIdx
GWENHYWFAR_API void * GWEN_Path_HandleWithIdx(const char *path, void *data, uint32_t flags, GWEN_PATHIDXHANDLERPTR elementFunction)
GWEN_Path_Handle
GWENHYWFAR_API void * GWEN_Path_Handle(const char *path, void *data, uint32_t flags, GWEN_PATHHANDLERPTR elementFunction)
GWEN_PATHIDXHANDLERPTR
void *(* GWEN_PATHIDXHANDLERPTR)(const char *entry, void *data, int idx, uint32_t flags)
Definition path.h:184
types.h