CERN org.glite.Gfal  2.0.1
/builddir/build/BUILD/gfal2-2.0.0/src/common/rfio/gfal_rfio_plugin_layer.h
00001 /*
00002  * Copyright (c) Members of the EGEE Collaboration. 2004.
00003  * See http://www.eu-egee.org/partners/ for details on the copyright holders.
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  * 
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  * 
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 
00028 #include <glib.h>
00029 #include <dirent.h>
00030 #include <stdio.h>
00031 #include <unistd.h>
00032 
00033 extern  struct rfio_proto_ops * (*gfal_rfio_internal_loader)(GError** err);
00034 
00035 struct rfio_proto_ops {
00036         int     (*geterror)();
00037         int     (*access)(const char *, int);
00038         int     (*chmod)(const char *, mode_t);
00039         int     (*close)(int);
00040         int     (*closedir)(DIR *);
00041         char* (*serror_r)(char* buff, size_t buff_size);
00042         off_t   (*lseek)(int, off_t, int);
00043 #if ! defined(linux) || defined(_LARGEFILE64_SOURCE)
00044         off64_t (*lseek64)(int, off64_t, int);
00045 #endif
00046         int     (*lstat)(const char *, struct stat *);
00047 #if ! defined(linux) || defined(_LARGEFILE64_SOURCE)
00048         int     (*lstat64)(const char *, struct stat64 *);
00049 #endif
00050         int     (*mkdir)(const char *, mode_t);
00051         int     (*open)(const char *, int, ...);
00052         DIR     *(*opendir)(const char *);
00053         ssize_t (*read)(int, void *, size_t);
00054         struct dirent   *(*readdir)(DIR *);
00055 #if ! defined(linux) || defined(_LARGEFILE64_SOURCE)
00056         struct dirent64 *(*readdir64)(DIR *);
00057 #endif
00058         int     (*rename)(const char *, const char *);
00059         int     (*rmdir)(const char *);
00060         ssize_t (*setfilchg)(int, const void *, size_t);
00061         int     (*stat)(const char *, struct stat *);
00062 #if ! defined(linux) || defined(_LARGEFILE64_SOURCE)
00063         int     (*stat64)(const char *, struct stat64 *);
00064 #endif
00065         int     (*unlink)(const char *);
00066         ssize_t (*write)(int, const void *, size_t);
00067 };
00068