#include <gfal_common_plugin_interface.h>
Data Fields | |
plugin_handle | plugin_data |
int | priority |
const char *(* | getName )() |
void(* | plugin_delete )(plugin_handle plugin_data) |
gboolean(* | check_plugin_url )(plugin_handle plugin_data, const char *url, plugin_mode operation, GError **err) |
int(* | accessG )(plugin_handle plugin_data, const char *url, int mode, GError **err) |
int(* | chmodG )(plugin_handle plugin_data, const char *url, mode_t mode, GError **err) |
int(* | renameG )(plugin_handle plugin_data, const char *oldurl, const char *urlnew, GError **err) |
int(* | symlinkG )(plugin_handle plugin_data, const char *oldurl, const char *newold, GError **err) |
int(* | statG )(plugin_handle plugin_data, const char *url, struct stat *buf, GError **err) |
int(* | lstatG )(plugin_handle plugin_data, const char *url, struct stat *buf, GError **err) |
ssize_t(* | readlinkG )(plugin_handle plugin_data, const char *url, char *buff, size_t buffsiz, GError **) |
gfal_file_handle(* | opendirG )(plugin_handle plugin_data, const char *url, GError **err) |
int(* | closedirG )(plugin_handle plugin_data, gfal_file_handle dir_desc, GError **err) |
struct dirent *(* | readdirG )(plugin_handle plugin_data, gfal_file_handle dir_desc, GError **err) |
int(* | mkdirpG )(plugin_handle plugin_data, const char *url, mode_t mode, gboolean rec_flag, GError **err) |
int(* | rmdirG )(plugin_handle plugin_data, const char *url, GError **err) |
gfal_file_handle(* | openG )(plugin_handle plugin_data, const char *url, int flag, mode_t mode, GError **) |
ssize_t(* | readG )(plugin_handle, gfal_file_handle fd, void *buff, size_t count, GError **) |
ssize_t(* | writeG )(plugin_handle, gfal_file_handle fd, const void *buff, size_t count, GError **) |
int(* | closeG )(plugin_handle, gfal_file_handle fd, GError **) |
off_t(* | lseekG )(plugin_handle, gfal_file_handle fd, off_t offset, int whence, GError **err) |
ssize_t(* | preadG )(plugin_handle, gfal_file_handle fd, void *buff, size_t count, off_t offset, GError **) |
ssize_t(* | pwriteG )(plugin_handle, gfal_file_handle fd, const void *buff, size_t count, off_t offset, GError **) |
int(* | unlinkG )(plugin_handle plugin_data, const char *url, GError **err) |
ssize_t(* | getxattrG )(plugin_handle plugin_data, const char *url, const char *key, void *buff, size_t s_buff, GError **err) |
ssize_t(* | listxattrG )(plugin_handle plugin_data, const char *url, char *list, size_t s_list, GError **err) |
int(* | setxattrG )(plugin_handle plugin_data, const char *url, const char *key, const void *buff, size_t s_buff, int flags, GError **err) |
int(* | checksum_calcG )(plugin_handle data, const char *url, const char *check_type, char *checksum_buffer, size_t buffer_length, off_t start_offset, size_t data_length, GError **err) |
int(* | check_plugin_url_transfer )(plugin_handle plugin_data, gfal2_context_t, const char *src, const char *dst, gfal_url2_check check) |
int(* | copy_file )(plugin_handle plugin_data, gfal2_context_t context, gfalt_params_t params, const char *src, const char *dst, GError **) |
int(* | bring_online )(plugin_handle plugin_data, const char *url, time_t pintime, time_t timeout, char *token, size_t tsize, int async, GError **err) |
int(* | bring_online_poll )(plugin_handle plugin_data, const char *url, const char *token, GError **err) |
int(* | release_file )(plugin_handle plugin_data, const char *url, const char *token, GError **err) |
struct dirent *(* | readdirppG )(plugin_handle plugin_data, gfal_file_handle dir_desc, struct stat *st, GError **err) |
int(* | bring_online_list )(plugin_handle plugin_data, int nbfiles, const char *const *urls, time_t pintime, time_t timeout, char *token, size_t tsize, int async, GError **err) |
int(* | bring_online_poll_list )(plugin_handle plugin_data, int nbfiles, const char *const *urls, const char *token, GError **err) |
int(* | release_file_list )(plugin_handle plugin_data, int nbfiles, const char *const *urls, const char *token, GError **err) |
int(* | unlink_listG )(plugin_handle plugin_data, int nbfiles, const char *const *uris, GError **errors) |
int(* | abort_files )(plugin_handle handle, int nbfiles, const char *const *uris, const char *token, GError **err) |
int(* | copy_bulk )(plugin_handle plugin_data, gfal2_context_t context, gfalt_params_t params, size_t nbfiles, const char *const *srcs, const char *const *dsts, const char *const *checksums, GError **op_error, GError ***file_errors) |
int(* | copy_enter_hook )(plugin_handle plugin_data, gfal2_context_t context, gfalt_params_t params, GError **error) |
Main interface that MUST be returned the entry point function "gfal_plugin_init" of each GFAL 2.0 plugin. the minimum calls are : getName, plugin_delete, check_plugin_url all the unused function pointers must be set to NULL
int(* _gfal_plugin_interface::abort_files)(plugin_handle handle, int nbfiles, const char *const *uris, const char *token, GError **err) |
OPTIONAL: allows clients to abort selective file requests from the asynchronous requests of any type
plugin_data | : internal plugin context | |
nbfiles | : number of files in the list | |
url | : The urls of the files | |
token,: | The request token | |
err,: | GError error support |
int(* _gfal_plugin_interface::accessG)(plugin_handle plugin_data, const char *url, int mode, GError **err) |
OPTIONAL : gfal_access function support
plugin_data | : internal plugin data | |
url | : URL for access checking | |
mode | : mode to check ( see man 2 access ) | |
err | : Error report, the code field of err should be set to errno value when possible |
int(* _gfal_plugin_interface::bring_online)(plugin_handle plugin_data, const char *url, time_t pintime, time_t timeout, char *token, size_t tsize, int async, GError **err) |
OPTIONAL: Requests to stage a file to the fist layer on a hierarchical SE.
plugin_data | : internal plugin context | |
url | : The url of the file | |
pintime | : Time the file should stay in the cache | |
timeout | : Operation timeout | |
token | Where to put the retrieved token. | |
tsize | The size of the buffer pointed by token. | |
async | If true (!= 0), the call will not block. The caller will need to use bring_online_poll later. | |
err,: | GError error support |
int(* _gfal_plugin_interface::bring_online_list)(plugin_handle plugin_data, int nbfiles, const char *const *urls, time_t pintime, time_t timeout, char *token, size_t tsize, int async, GError **err) |
OPTIONAL: Requests to stage a file to the fist layer on a hierarchical SE.
plugin_data | : internal plugin context | |
nbfiles | : number of files | |
urls | : The urls of the files | |
pintime | : Time the file should stay in the cache | |
timeout | : Operation timeout | |
token | Where to put the retrieved token. | |
tsize | The size of the buffer pointed by token. | |
async | If true (!= 0), the call will not block. The caller will need to use bring_online_poll later. | |
err,: | GError error support |
int(* _gfal_plugin_interface::bring_online_poll)(plugin_handle plugin_data, const char *url, const char *token, GError **err) |
OPTIONAL: Polling the bring_online request (mandatory if bring online is supported)
url | The same URL as was passed to bring_online_async | |
token | The token as returned by bring_online_async |
int(* _gfal_plugin_interface::bring_online_poll_list)(plugin_handle plugin_data, int nbfiles, const char *const *urls, const char *token, GError **err) |
OPTIONAL: Polling the bring_online request (mandatory if bring online is supported)
nbfiles | : number of files | |
urls | The same URLs as were passed to bring_online_async | |
token | The token as returned by bring_online_async |
gboolean(* _gfal_plugin_interface::check_plugin_url)(plugin_handle plugin_data, const char *url, plugin_mode operation, GError **err) |
OPTIONAL: Check the availability of the given operation on this plugin for the given URL
plugin_data | : internal plugin data | |
url | : URL to check for the protocol compatibility | |
operation | : operation to check | |
err | : error handle, should be used ONLY in case of major failure. |
int(* _gfal_plugin_interface::check_plugin_url_transfer)(plugin_handle plugin_data, gfal2_context_t, const char *src, const char *dst, gfal_url2_check check) |
OPTIONAL: if transfer support, should return TRUE if the plugin is able to execute third party transfer from src to dst url
int(* _gfal_plugin_interface::checksum_calcG)(plugin_handle data, const char *url, const char *check_type, char *checksum_buffer, size_t buffer_length, off_t start_offset, size_t data_length, GError **err) |
OPTIONAL : checksum calculation function support ( transfer consistency check, gfal_checksum )
plugin_data | : internal plugin data | |
url | : url of the file | |
check_type | : string of the checksum type ( GFAL_CHKSUM_MD5, GFAL_CHKSUM_SHA1, .. ) | |
start_offset | : offset in the file where the checksum calculation will start ( 0 : from begining ) | |
data_length | : size of data to compute for the checksum after start_offset ( 0 -: full file ) | |
checksum_buffer | : buffer with checksum string as result | |
buffer_length | : maximum buffer length | |
err | : GError error support |
int(* _gfal_plugin_interface::chmodG)(plugin_handle plugin_data, const char *url, mode_t mode, GError **err) |
OPTIONAL : gfal_chmod function support
plugin_data | : internal plugin data | |
url | : URL of the file | |
mode | : mode to set | |
err | : Error report, the code field of err should be set to errno value when possible |
int(* _gfal_plugin_interface::closedirG)(plugin_handle plugin_data, gfal_file_handle dir_desc, GError **err) |
MANDATORY IF OPENDIR : gfal_closedir function support
plugin_data | : internal plugin data | |
dir_desc | : directory descriptor to use | |
err | : Error report, the code field of err should be set to errno value when possible |
int(* _gfal_plugin_interface::closeG)(plugin_handle, gfal_file_handle fd, GError **) |
MANDATORY IF OPEN : gfal_close function support
int(* _gfal_plugin_interface::copy_bulk)(plugin_handle plugin_data, gfal2_context_t context, gfalt_params_t params, size_t nbfiles, const char *const *srcs, const char *const *dsts, const char *const *checksums, GError **op_error, GError ***file_errors) |
OPTIONAL: copy nbfiles files
plugin_data | : internal plugin context | |
context | : gfal2 context | |
params,: | gfal2 transfer parameters | |
nbfiles,: | how many files are to be transferred | |
srcs,: | array of nbfiles sources | |
dsts,: | array of nbfiles destinations | |
checkums,: | array of nbfiles checksums. it can be NULL | |
op_error,: | Operation error | |
file_errors,: | Per file error |
int(* _gfal_plugin_interface::copy_enter_hook)(plugin_handle plugin_data, gfal2_context_t context, gfalt_params_t params, GError **error) |
OPTIONAL: executed by the core before entering a copy, so a plugin can install its own event listeners.
int(* _gfal_plugin_interface::copy_file)(plugin_handle plugin_data, gfal2_context_t context, gfalt_params_t params, const char *src, const char *dst, GError **) |
OPTIONAL: if transfer support, Execute a filecopy operation for the given parameters
plugin_data | : internal plugin context | |
gfal2_context_t | context : gfal 2 handle | |
params,: | parameters for the current transfer, see gfalt_params calls | |
src | : source file to copy | |
dst | : destination file | |
err | : GError err report |
const char*(* _gfal_plugin_interface::getName)() |
MANDATORY : return a the string id of the plugin. string id must be short, constant and unique ( ex : "plugin_gridftp" )
ssize_t(* _gfal_plugin_interface::getxattrG)(plugin_handle plugin_data, const char *url, const char *key, void *buff, size_t s_buff, GError **err) |
OPTIONAL : gfal_getxattr function support
plugin_data | : internal plugin data | |
url | : url of the file | |
key | : key of the attribute to get | |
buff | : buffer for the attribute content | |
s_buff | : maximum buffer size | |
err | : Error report, the code field of err should be set to errno value when possible |
ssize_t(* _gfal_plugin_interface::listxattrG)(plugin_handle plugin_data, const char *url, char *list, size_t s_list, GError **err) |
OPTIONAL : gfal_listxattr function support
plugin_data | : internal plugin data | |
url | : url of the file | |
list | : buffer for the list attribute content | |
s_buff | : maximum buffer size | |
s_list | : Error report, the code field of err should be set to errno value when possible |
off_t(* _gfal_plugin_interface::lseekG)(plugin_handle, gfal_file_handle fd, off_t offset, int whence, GError **err) |
MANDATORY IF OPEN : gfal_lseek function support
int(* _gfal_plugin_interface::lstatG)(plugin_handle plugin_data, const char *url, struct stat *buf, GError **err) |
OPTIONAL : gfal_lstat function support In case of non support for this function, calls to gfal_lstat are mapped to gfal_stat.
plugin_data | : internal plugin data | |
url | : url to stat | |
buf | : informations of the file | |
err | : Error report, the code field of err should be set to errno value when possible |
int(* _gfal_plugin_interface::mkdirpG)(plugin_handle plugin_data, const char *url, mode_t mode, gboolean rec_flag, GError **err) |
OPTIONAL : gfal_mkdir function support
plugin_data | : internal plugin data | |
url | : url of the directory to create | |
mode | : right mode of the created directory | |
rec_flag | : recursive mode, if enabled the plugin MUST create the parent directories if needed, if the rec_flag is not supported by this plugin, the plugin MUST return a negative value and set the GError errcode to ENOENT | |
err | : Error report, the code field of err should be set to errno value when possible |
gfal_file_handle(* _gfal_plugin_interface::opendirG)(plugin_handle plugin_data, const char *url, GError **err) |
OPTIONAL : gfal_opendir function support
plugin_data | : internal plugin data | |
url | : url of directory to list | |
err | : Error report, the code field of err should be set to errno value when possible |
gfal_file_handle(* _gfal_plugin_interface::openG)(plugin_handle plugin_data, const char *url, int flag, mode_t mode, GError **) |
OPTIONAL : gfal_open function support
plugin_data | : internal plugin data | |
url | : url of the directory to open | |
flag | : open flags | |
mode | : mode of the file, in case of creation | |
err | : Error report, the code field of err should be set to errno value when possible |
plugin_handle _gfal_plugin_interface::plugin_data |
plugin reserved pointer, free to use for plugin's internal data, passed to any function
void(* _gfal_plugin_interface::plugin_delete)(plugin_handle plugin_data) |
OPTIONAL : Last call before the unload of the plugin for the associated handle You can use this to clear your internal context
plugin_data | : internal plugin data |
ssize_t(* _gfal_plugin_interface::preadG)(plugin_handle, gfal_file_handle fd, void *buff, size_t count, off_t offset, GError **) |
OPTIONAL : gfal_pread function support
Allow fast parallels read support, If not implemented, this function is simulated by GFAL 2.0
plugin priority SHOULD be defined to GFAL_PLUGIN_PRIORITY_DATA by default
ssize_t(* _gfal_plugin_interface::pwriteG)(plugin_handle, gfal_file_handle fd, const void *buff, size_t count, off_t offset, GError **) |
OPTIONAL : gfal_pwriteG function support
Allow fast parallels write support, If not implemented, this function is simulated by GFAL 2.0
struct dirent*(* _gfal_plugin_interface::readdirG)(plugin_handle plugin_data, gfal_file_handle dir_desc, GError **err) [read] |
MANDATORY IF OPENDIR : gfal_readdir function support
plugin_data | : internal plugin data | |
dir_desc | : directory descriptor to use | |
err | : Error report, the code field of err should be set to errno value when possible |
struct dirent*(* _gfal_plugin_interface::readdirppG)(plugin_handle plugin_data, gfal_file_handle dir_desc, struct stat *st, GError **err) [read] |
OPTIONAL : gfal_readdirpp function support Allow directory listing + get meta-data in one operation
plugin_data | : internal plugin data | |
dir_desc | : directory descriptor to use | |
st | : struct stat to fill | |
err | : Error report, the code field of err should be set to errno value when possible |
ssize_t(* _gfal_plugin_interface::readG)(plugin_handle, gfal_file_handle fd, void *buff, size_t count, GError **) |
MANDATORY IF OPEN : gfal_read function support
ssize_t(* _gfal_plugin_interface::readlinkG)(plugin_handle plugin_data, const char *url, char *buff, size_t buffsiz, GError **) |
OPTIONAL : gfal_readlink function support
plugin_data | : internal plugin data | |
url | : url to stat | |
buff | : buffer for the readlink result | |
size_t | : buffsize maximum size to fill in the buffer | |
err | : Error report, the code field of err should be set to errno value when possible |
int(* _gfal_plugin_interface::release_file)(plugin_handle plugin_data, const char *url, const char *token, GError **err) |
OPTIONAL: Releases a previously staged file (mandatory if bring online is supported)
plugin_data | : internal plugin context | |
url | : The url of the file | |
token,: | The request token. If NULL, | |
err,: | GError error support |
int(* _gfal_plugin_interface::release_file_list)(plugin_handle plugin_data, int nbfiles, const char *const *urls, const char *token, GError **err) |
OPTIONAL: Releases a previously staged file (mandatory if bring online is supported)
plugin_data | : internal plugin context | |
nbfiles | : number of files in the list | |
url | : The urls of the files | |
token,: | The request token. If NULL, | |
err,: | GError error support |
int(* _gfal_plugin_interface::renameG)(plugin_handle plugin_data, const char *oldurl, const char *urlnew, GError **err) |
OPTIONAL : gfal_rename function support
plugin_data | : internal plugin data | |
oldurl | : old url of the file | |
urlnew | : new url of the file | |
err | : Error report, the code field of err should be set to errno value when possible |
int(* _gfal_plugin_interface::rmdirG)(plugin_handle plugin_data, const char *url, GError **err) |
OPTIONAL : gfal_rmdir function support
plugin_data | : internal plugin data | |
url | : url of the directory to delete | |
err | : Error report, the code field of err should be set to errno value when possible |
int(* _gfal_plugin_interface::setxattrG)(plugin_handle plugin_data, const char *url, const char *key, const void *buff, size_t s_buff, int flags, GError **err) |
OPTIONAL : gfal_setxattr function support
plugin_data | : internal plugin data | |
url | : url of the file | |
key | : key of the attribute to set | |
buff | : buffer for the attribute content | |
s_buff | : maximum buffer size | |
flas | : set/get flags | |
err | : Error report, the code field of err should be set to errno value when possible |
int(* _gfal_plugin_interface::statG)(plugin_handle plugin_data, const char *url, struct stat *buf, GError **err) |
OPTIONAL : gfal_stat function support
plugin_data | : internal plugin data | |
url | : url to stat | |
buf | : informations of the file | |
err | : Error report, the code field of err should be set to errno value when possible |
int(* _gfal_plugin_interface::symlinkG)(plugin_handle plugin_data, const char *oldurl, const char *newold, GError **err) |
OPTIONAL : gfal_symlink function support
plugin_data | : internal plugin data | |
oldurl | : old url of the file | |
urlnew | : symlink to create | |
err | : Error report, the code field of err should be set to errno value when possible |
int(* _gfal_plugin_interface::unlink_listG)(plugin_handle plugin_data, int nbfiles, const char *const *uris, GError **errors) |
OPTIONAL: Bulk deletion
int(* _gfal_plugin_interface::unlinkG)(plugin_handle plugin_data, const char *url, GError **err) |
OPTIONAL : gfal_unlink function support
plugin_data | : internal plugin data | |
url | : url of the file | |
err | : Error report, the code field of err should be set to errno value when possible |
ssize_t(* _gfal_plugin_interface::writeG)(plugin_handle, gfal_file_handle fd, const void *buff, size_t count, GError **) |
MANDATORY IF OPEN : gfal_write function support