/builddir/build/BUILD/gfal2-2.0.0/src/common/lfc/gfal_common_lfc.c File Reference

file for the lfc plugin module More...

#include <regex.h>
#include <pthread.h>
#include <errno.h>
#include <sys/types.h>
#include <dirent.h>
#include <attr/xattr.h>
#include <common/gfal_prototypes.h>
#include <common/gfal_types.h>
#include <common/gfal_common_plugin.h>
#include "gfal_common_lfc.h"
#include "gfal_common_lfc_open.h"
#include "../gfal_common_internal.h"
#include "../gfal_common_errverbose.h"
#include "../gfal_common_filedescriptor.h"
#include "lfc_ifce_ng.h"

Data Structures

struct  _lfc_opendir_handle

Typedefs

typedef struct
_lfc_opendir_handle
lfc_opendir_handle

Functions

const char * lfc_getName ()
int lfc_chmodG (plugin_handle handle, const char *path, mode_t mode, GError **err)
int lfc_accessG (plugin_handle handle, const char *lfn, int mode, GError **err)
int lfc_renameG (plugin_handle handle, const char *oldpath, const char *newpath, GError **err)
int lfc_symlinkG (plugin_handle handle, const char *oldpath, const char *newpath, GError **err)
int lfc_statG (plugin_handle handle, const char *path, struct stat *st, GError **err)
char ** lfc_getSURLG (plugin_handle handle, const char *path, GError **err)
ssize_t lfc_getxattr_getsurl (plugin_handle handle, const char *path, void *buff, size_t size, GError **err)
ssize_t lfc_getxattr_getguid (plugin_handle handle, const char *path, void *buff, size_t size, GError **err)
ssize_t lfc_getxattr_comment (plugin_handle handle, const char *path, void *buff, size_t size, GError **err)
ssize_t lfc_getxattrG (plugin_handle handle, const char *path, const char *name, void *buff, size_t size, GError **err)
ssize_t lfc_listxattrG (plugin_handle handle, const char *path, char *list, size_t size, GError **err)
int lfc_setxattr_comment (plugin_handle handle, const char *path, const char *name, const void *value, size_t size, int flags, GError **err)
int lfc_setxattrG (plugin_handle handle, const char *path, const char *name, const void *value, size_t size, int flags, GError **err)
char * lfc_resolve_guid (plugin_handle handle, const char *guid, GError **err)
int lfc_is_used_parameter (plugin_handle handle, const char *namespace, const char *key)
void lfc_notify_change_parameter (plugin_handle handle, const char *namespace, const char *key)
gfal_plugin_interface gfal_plugin_init (gfal_handle handle, GError **err)
gboolean gfal_checker_guid (const char *guid, GError **err)
gboolean gfal_lfc_check_lfn_url (plugin_handle handle, const char *url, plugin_mode mode, GError **err)

Variables

pthread_mutex_t m_lfcinit = PTHREAD_MUTEX_INITIALIZER

Detailed Description

file for the lfc plugin module

Author:
Adrien Devresse
Version:
0.0.1
Date:
06/07/2011

Function Documentation

gboolean gfal_checker_guid ( const char *  guid,
GError **  err 
)

parse a guid to check the validity

Referenced by gfal_lfc_check_lfn_url().

gboolean gfal_lfc_check_lfn_url ( plugin_handle  handle,
const char *  url,
plugin_mode  mode,
GError **  err 
)

Check if the passed url and operation is compatible with lfc

References gfal_checker_guid().

Referenced by gfal_plugin_init().

gfal_plugin_interface gfal_plugin_init ( gfal_handle  handle,
GError **  err 
)
int lfc_accessG ( plugin_handle  handle,
const char *  lfn,
int  mode,
GError **  err 
)

implementation of the access call with the lfc plugin return 0 or -1 if error and report GError** with error code and message

References gfal_lfc_init_thread().

Referenced by gfal_plugin_init().

int lfc_chmodG ( plugin_handle  handle,
const char *  path,
mode_t  mode,
GError **  err 
)

