_gfal_plugin_interface Struct Reference

#include <gfal_common_plugin_interface.h>


Data Fields

void * gfal_data
plugin_handle handle
const char *(* getName )()
void(* plugin_delete )(plugin_handle)
gboolean(* check_plugin_url )(plugin_handle, const char *url, plugin_mode mode, GError **err)
int(* accessG )(plugin_handle, const char *path, int mode, GError **err)
int(* chmodG )(plugin_handle, const char *, mode_t, GError **err)
int(* renameG )(plugin_handle, const char *, const char *, GError **err)
int(* symlinkG )(plugin_handle, const char *, const char *, GError **err)
int(* statG )(plugin_handle, const char *, struct stat *buf, GError **err)
int(* lstatG )(plugin_handle, const char *, struct stat *buf, GError **err)
ssize_t(* readlinkG )(plugin_handle, const char *, char *buff, size_t buffsiz, GError **)
gfal_file_handle(* opendirG )(plugin_handle, const char *, GError **)
int(* closedirG )(plugin_handle, gfal_file_handle, GError **)
dirent *(* readdirG )(plugin_handle, gfal_file_handle, GError **)
int(* mkdirpG )(plugin_handle, const char *, mode_t, gboolean pflag, GError **)
int(* rmdirG )(plugin_handle, const char *, GError **)
gfal_file_handle(* openG )(plugin_handle, const char *path, int flag, mode_t mode, GError **)
int(* readG )(plugin_handle, gfal_file_handle fd, void *buff, size_t count, GError **)
int(* writeG )(plugin_handle, gfal_file_handle fd, void *buff, size_t count, GError **)
int(* closeG )(plugin_handle, gfal_file_handle fd, GError **)
int(* 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, const char *path, GError **)
ssize_t(* getxattrG )(plugin_handle, const char *, const char *, void *buff, size_t s_buff, GError **err)
ssize_t(* listxattrG )(plugin_handle, const char *, char *list, size_t s_list, GError **err)
int(* setxattrG )(plugin_handle, const char *, const char *, const void *, size_t, int, GError **)
int(* is_used_parameter )(plugin_handle, const char *namespacep, const char *key)
void(* notify_change_parameter )(plugin_handle, const char *namespacep, const char *key)


Detailed Description

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


Field Documentation

int(* _gfal_plugin_interface::accessG)(plugin_handle, const char *path, int mode, GError **err)

access function for the access for the normal associated url

gboolean(* _gfal_plugin_interface::check_plugin_url)(plugin_handle, const char *url, plugin_mode mode, GError **err)

Check the url syntax and the operation, return TRUE if the operation is compatible with the plugin, else FALSE. THIS function MUST be implemented in EACH plugin.

Warning:
This function is a key function of GFAL 2.0, It MUST be as fast as possible.

int(* _gfal_plugin_interface::chmodG)(plugin_handle, const char *, mode_t, GError **err)

function pointer for the access using the guid url

ssize_t(* _gfal_plugin_interface::getxattrG)(plugin_handle, const char *, const char *, void *buff, size_t s_buff, GError **err)

getxattr implementation, follow the getxattr behavior but with GError report system.

int(* _gfal_plugin_interface::is_used_parameter)(plugin_handle, const char *namespacep, const char *key)

this function is called to inform plugin of a new parameter must return 1 if this parameter is used by the plugin else return 0

Warning:
must be a NULL pointer if not used

ssize_t(* _gfal_plugin_interface::listxattrG)(plugin_handle, const char *, char *list, size_t s_list, GError **err)

listxattr implementation, follow the listxattr behavior but with GError report system.

void(* _gfal_plugin_interface::notify_change_parameter)(plugin_handle, const char *namespacep, const char *key)

called when a change occures on a parameter push the information to the plugins to check the new value associated with the key, call gfal_get_*_parameter functions

Warning:
must be a NULL pointer if not used
Returns:
0 if parameter changed or if no parameter triggered, -1 if major error with the new parameter

void(* _gfal_plugin_interface::plugin_delete)(plugin_handle)

Called before the destruction of the plugin interface

ssize_t(* _gfal_plugin_interface::preadG)(plugin_handle, gfal_file_handle fd, void *buff, size_t count, off_t offset, GError **)

Vector operation, similar to the POSIX call pread The vector operation needs to be set to NULL if not implemented Vector operation permits an improvement of the performances. *

int(* _gfal_plugin_interface::setxattrG)(plugin_handle, const char *, const char *, const void *, size_t, int, GError **)

setxattr implementation, follow the setxattr behavior but with GError report system.

int(* _gfal_plugin_interface::unlinkG)(plugin_handle, const char *path, GError **)

unlink implementation, follow the unlink behavior but with GError report system.


The documentation for this struct was generated from the following file:
Generated on Wed May 16 16:46:34 2012 for CERN org.glite.Gfal by  doxygen 1.4.7