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

main internal file of the lfc plugin module More...

#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <sys/types.h>
#include <dlfcn.h>
#include <stdlib.h>
#include <pthread.h>
#include <serrno.h>
#include <uuid/uuid.h>
#include <common/gfal_prototypes.h>
#include <common/gfal_types.h>
#include <common/gfal_common_plugin.h>
#include <common/mds/gfal_common_mds.h>
#include <common/gfal_common_interface.h>
#include "lfc_ifce_ng.h"
#include <common/gfal_common_errverbose.h>

Defines

#define _GNU_SOURCE
#define GFAL_LFN_MAX_LEN   2048

Functions

int _Cthread_addcid (char *, int, char *, int, Cth_pid_t *, unsigned, void *(*)(void *), int)
int gfal_lfc_regex_compile (regex_t *rex, GError **err)
void gfal_lfc_init_thread (struct lfc_ops *ops)
int gfal_lfc_startSession (struct lfc_ops *ops, GError **err)
void gfal_auto_maintain_session (struct lfc_ops *ops, GError **err)
void lfc_set_session_timeout (int timeout)
char * gfal_get_lfchost_envar (GError **err)
char * gfal_convert_guid_to_lfn (plugin_handle handle, char *guid, GError **err)
int gfal_convert_guid_to_lfn_r (plugin_handle handle, const char *guid, char *buff_lfn, size_t sbuff_lfn, GError **err)
char * gfal_setup_lfchost (gfal_handle handle, GError **err)
lfc_ops * gfal_load_lfc (const char *name, GError **err)
int gfal_lfc_convert_statg (struct stat *output, struct lfc_filestatg *input, GError **err)
int gfal_lfc_convert_lstat (struct stat *output, struct lfc_filestat *input, GError **err)
int gfal_lfc_mkdir_rec (struct lfc_ops *ops, char *browser_path, const char *full_path, mode_t mode, GError **err)
int gfal_lfc_ifce_mkdirpG (struct lfc_ops *ops, const char *path, mode_t mode, gboolean pflag, GError **err)
char ** gfal_lfc_getSURL (struct lfc_ops *ops, const char *path, GError **err)
int gfal_lfc_getComment (struct lfc_ops *ops, const char *lfn, char *buff, size_t s_buff, GError **err)
int gfal_lfc_setComment (struct lfc_ops *ops, const char *lfn, const char *buff, size_t s_buff, GError **err)
int gfal_lfc_getChecksum (struct lfc_ops *ops, const char *lfn, lfc_checksum *checksum, GError **err)
int gfal_lfc_statg (struct lfc_ops *ops, const char *lfn, struct lfc_filestatg *statbuf, GError **err)
ssize_t g_strv_catbuff (char **strv, char *buff, size_t size)
int gfal_lfc_get_errno (struct lfc_ops *ops)
char * gfal_lfc_get_strerror (struct lfc_ops *ops)
void gfal_generate_guidG (char *buf, GError **err)
 generate an uiid string Generate a uuid string and cpy it in the buf,
int gfal_lfc_set_host (const char *host, GError **err)


Detailed Description

main internal file of the lfc plugin module

Author:
Adrien Devresse
Version:
0.0.1
Date:
02/05/2011

Function Documentation

char* gfal_convert_guid_to_lfn ( plugin_handle  handle,
char *  guid,
GError **  err 
)

convert a guid to a lfn link with a call to the lfclib

Parameters:
handle handle of the lfc plugin
string of the guid
err : Error report system
Returns:
: string of the lfn if success or NULL char* if error

int gfal_convert_guid_to_lfn_r ( plugin_handle  handle,
const char *  guid,
char *  buff_lfn,
size_t  sbuff_lfn,
GError **  err 
)

convert a guid to a lfn link with a call to the lfclib in a reantrant( buffer mode )

Parameters:
handle plugin handle
guid string of the guid
buff_lfn buffer for the lfn result
sbuff_lfn size of the buffer
err : Error report system
Returns:
: 0 else -1 if error and err is set

void gfal_generate_guidG ( char *  buf,
GError **  err 
)

generate an uiid string Generate a uuid string and cpy it in the buf,

Warning:
buff must be > uuid size ( 37 bytes )

char** gfal_lfc_getSURL ( struct lfc_ops *  ops,
const char *  path,
GError **  err 
)

return a list of surls from a getreplica request

int gfal_lfc_ifce_mkdirpG ( struct lfc_ops *  ops,
const char *  path,
mode_t  mode,
gboolean  pflag,
GError **  err 
)

Implementation of mkdir -p call on the lfc

void gfal_lfc_init_thread ( struct lfc_ops *  ops  ) 

Routine for internal lfc hack, need to be call for the thread safety

int gfal_lfc_mkdir_rec ( struct lfc_ops *  ops,
char *  browser_path,
const char *  full_path,
mode_t  mode,
GError **  err 
)

Begin a recursive call on mkdir to create a full tree path

Warning:
not safe, please ensure that string begin by "/"

struct lfc_ops* gfal_load_lfc ( const char *  name,
GError **  err 
)

load the shared library and link the symbol for the LFC usage

Parameters:
name : name of the library
err,: error report

char* gfal_setup_lfchost ( gfal_handle  handle,
GError **  err 
)

setup the lfc_host correctly for the lfc calls

Parameters:
err GError report system if
Returns:
string of the endpoint, need to be free or NULL if error


Generated on Wed May 16 16:46:34 2012 for CERN org.glite.Gfal by  doxygen 1.4.7