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

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2003-2005 by CERN
00003  */
00004 
00005 /*
00006  * @(#)$RCSfile: gfal_api.h,v $ $Revision: 1.1.1.1 $ $Date: 2006/09/06 08:54:53 $ CERN Jean-Philippe Baud
00007  */
00008 
00009 #ifndef _GFAL_API_H
00010 #define _GFAL_API_H
00011 #include <sys/types.h>
00012 #include <dirent.h>
00013 #include <sys/stat.h>
00014 
00015 #ifndef GFAL_LONG64_FORMAT
00016 #if defined(__ia64__) || defined(__x86_64)
00017 #define GFAL_LONG64_FORMAT "%ld"
00018 #elif defined(_WIN32)
00019 #define GFAL_LONG64_FORMAT "%I64d"
00020 #else
00021 #define GFAL_LONG64_FORMAT "%lld"
00022 #endif
00023 #endif
00024 #ifndef GFAL_LONG64
00025 #if defined(__ia64__) || defined(__x86_64)
00026 #define GFAL_LONG64 long
00027 #elif defined(_WIN32)
00028 #define GFAL_LONG64 __i64
00029 #else
00030 #define GFAL_LONG64 long long
00031 #endif
00032 #endif
00033 
00034 struct srm_filestatus {
00035         char    *surl;
00036         char    *turl;
00037         int     fileid;
00038         int     status;
00039 };
00040 
00041                 /* User-callable entry points */
00042 
00043 int gfal_access (const char *, int);
00044 int gfal_chmod (const char *, mode_t);
00045 int gfal_close (int);
00046 int gfal_closedir (DIR *);
00047 int gfal_creat (const char *, mode_t);
00048 int gfal_creat64 (const char *, mode_t);
00049 int gfal_errmsg (char *, int, const char *);
00050 off_t gfal_lseek (int, off_t, int);
00051 int gfal_lstat (const char *, struct stat *);
00052 int gfal_mkdir (const char *, mode_t);
00053 int gfal_open (const char *, int, mode_t);
00054 int gfal_open64 (const char *, int, mode_t);
00055 DIR *gfal_opendir (const char *);
00056 ssize_t gfal_read (int, void *, size_t);
00057 struct dirent *gfal_readdir (DIR *);
00058 int gfal_rename (const char *, const char *);
00059 int gfal_rmdir (const char *);
00060 ssize_t gfal_setfilchg (int, const void *, size_t);
00061 int gfal_stat (const char *, struct stat *);
00062 int gfal_unlink (const char *);
00063 ssize_t gfal_write (int, const void *, size_t);
00064 #if ! defined(linux) || defined(_LARGEFILE64_SOURCE)
00065 off64_t gfal_lseek64 (int, off64_t, int);
00066 int gfal_lstat64 (const char *, struct stat64 *);
00067 #if defined(linux) || defined(sun)
00068 struct dirent64 *gfal_readdir64 (DIR *);
00069 #endif
00070 int gfal_stat64 (const char *, struct stat64 *);
00071 #else
00072 #if defined(__USE_FILE_OFFSET64)
00073 off_t gfal_lseek64 (int, off_t, int);
00074 int gfal_lstat64 (const char *, struct stat *);
00075 struct dirent *gfal_readdir64 (DIR *);
00076 int gfal_stat64 (const char *, struct stat *);
00077 #endif
00078 #endif
00079 
00080                   /* catalog operation entry points */
00081 int create_alias (const char *, const char *, GFAL_LONG64, char *, int);
00082 char *getbestfile(char **, int size, char *, int);
00083 char *get_catalog_endpoint(char *, int);
00084 int getfilesizeg(const char *, GFAL_LONG64 *, char *, int);
00085 int guid_exists (const char *, char *, int);
00086 char *guidforpfn (const char *, char *, int);
00087 char *guidfromlfn (const char *, char *, int);
00088 char **lfnsforguid (const char *, char *, int);
00089 int register_alias (const char *, const char *, char *, int);
00090 int register_pfn (const char *, const char *, char *, int);
00091 int unregister_alias (const char *, const char *, char *, int);
00092 int unregister_pfn (const char *, const char *, char *, int);
00093 char *surlfromguid (const char *, char *, int);
00094 char **surlsfromguid (const char *, char *, int);
00095 
00096 /* legacy method for EDG Catalog where size is set on pfn, not guid */
00097 int setfilesize (const char *, GFAL_LONG64, char *, int);
00098 
00099                 /* storage operation entry points */
00100 int deletesurl (const char *, char *, int, int);
00101 char *get_default_se(char *, char *, int);
00102 #if ! defined(linux) || defined(_LARGEFILE64_SOURCE)
00103 int getfilemd (const char *, struct stat64 *, char *, int, int);
00104 #endif
00105 int set_xfer_done (const char *, int, int, char *, int, char *, int, int);
00106 int set_xfer_running (const char *, int, int, char *, char *, int, int);
00107 char *turlfromsurl (const char *, char **, int, int *, int *, char **, char *, int, int);
00108 char *turlfromsurlx (const char *, GFAL_LONG64, char **, int, int *, int *, char **, char *, int, int);
00109 
00110                 /* Internal functions */
00111 int deletepfn (const char *, const char *, char *, int);
00112 int get_bdii (char *, int, int *, char *, int);
00113 int get_cat_type(char **);
00114 int get_ce_ap (const char *, char **);
00115 int get_ce_apx (const char *, char **, char *, int);
00116 int get_lfc_endpoint (char **, char *, int);
00117 int get_rls_endpoints (char **, char **);
00118 int get_rls_endpointsx (char **, char **, char *, int);
00119 int get_sa_root (const char *, const char *, char **);
00120 int get_sa_rootx (const char *, const char *, char **, char *, int);
00121 int get_se_endpoint (const char *, char **);
00122 int get_se_endpointx (const char *, char **, char *, int);
00123 int get_sa_path (const char *, const char *, char **, char **, char *, int);
00124 int get_se_port (const char *, int *);
00125 int get_se_portx (const char *, int *, char *, int);
00126 int get_se_type (const char *, char **);
00127 int get_se_typex (const char *, char **, char *, int);
00128 int get_seap_info (const char *, char ***, int **);
00129 int get_seap_infox (const char *, char ***, int **, char *, int);
00130 #if ! defined(linux) || defined(_LARGEFILE64_SOURCE)
00131 int se_getfilemd (const char *, struct stat64 *, char *, int, int);
00132 int srm_getfilemd (const char *, struct stat64 *, char *, int, int);
00133 #endif
00134 int lfc_getfilesizeg(const char *, GFAL_LONG64 *, char *, int);
00135 int lfc_create_alias (const char *, const char *, GFAL_LONG64, char *, int);
00136 int lfc_deletepfn (const char *, const char *, char *, int);
00137 int lfc_deletesurl (const char *, char *, int);
00138 char *lfc_get_catalog_endpoint(char *, int);
00139 char *lfc_guidforpfn (const char *, char *, int);
00140 char *lfc_guidfromlfn (const char *, char *, int);
00141 int lfc_guid_exists (const char *, char *, int);
00142 char **lfc_lfnsforguid (const char *, char *, int);
00143 int lfc_mkdirp (const char*, mode_t, char *, int);
00144 int lfc_register_alias (const char *, const char *, char *, int);
00145 int lfc_register_pfn (const char *, const char *, char *, int);
00146 int lfc_replica_exists(const char*, char*, int);
00147 char *lfc_surlfromguid (const char *, char *, int);
00148 char **lfc_surlsfromguid (const char *, char *, int);
00149 int lfc_unregister_alias (const char *, const char *, char *, int);
00150 int lfc_unregister_pfn (const char *, const char *, char *, int);
00151 int lrc_deletepfn (const char *, const char *, char *, int);
00152 int lrc_deletesurl (const char *, char *, int);
00153 char *lrc_get_catalog_endpoint(char *, int);
00154 char *lrc_guidforpfn (const char *, char *, int);
00155 int lrc_guid_exists (const char *, char *, int);
00156 int lrc_replica_exists(const char* ,char*, int);
00157 int lrc_setfilesize (const char *, GFAL_LONG64, char *, int);
00158 char *lrc_surlfromguid (const char *, char *, int);
00159 char **lrc_surlsfromguid (const char *, char *, int);
00160 int parsesurl (const char *, char *, int, char **, char *, int);
00161 int parseturl (const char *, char *, int, char *, int, char **, char*, int);
00162 int replica_exists(const char*, char*, int);
00163 char *rmc_guidfromlfn (const char *, char *, int);
00164 char **rmc_lfnsforguid (const char *, char *, int);
00165 int rmc_register_alias (const char *, const char *, char *, int);
00166 int rmc_register_pfn (const char *, const char *, char *, int);
00167 int rmc_unregister_alias (const char *, const char *, char *, int);
00168 int rmc_unregister_pfn (const char *, const char *, char *, int);
00169 int se_deletesurl (const char *, char *, int, int);
00170 int se_set_xfer_done (const char *, int, int, char *, int, char *, int, int);
00171 int se_set_xfer_running (const char *, int, int, char *, char *, int);
00172 char *se_turlfromsurl (const char *, char **, int, int *, int *, char **, char *, int, int);
00173 int setypefromsurl (const char *, char **, char *, int);
00174 int srm_deletesurl (const char *, char *, int, int);
00175 int srm_get (int, char **, int, char **, int *, char **, struct srm_filestatus **, int);
00176 int srm_getx (int, char **, int, char **, int *, char **, struct srm_filestatus **, char *, int, int);
00177 int srm_getstatus (int, char **, int, char *, struct srm_filestatus **, int );
00178 int srm_getstatusx (int, char **, int, char *, struct srm_filestatus **, char *, int, int);
00179 int srm_set_xfer_done (const char *, int, int, char *, int, char *, int, int);
00180 int srm_set_xfer_running (const char *, int, int, char *, char *, int, int);
00181 char *srm_turlfromsurl (const char *, char **, int, int *, int *, char **, char *, int, int);
00182 int srm_turlsfromsurls (int, const char **, GFAL_LONG64 *, char **, int, int *, int **, char **, char ***, char *, int, int);
00183 char *turlfromsfn (const char *, char **, char *, int);
00184 #endif

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