#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dlfcn.h>
#include <unistd.h>
#include <sys/types.h>
#include <fcntl.h>
#include "gfal_types.h"
#include "gfal_common_plugin.h"
#include "gfal_constants.h"
#include "gfal_common_errverbose.h"
#include "gfal_common_filedescriptor.h"
Functions | |
gfal_plugin_interface * | gfal_plugin_interface_new () |
char ** | gfal_plugins_get_list (gfal_handle handle, GError **err) |
gfal_plugin_interface * | gfal_search_plugin_with_name (gfal_handle handle, const char *name, GError **err) |
plugin_pointer_handle | gfal_plugins_list_handler (gfal_handle handle, GError **err) |
plugins walker provide a list of plugin handlers, each plugin handler is a reference to an usable plugin | |
char ** | gfal_list_directory_plugins (const char *dir, GError **err) |
char ** | gfal_localize_plugins (GError **err) |
int | gfal_modules_resolve (gfal_handle handle, GError **err) |
int | gfal_plugins_instance (gfal_handle handle, GError **err) |
int | gfal_plugins_operation_executor (gfal_handle handle, gboolean(*checker)(gfal_plugin_interface *, GError **), int(*executor)(gfal_plugin_interface *, GError **), GError **err) |
int | gfal_plugins_accessG (gfal_handle handle, const char *path, int mode, GError **err) |
int | gfal_plugin_statG (gfal_handle handle, const char *path, struct stat *st, GError **err) |
ssize_t | gfal_plugin_readlinkG (gfal_handle handle, const char *path, char *buff, size_t buffsiz, GError **err) |
int | gfal_plugin_lstatG (gfal_handle handle, const char *path, struct stat *st, GError **err) |
int | gfal_plugins_delete (gfal_handle handle, GError **err) |
int | gfal_plugin_chmodG (gfal_handle handle, const char *path, mode_t mode, GError **err) |
int | gfal_plugin_renameG (gfal_handle handle, const char *oldpath, const char *newpath, GError **err) |
int | gfal_plugin_symlinkG (gfal_handle handle, const char *oldpath, const char *newpath, GError **err) |
int | gfal_plugin_mkdirp (gfal_handle handle, const char *path, mode_t mode, gboolean pflag, GError **err) |
int | gfal_plugin_rmdirG (gfal_handle handle, const char *path, GError **err) |
gfal_file_handle | gfal_plugin_opendirG (gfal_handle handle, const char *name, GError **err) |
int | gfal_plugin_closedirG (gfal_handle handle, gfal_file_handle fh, GError **err) |
gfal_file_handle | gfal_plugin_openG (gfal_handle handle, const char *path, int flag, mode_t mode, GError **err) |
int | gfal_plugin_closeG (gfal_handle handle, gfal_file_handle fh, GError **err) |
dirent * | gfal_plugin_readdirG (gfal_handle handle, gfal_file_handle fh, GError **err) |
ssize_t | gfal_plugin_getxattrG (gfal_handle handle, const char *path, const char *name, void *buff, size_t s_buff, GError **err) |
implementation in the plugin of the get extended attribute function | |
ssize_t | gfal_plugin_listxattrG (gfal_handle handle, const char *path, char *list, size_t s_list, GError **err) |
int | gfal_plugin_readG (gfal_handle handle, gfal_file_handle fh, void *buff, size_t s_buff, GError **err) |
ssize_t | gfal_plugin_simulate_preadG (gfal_handle handle, gfal_plugin_interface *if_cata, gfal_file_handle fh, void *buff, size_t s_buff, off_t offset, GError **err) |
ssize_t | gfal_plugin_preadG (gfal_handle handle, gfal_file_handle fh, void *buff, size_t s_buff, off_t offset, GError **err) |
ssize_t | gfal_plugin_simulate_pwriteG (gfal_handle handle, gfal_plugin_interface *if_cata, gfal_file_handle fh, void *buff, size_t s_buff, off_t offset, GError **err) |
ssize_t | gfal_plugin_pwriteG (gfal_handle handle, gfal_file_handle fh, void *buff, size_t s_buff, off_t offset, GError **err) |
int | gfal_plugin_lseekG (gfal_handle handle, gfal_file_handle fh, off_t offset, int whence, GError **err) |
int | gfal_plugin_writeG (gfal_handle handle, gfal_file_handle fh, void *buff, size_t s_buff, GError **err) |
char * | get_default_cat () |
char * | gfal_get_cat_type (GError **err) |
int | gfal_plugin_unlinkG (gfal_handle handle, const char *path, GError **err) |
int | gfal_plugin_setxattrG (gfal_handle handle, const char *path, const char *name, const void *value, size_t size, int flags, GError **err) |
int | gfal_plugins_has_parameter (gfal_handle handle, const char *namespace, const char *key, GError **err) |
int | gfal_plugins_notify_all (gfal_handle handle, const char *namespace, const char *key, GError **err) |
char* get_default_cat | ( | ) |
return the plugin type configured at compilation time
char** gfal_list_directory_plugins | ( | const char * | dir, | |
GError ** | err | |||
) |
Provide a list of the gfal 2.0 plugins path
err | : error handle if found |
char** gfal_localize_plugins | ( | GError ** | err | ) |
Provide a list of the gfal 2.0 plugins path
err | : error handle if found |
int gfal_modules_resolve | ( | gfal_handle | handle, | |
GError ** | err | |||
) |
search and load the gfal 2.0 plugins
int gfal_plugin_chmodG | ( | gfal_handle | handle, | |
const char * | path, | |||
mode_t | mode, | |||
GError ** | err | |||
) |
Execute the chmod function on the first compatible plugin ( checked with check_url func )
int gfal_plugin_closedirG | ( | gfal_handle | handle, | |
gfal_file_handle | fh, | |||
GError ** | err | |||
) |
close the given dir handle in the proper plugin
int gfal_plugin_closeG | ( | gfal_handle | handle, | |
gfal_file_handle | fh, | |||
GError ** | err | |||
) |
close the given file handle in the proper plugin
gfal_plugin_interface* gfal_plugin_interface_new | ( | ) |
function to use in order to create a new plugin interface permit to keep the ABI compatibility must be use in ALL the plugin's "gfal_plugin_init" functions
int gfal_plugin_lseekG | ( | gfal_handle | handle, | |
gfal_file_handle | fh, | |||
off_t | offset, | |||
int | whence, | |||
GError ** | err | |||
) |
do a lseek operation on the plugin
int gfal_plugin_lstatG | ( | gfal_handle | handle, | |
const char * | path, | |||
struct stat * | st, | |||
GError ** | err | |||
) |
Execute a lstat function in the lfc
int gfal_plugin_mkdirp | ( | gfal_handle | handle, | |
const char * | path, | |||
mode_t | mode, | |||
gboolean | pflag, | |||
GError ** | err | |||
) |
Execute a mkdir function on the first compatible plugin ( checked with check url func )
handle | handle of the current context | |
path | path to create | |
mode | right of the file created | |
pflag | if TRUE, execute the request recursively if necessary else work as the common mkdir system call | |
GError | error report system |
gfal_file_handle gfal_plugin_opendirG | ( | gfal_handle | handle, | |
const char * | name, | |||
GError ** | err | |||
) |
Execute a opendir function on the first compatible plugin ( checked with check url func )
handle | handle of the current context | |
path | path to open | |
GError | error report system |
gfal_file_handle gfal_plugin_openG | ( | gfal_handle | handle, | |
const char * | path, | |||
int | flag, | |||
mode_t | mode, | |||
GError ** | err | |||
) |
open the file specified by path on the proper plugin with the specified flag and mode
ssize_t gfal_plugin_preadG | ( | gfal_handle | handle, | |
gfal_file_handle | fh, | |||
void * | buff, | |||
size_t | s_buff, | |||
off_t | offset, | |||
GError ** | err | |||
) |
do a pread operation on the plugin, read s_buff chars on the fd device after the offset
ssize_t gfal_plugin_pwriteG | ( | gfal_handle | handle, | |
gfal_file_handle | fh, | |||
void * | buff, | |||
size_t | s_buff, | |||
off_t | offset, | |||
GError ** | err | |||
) |
do a pread operation on the plugin, read s_buff chars on the fd device after the offset
struct dirent* gfal_plugin_readdirG | ( | gfal_handle | handle, | |
gfal_file_handle | fh, | |||
GError ** | err | |||
) |
execute a readdir for the given file handle on the appropriate plugin
int gfal_plugin_readG | ( | gfal_handle | handle, | |
gfal_file_handle | fh, | |||
void * | buff, | |||
size_t | s_buff, | |||
GError ** | err | |||
) |
do a read operation on the plugin, read s_buff chars on the fd device
ssize_t gfal_plugin_readlinkG | ( | gfal_handle | handle, | |
const char * | path, | |||
char * | buff, | |||
size_t | buffsiz, | |||
GError ** | err | |||
) |
Execute a readlink function
int gfal_plugin_renameG | ( | gfal_handle | handle, | |
const char * | oldpath, | |||
const char * | newpath, | |||
GError ** | err | |||
) |
Execute the rename function on the first compatible plugin ( checked with check_url func )
int gfal_plugin_rmdirG | ( | gfal_handle | handle, | |
const char * | path, | |||
GError ** | err | |||
) |
Execute a rmdir function on the first compatible plugin ( checked with check url func )
handle | handle of the current context | |
path | path to delete | |
GError | error report system |
int gfal_plugin_setxattrG | ( | gfal_handle | handle, | |
const char * | path, | |||
const char * | name, | |||
const void * | value, | |||
size_t | size, | |||
int | flags, | |||
GError ** | err | |||
) |
setxattr for the plugins
ssize_t gfal_plugin_simulate_preadG | ( | gfal_handle | handle, | |
gfal_plugin_interface * | if_cata, | |||
gfal_file_handle | fh, | |||
void * | buff, | |||
size_t | s_buff, | |||
off_t | offset, | |||
GError ** | err | |||
) | [inline] |
Execute an atomic thread-safe read on a file descriptor with a given offset simulate the feature of pread for plugins with no support of it
ssize_t gfal_plugin_simulate_pwriteG | ( | gfal_handle | handle, | |
gfal_plugin_interface * | if_cata, | |||
gfal_file_handle | fh, | |||
void * | buff, | |||
size_t | s_buff, | |||
off_t | offset, | |||
GError ** | err | |||
) | [inline] |
Execute an atomic thread-safe write on a file descriptor with a given offset simulate the feature of pwrite for plugins with no support of it
int gfal_plugin_statG | ( | gfal_handle | handle, | |
const char * | path, | |||
struct stat * | st, | |||
GError ** | err | |||
) |
Execute a stat function on the lfc plugin
int gfal_plugin_symlinkG | ( | gfal_handle | handle, | |
const char * | oldpath, | |||
const char * | newpath, | |||
GError ** | err | |||
) |
Execute the symlink function on the first compatible plugin
int gfal_plugin_unlinkG | ( | gfal_handle | handle, | |
const char * | path, | |||
GError ** | err | |||
) |
apply unlink on the appropriate plugin
int gfal_plugin_writeG | ( | gfal_handle | handle, | |
gfal_file_handle | fh, | |||
void * | buff, | |||
size_t | s_buff, | |||
GError ** | err | |||
) |
do a write operation on the plugin, write s_buff chars on the fd device
int gfal_plugins_accessG | ( | gfal_handle | handle, | |
const char * | path, | |||
int | mode, | |||
GError ** | err | |||
) |
Execute an access function on the first plugin compatible in the plugin list return the result of the first valid plugin for a given URL
int gfal_plugins_delete | ( | gfal_handle | handle, | |
GError ** | err | |||
) |
Delete all instance of plugins
char** gfal_plugins_get_list | ( | gfal_handle | handle, | |
GError ** | err | |||
) |
external function to get the list of the plugins loaded
int gfal_plugins_has_parameter | ( | gfal_handle | handle, | |
const char * | namespace, | |||
const char * | key, | |||
GError ** | err | |||
) |
Check if a parameter key is used by a plugin or not
int gfal_plugins_instance | ( | gfal_handle | handle, | |
GError ** | err | |||
) | [inline] |
Instance all plugins for use if it's not the case return the number of plugin available
plugin_pointer_handle gfal_plugins_list_handler | ( | gfal_handle | , | |
GError ** | err | |||
) |
plugins walker provide a list of plugin handlers, each plugin handler is a reference to an usable plugin
int gfal_plugins_notify_all | ( | gfal_handle | handle, | |
const char * | namespace, | |||
const char * | key, | |||
GError ** | err | |||
) |
Notify all the plugins of a change on a given parameter plugins must ignore and return 0 if this key is not used, or if it is a correct change they must return -1 and GError if an error occures with the new value
gfal_plugin_interface* gfal_search_plugin_with_name | ( | gfal_handle | handle, | |
const char * | name, | |||
GError ** | err | |||
) |
external function to return a gfal_plugin_interface from a given plugin name