root/libutil/gpathop.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright (c) 1997, 1998, 1999, 2000, 2005, 2006
   3  *      Tama Communications Corporation
   4  *
   5  * This file is part of GNU GLOBAL.
   6  *
   7  * This program is free software: you can redistribute it and/or modify
   8  * it under the terms of the GNU General Public License as published by
   9  * the Free Software Foundation, either version 3 of the License, or
  10  * (at your option) any later version.
  11  * 
  12  * This program is distributed in the hope that it will be useful,
  13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15  * GNU General Public License for more details.
  16  * 
  17  * You should have received a copy of the GNU General Public License
  18  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  19  */
  20 
  21 #ifndef _PATHOP_H_
  22 #define _PATHOP_H_
  23 #include <stdio.h>
  24 
  25 #include "gparam.h"
  26 #include "dbop.h"
  27 
  28 #define NEXTKEY         " __.NEXTKEY"
  29 
  30 /**
  31  * @name File type
  32  */
  33 /** @{ */
  34 #define GPATH_SOURCE    1
  35 #define GPATH_OTHER     2
  36 #define GPATH_BOTH      3
  37 /** @} */
  38 
  39 typedef struct {
  40         /** set by gfind_open() */
  41         DBOP *dbop;
  42         const char *prefix;
  43         int target;
  44         int version;
  45         /** set by gfind_open() and gfind_read() */
  46         int first;
  47         int eod;                /**< end of data */
  48         /* set by gfind_read() */
  49         int type;               /**< File type; set by gfind_read() */
  50         const char *path;       /**< return value of gfind_read() */
  51 } GFIND;
  52 
  53 int gpath_open(const char *, int);
  54 const char *gpath_path2fid(const char *, int *);
  55 const char *gpath_fid2path(const char *, int *);
  56 void gpath_put(const char *, int);
  57 void gpath_delete(const char *);
  58 void gpath_close(void);
  59 int gpath_nextkey(void);
  60 GFIND *gfind_open(const char *, const char *, int);
  61 const char *gfind_read(GFIND *);
  62 void gfind_close(GFIND *);
  63 
  64 #endif /* ! _PATHOP_H_ */

/* [previous][next][first][last][top][bottom][index][help] */