/Home/aooliver/work/stagersvc/org.glite.data.lcg_gfal/src/gfal.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2003-2005 by CERN
00003  */
00004 
00005 /*
00006  * @(#)$RCSfile: gfal.h,v $ $Revision: 1.1.1.1 $ $Date: 2006/09/06 08:54:53 $ CERN Jean-Philippe Baud
00007  */
00008 
00009 #ifndef _GFAL_H
00010 #define _GFAL_H
00011 
00012 #include "gfal_constants.h"
00013 
00014 struct dir_info {
00015         DIR     *dir;
00016         struct proto_ops *pops;
00017 };
00018 
00019 static ssize_t dummysetfilchg ();
00020 static int fnotsup ();
00021 
00022 struct proto_ops {
00023         char    *proto_name;
00024         int     libok;  /* -1 (library is not accessible), 0 (library not checked yet), 1 (library ok) */
00025         int     (*checkprotolib)(struct proto_ops *);
00026         int     (*geterror)();
00027         int     (*maperror)(struct proto_ops *, int);
00028         int     (*access)(const char *, int);
00029         int     (*chmod)(const char *, mode_t);
00030         int     (*close)(int);
00031         int     (*closedir)(DIR *);
00032         off_t   (*lseek)(int, off_t, int);
00033         off64_t (*lseek64)(int, off64_t, int);
00034         int     (*lstat)(const char *, struct stat *);
00035         int     (*lstat64)(const char *, struct stat64 *);
00036         int     (*mkdir)(const char *, mode_t);
00037         int     (*open)(const char *, int, ...);
00038         DIR     *(*opendir)(const char *);
00039         ssize_t (*read)(int, void *, size_t);
00040         struct dirent   *(*readdir)(DIR *);
00041         struct dirent64 *(*readdir64)(DIR *);
00042         int     (*rename)(const char *, const char *);
00043         int     (*rmdir)(const char *);
00044         ssize_t (*setfilchg)(int, const void *, size_t);
00045         int     (*stat)(const char *, struct stat *);
00046         int     (*stat64)(const char *, struct stat64 *);
00047         int     (*unlink)(const char *);
00048         ssize_t (*write)(int, const void *, size_t);
00049 };
00050 
00051 struct xfer_info {
00052         int     fd;
00053         int     oflag;
00054         char    *surl;
00055         int     reqid;
00056         int     fileid;
00057         char    *token;
00058         struct proto_ops *pops;
00059 };
00060 
00061 static struct dir_info *alloc_di (DIR *);
00062 static struct xfer_info *alloc_xi (int);
00063 static struct dir_info *find_di (DIR *);
00064 static struct xfer_info *find_xi (int);
00065 static int free_di (struct dir_info *);
00066 static int free_xi (int);
00067 static int mdtomd32 (struct stat64 *, struct stat *);
00068 struct proto_ops *find_pops (const char *);
00069 char **get_sup_proto ();
00070 int mapposixerror (struct proto_ops *, int);
00071 #endif

Generated on Fri Sep 8 20:20:47 2006 for GFAL by  doxygen 1.4.6