00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef GLITE_DATA_IO_CLIENT_IOCLIENT_H_
00015 #define GLITE_DATA_IO_CLIENT_IOCLIENT_H_
00016
00017 #include "glite/data/io/client/iotypes.h"
00018 #include <fcntl.h>
00019
00020
00021 #ifdef __cplusplus
00022 extern "C" {
00023 #endif //__cplusplus
00024
00025
00026 #define GLITE_IO_SD_TYPE "org.glite.gliteIO"
00027
00028
00029 #define GLITE_IO_SD_ENV "GLITE_SD_GLITEIO_TYPE"
00030
00031
00032 #define GLITE_IO_URL_PREFIX "gliteio://"
00033
00034
00035 #define TOOL_USER_VERBOSE "__GLITE_IO_VERBOSE"
00036
00042 bool is_gliteio_url(const char *string);
00043
00050 int glite_io_initialize(const char *endpoint, const bool encryptdata);
00051
00055 void glite_io_finalize();
00056
00077 glite_handle glite_open(const char * pathname, glite_int32 flags, glite_int32 mode, glite_int64 size, glite_result* result);
00078
00095 glite_handle glite_creat(const char * pathname, glite_int32 mode, glite_int64 size, glite_result* result);
00096
00105 glite_int32 glite_read(glite_handle fh, void * buf, glite_int32 count);
00106
00116 glite_int32 glite_write(glite_handle fh, const void * buf, glite_int32 count);
00117
00131 glite_int64 glite_lseek(glite_handle fh, glite_int64 offset, glite_int32 whence);
00132
00141 glite_int32 glite_fstat(glite_handle fh, struct glite_stat * buf);
00142
00149 glite_int32 glite_close(glite_handle fh);
00150
00165 glite_int32 glite_unlink(const char * pathname);
00166
00176 glite_int32 glite_error(glite_handle fh);
00177
00184 const char * glite_strerror(glite_result error);
00185
00186 #ifdef __cplusplus
00187 }
00188 #endif //__cplusplus
00189
00190 #endif //GLITE_DATA_IO_CLIENT_IOCLIENT_H_