Implementation of the chmod function with the LFC plugin return 0 or the errno if error, or set GError if serious error

References gfal_lfc_init_thread().

Referenced by gfal_plugin_init().

const char* lfc_getName (  ) 

just return the name of the layer

Referenced by gfal_plugin_init().

char** lfc_getSURLG ( plugin_handle  handle,
const char *  path,
GError **  err 
)

resolve the lfc link to the surls

References gfal_lfc_getSURL(), and gfal_lfc_init_thread().

Referenced by lfc_getxattr_getsurl(), and lfc_openG().

ssize_t lfc_getxattr_comment ( plugin_handle  handle,
const char *  path,
void *  buff,
size_t  size,
GError **  err 
)

lfc getxattr for path -> comment resolution

Referenced by lfc_getxattrG().

ssize_t lfc_getxattr_getguid ( plugin_handle  handle,
const char *  path,
void *  buff,
size_t  size,
GError **  err 
)

lfc getxattr for the path -> guid resolution

Referenced by lfc_getxattrG().

ssize_t lfc_getxattr_getsurl ( plugin_handle  handle,
const char *  path,
void *  buff,
size_t  size,
GError **  err 
)

lfc getxattr for the path -> surls resolution

References lfc_getSURLG().

Referenced by lfc_getxattrG().

ssize_t lfc_getxattrG ( plugin_handle  handle,
const char *  path,
const char *  name,
void *  buff,
size_t  size,
GError **  err 
)
int lfc_is_used_parameter ( plugin_handle  handle,
const char *  namespace,
const char *  key 
)

signals the lfc parameters :

  • LFC_HOST : (lfc, host)

Referenced by gfal_plugin_init().

ssize_t lfc_listxattrG ( plugin_handle  handle,
const char *  path,
char *  list,
size_t  size,
GError **  err 
)

lfc getxattr implem

Referenced by gfal_plugin_init().

void lfc_notify_change_parameter ( plugin_handle  handle,
const char *  namespace,
const char *  key 
)

Receive notification of a change in the parameter, take care of it

References gfal_common_parameter_get_string(), gfal_print_verbose(), and GFAL_VERBOSE_VERBOSE.

Referenced by gfal_plugin_init().

int lfc_renameG ( plugin_handle  handle,
const char *  oldpath,
const char *  newpath,
GError **  err 
)

Implementation of the rename call for the lfc plugin return 0 if success else -1 if error and set GError

References gfal_lfc_init_thread().

Referenced by gfal_plugin_init().

char* lfc_resolve_guid ( plugin_handle  handle,
const char *  guid,
GError **  err 
)

Convert a guid to a plugin url if possible return the link in a plugin's url string or err and NULL if not found

References gfal_convert_guid_to_lfn().

int lfc_setxattr_comment ( plugin_handle  handle,
const char *  path,
const char *  name,
const void *  value,
size_t  size,
int  flags,
GError **  err 
)

setxattr function special for comments

Referenced by lfc_setxattrG().

int lfc_setxattrG ( plugin_handle  handle,
const char *  path,
const char *  name,
const void *  value,
size_t  size,
int  flags,
GError **  err 
)

lfc setxattr implem

References lfc_setxattr_comment().

Referenced by gfal_plugin_init().

int lfc_statG ( plugin_handle  handle,
const char *  path,
struct stat *  st,
GError **  err 
)

execute a posix stat request on the lfc return 0 and set struct if correct answer, else return negative value and set GError

References gfal_lfc_init_thread().

Referenced by gfal_plugin_init().

int lfc_symlinkG ( plugin_handle  handle,
const char *  oldpath,
const char *  newpath,
GError **  err 
)

Implementation of the symlinkG call for the lfc plugin return 0 if success else -1 if error and set GError

References gfal_lfc_init_thread().

Referenced by gfal_plugin_init().


Generated on 15 May 2012 for CERN org.glite.Gfal by  doxygen 1.6.1