CERN org.glite.Gfal  2.0.1
/builddir/build/BUILD/gfal2-2.0.0/src/common/dcap/gfal_dcap_plugin_layer.h
Go to the documentation of this file.
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 <common/gfal_common_internal.h>
00030 #include <common/gfal_common_errverbose.h>
00031 #include <common/gfal_common_plugin.h>
00032 #include <common/gfal_types.h>
00033 
00034 #include <dcap.h>
00035 
00036 struct dcap_proto_ops {
00037         int*    (*geterror)();
00038         const char*(*strerror)(int);
00039         int     (*access)(const char *, int);
00040         int     (*chmod)(const char *, mode_t);
00041         int     (*close)(int);
00042         int     (*closedir)(DIR *);
00043         void (*debug_level)(unsigned int);
00044         void (*active_mode)();
00045         off_t   (*lseek)(int, off_t, int);
00046 #if ! defined(linux) || defined(_LARGEFILE64_SOURCE)
00047         off64_t (*lseek64)(int, off64_t, int);
00048 #endif
00049         int     (*lstat)(const char *, struct stat *);
00050 #if ! defined(linux) || defined(_LARGEFILE64_SOURCE)
00051         int     (*lstat64)(const char *, struct stat64 *);
00052 #endif
00053         int     (*mkdir)(const char *, mode_t);
00054         int     (*open)(const char *, int, ...);
00055         DIR     *(*opendir)(const char *);
00056         ssize_t (*read)(int, void *, size_t);
00057         
00058         ssize_t (*pread)(int fildes, void *buf, size_t nbytes, off_t offset);
00059         ssize_t (*pwrite)(int fildes, const void *buf, size_t nbytes, off_t offset);
00060         struct dirent   *(*readdir)(DIR *);
00061 #if ! defined(linux) || defined(_LARGEFILE64_SOURCE)
00062         struct dirent64 *(*readdir64)(DIR *);
00063 #endif
00064         int     (*rename)(const char *, const char *);
00065         int     (*rmdir)(const char *);
00066         ssize_t (*setfilchg)(int, const void *, size_t);
00067         int     (*stat)(const char *, struct stat *);
00068 #if ! defined(linux) || defined(_LARGEFILE64_SOURCE)
00069         int     (*stat64)(const char *, struct stat64 *);
00070 #endif
00071         int     (*unlink)(const char *);
00072         ssize_t (*write)(int, const void *, size_t);
00073 };
00074 
00075 
00076 extern struct dcap_proto_ops * (*gfal_dcap_internal_loader)(GError** err);
00077