path.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile: path.h,v $
00003  -------------------
00004  cvs         : $Id: path.h,v 1.16 2005/01/14 13:40:10 aquamaniac Exp $
00005  begin       : Tue Sep 09 2003
00006  copyright   : (C) 2003 by Martin Preuss
00007  email       : martin@libchipcard.de
00008 
00009  ***************************************************************************
00010  *                                                                         *
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU Lesser General Public            *
00013  *   License as published by the Free Software Foundation; either          *
00014  *   version 2.1 of the License, or (at your option) any later version.    *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00024  *   MA  02111-1307  USA                                                   *
00025  *                                                                         *
00026  ***************************************************************************/
00027 
00028 
00029 #ifndef GWENHYWFAR_PATH_H
00030 #define GWENHYWFAR_PATH_H
00031 
00032 #include <gwenhywfar/gwenhywfarapi.h>
00033 #include <gwenhywfar/types.h>
00034 #include <gwenhywfar/buffer.h>
00035 
00036 
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif
00040 
00058 
00069 #define GWEN_PATH_FLAGS_PATHMUSTEXIST          0x00000001
00070 
00073 #define GWEN_PATH_FLAGS_PATHMUSTNOTEXIST       0x00000002
00074 
00081 #define GWEN_PATH_FLAGS_PATHCREATE             0x00000004
00082 
00087 #define GWEN_PATH_FLAGS_NAMEMUSTEXIST          0x00000008
00088 
00092 #define GWEN_PATH_FLAGS_NAMEMUSTNOTEXIST       0x00000010
00093 
00099 #define GWEN_PATH_FLAGS_CREATE_GROUP            0x00000020
00100 
00106 #define GWEN_PATH_FLAGS_CREATE_VAR              0x00000040
00107 
00114 #define GWEN_PATH_FLAGS_VARIABLE                0x00000080
00115 
00116 
00124 #define GWEN_PATH_FLAGS_ESCAPE                  0x00000100
00125 
00127 #define GWEN_PATH_FLAGS_UNESCAPE                0x00000100
00128 
00129 /* be more tolerant, don't escape common characters such as '.' */
00130 #define GWEN_PATH_FLAGS_TOLERANT_ESCAPE         0x00000200
00131 
00136 #define GWEN_PATH_FLAGS_CONVERT_LAST            0x00000400
00137 
00145 #define GWEN_PATH_FLAGS_CHECKROOT               0x00000800
00146 
00151 #define GWEN_PATH_FLAGS_NO_IDX                  0x00001000
00152 
00156 #define GWEN_PATH_FLAGS_RFU1                    0x00002000
00157 
00158 
00162 #define GWEN_PATH_FLAGS_INTERNAL                0x0000c000
00163 
00169 #define GWEN_PATH_FLAGS_LAST                    0x00004000
00170 
00177 #define GWEN_PATH_FLAGS_ROOT                    0x00008000
00178 
00183 typedef void* (*GWEN_PATHHANDLERPTR)(const char *entry,
00184                                      void *data,
00185                                      GWEN_TYPE_UINT32 flags);
00186 
00187 typedef void* (*GWEN_PATHIDXHANDLERPTR)(const char *entry,
00188                                         void *data,
00189                                         int idx,
00190                                         GWEN_TYPE_UINT32 flags);
00191 
00192 
00205 GWENHYWFAR_API
00206   void *GWEN_Path_Handle(const char *path,
00207                          void *data,
00208                          GWEN_TYPE_UINT32 flags,
00209                          GWEN_PATHHANDLERPTR elementFunction);
00210 
00211 GWENHYWFAR_API
00212   void *GWEN_Path_HandleWithIdx(const char *path,
00213                                 void *data,
00214                                 GWEN_TYPE_UINT32 flags,
00215                                 GWEN_PATHIDXHANDLERPTR elementFunction);
00216 
00217 
00224 GWENHYWFAR_API
00225   int GWEN_Path_Convert(const char *path,
00226                         GWEN_BUFFER *buffer,
00227                         GWEN_TYPE_UINT32 flags);
00228 
00229  /* defgroup */
00231 
00232 
00233 #ifdef __cplusplus
00234 }
00235 #endif
00236 
00237 
00238 #endif /* GWENHYWFAR_PATH_H */
00239 

Generated on Wed Jan 11 16:49:07 2006 for gwenhywfar by  doxygen 1.4.6