00001 #pragma once
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00029 #include <stdarg.h>
00030 #include <glib.h>
00031 #include <errno.h>
00032 #include <string.h>
00033 #include <dirent.h>
00034 #include <sys/stat.h>
00035
00036 #include <common/gfal_prototypes.h>
00037 #include <common/gfal_types.h>
00038 #include <common/gfal_common_plugin_interface.h>
00039
00040 #include <common/gfal_common_parameter.h>
00041
00042
00043 #ifdef __cplusplus
00044 extern "C"
00045 {
00046 #endif // __cplusplus
00047
00048 typedef struct _plugin_pointer_handle{
00049 void* dlhandle;
00050 void* plugin_data;
00051 char plugin_name[GFAL_URL_MAX_LEN];
00052 char plugin_lib[GFAL_URL_MAX_LEN];
00053 } *plugin_pointer_handle;
00054
00055 gfal_plugin_interface* gfal_plugin_interface_new();
00056
00057
00058 extern char* gfal_get_cat_type(GError**);
00059
00065 plugin_pointer_handle gfal_plugins_list_handler(gfal_handle, GError** err);
00066
00067 inline int gfal_plugins_instance(gfal_handle, GError** err);
00068 char** gfal_plugins_get_list(gfal_handle, GError** err);
00069 int gfal_plugins_delete(gfal_handle, GError** err);
00070
00071
00072
00073
00074 int gfal_plugins_accessG(gfal_handle handle, const char* path, int mode, GError** err);
00075 int gfal_plugin_rmdirG(gfal_handle handle, const char* path, GError** err);
00076 ssize_t gfal_plugin_readlinkG(gfal_handle handle, const char* path, char* buff, size_t buffsiz, GError** err);
00077
00078
00079
00080
00081 int gfal_plugin_chmodG(gfal_handle handle, const char* path, mode_t mode, GError** err);
00082 int gfal_plugin_statG(gfal_handle handle,const char* path, struct stat* st, GError** err);
00083 int gfal_plugin_renameG(gfal_handle handle, const char* oldpath, const char* newpath, GError** err);
00084 int gfal_plugin_symlinkG(gfal_handle handle, const char* oldpath, const char* newpath, GError** err);
00085 int gfal_plugin_lstatG(gfal_handle handle,const char* path, struct stat* st, GError** err);
00086 int gfal_plugin_mkdirp(gfal_handle handle, const char* path, mode_t mode, gboolean pflag, GError** err);
00087
00088
00089 gfal_file_handle gfal_plugin_opendirG(gfal_handle handle, const char* name, GError** err);
00090 int gfal_plugin_closedirG(gfal_handle handle, gfal_file_handle fh, GError** err);
00091 struct dirent* gfal_plugin_readdirG(gfal_handle handle, gfal_file_handle fh, GError** err);
00092
00093
00094 gfal_file_handle gfal_plugin_openG(gfal_handle handle, const char * path, int flag, mode_t mode, GError ** err);
00095 int gfal_plugin_closeG(gfal_handle handle, gfal_file_handle fh, GError** err);
00096 int gfal_plugin_writeG(gfal_handle handle, gfal_file_handle fh, void* buff, size_t s_buff, GError** err);
00097 int gfal_plugin_lseekG(gfal_handle handle, gfal_file_handle fh, off_t offset, int whence, GError** err);
00098 int gfal_plugin_readG(gfal_handle handle, gfal_file_handle fh, void* buff, size_t s_buff, GError** err);
00099
00100 ssize_t gfal_plugin_preadG(gfal_handle handle, gfal_file_handle fh, void* buff, size_t s_buff, off_t offset, GError** err);
00101
00102
00103 int gfal_plugin_unlinkG(gfal_handle handle, const char* path, GError** err);
00104
00105
00106 ssize_t gfal_plugin_getxattrG(gfal_handle, const char*, const char*, void* buff, size_t s_buff, GError** err);
00107 ssize_t gfal_plugin_listxattrG(gfal_handle, const char*, char* list, size_t s_list, GError** err);
00108 int gfal_plugin_setxattrG(gfal_handle, const char*, const char*, const void*, size_t, int, GError**);
00109
00110
00111
00112
00113
00114
00115 int gfal_plugins_has_parameter(gfal_handle handle, const char* nmespace, const char* key, GError** err);
00116
00117 int gfal_plugins_notify_all(gfal_handle handle, const char* nmespace, const char* key, GError** err);
00118
00119 #ifdef __cplusplus
00120 }
00121 #endif // __cplusplus