File Transfer API

Functions

gfalt_params_t gfalt_params_handle_new (GError **err)
void gfalt_params_handle_delete (gfalt_params_t params, GError **err)
gfalt_params_t gfalt_params_handle_copy (gfalt_params_t params, GError **err)
gint gfalt_set_timeout (gfalt_params_t, guint64 timeout, GError **err)
guint64 gfalt_get_timeout (gfalt_params_t handle, GError **err)
gint gfalt_set_nbstreams (gfalt_params_t, guint nbstreams, GError **err)
guint gfalt_get_nbstreams (gfalt_params_t params, GError **err)
gint gfalt_set_tcp_buffer_size (gfalt_params_t, guint64 tcp_buffer_size, GError **err)
guint64 gfalt_get_tcp_buffer_size (gfalt_params_t params, GError **err)
gint gfalt_set_local_transfer_perm (gfalt_params_t, gboolean local_transfer_status, GError **err)
gboolean gfalt_get_local_transfer_perm (gfalt_params_t, GError **err)
gint gfalt_set_src_spacetoken (gfalt_params_t params, const char *srm_spacetoken, GError **err)
gchar * gfalt_get_src_spacetoken (gfalt_params_t params, GError **err)
gint gfalt_set_dst_spacetoken (gfalt_params_t params, const char *srm_spacetoken, GError **err)
gchar * gfalt_get_dst_spacetoken (gfalt_params_t params, GError **err)
gint gfalt_set_replace_existing_file (gfalt_params_t, gboolean replace, GError **err)
gboolean gfalt_get_replace_existing_file (gfalt_params_t, GError **err)
gint gfalt_set_strict_copy_mode (gfalt_params_t, gboolean strict_mode, GError **err)
gboolean gfalt_get_strict_copy_mode (gfalt_params_t, GError **err)
gint gfalt_set_checksum_check (gfalt_params_t, gboolean value, GError **err)
gboolean gfalt_get_checksum_check (gfalt_params_t, GError **err)
gint gfalt_set_user_defined_checksum (gfalt_params_t param, const gchar *chktype, const gchar *checksum, GError **err)
gint gfalt_get_user_defined_checksum (gfalt_params_t params, gchar *chktype_buff, size_t chk_type_len, gchar *checksum_buff, size_t checksum_len, GError **err)
gint gfalt_set_create_parent_dir (gfalt_params_t, gboolean value, GError **err)
gboolean gfalt_get_create_parent_dir (gfalt_params_t, GError **err)
gint gfalt_set_user_data (gfalt_params_t, gpointer user_data, GError **err)
gpointer gfalt_get_user_data (gfalt_params_t, GError **err)
gint gfalt_set_monitor_callback (gfalt_params_t params, gfalt_monitor_func callback, GError **err)
 define a callback for monitoring the current transfer The default value is NULL and no monitoring will occur
gfalt_monitor_func gfalt_get_monitor_callback (gfalt_params_t params, GError **err)
 get the current monitor callback
gint gfalt_set_event_callback (gfalt_params_t params, gfalt_event_func callback, GError **err)
 Define a callback for event monitoring The default value is NULL and no monitoring will occur.
gfalt_event_func gfalt_get_event_callback (gfalt_params_t params, GError **err)
 Get the current event monitor callback.
int gfalt_copy_file (gfal2_context_t context, gfalt_params_t params, const char *src, const char *dst, GError **err)
 copy function start a synchronous copy of the file
gint gfalt_copy_cancel (gfalt_transfer_status_t, GError **err)
gint gfalt_copy_get_status (gfalt_transfer_status_t, GError **err)
size_t gfalt_copy_get_average_baudrate (gfalt_transfer_status_t, GError **err)
size_t gfalt_copy_get_instant_baudrate (gfalt_transfer_status_t, GError **err)
size_t gfalt_copy_get_bytes_transfered (gfalt_transfer_status_t, GError **err)
time_t gfalt_copy_get_elapsed_time (gfalt_transfer_status_t, GError **err)

Function Documentation

gint gfalt_copy_cancel ( gfalt_transfer_status_t  ,
GError **  err 
)

cancel the current file copy NOT YET implemented

int gfalt_copy_file ( gfal2_context_t  context,
gfalt_params_t  params,
const char *  src,
const char *  dst,
GError **  err 
)

copy function start a synchronous copy of the file

Parameters:
context : gfal context
params parameter handle ( gfalt_parameters_new )
src source URL supported by GFAL
dst destination URL supported by GFAL
size_t gfalt_copy_get_average_baudrate ( gfalt_transfer_status_t  ,
GError **  err 
)

get an estimation of the average baudrate in bytes/s

size_t gfalt_copy_get_bytes_transfered ( gfalt_transfer_status_t  ,
GError **  err 
)

get the current number of bytes transfered

time_t gfalt_copy_get_elapsed_time ( gfalt_transfer_status_t  ,
GError **  err 
)

get the elapsed tiem since the call to gfalt_copy_file

size_t gfalt_copy_get_instant_baudrate ( gfalt_transfer_status_t  ,
GError **  err 
)

get an estimation of the instant baudrate in bytes/s

gint gfalt_copy_get_status ( gfalt_transfer_status_t  ,
GError **  err 
)

get a transfer status indicator

gboolean gfalt_get_checksum_check ( gfalt_params_t  ,
GError **  err 
)

get the checksum verification boolean

gboolean gfalt_get_create_parent_dir ( gfalt_params_t  ,
GError **  err 
)

enable or disable the destination parent directory creation

gchar* gfalt_get_dst_spacetoken ( gfalt_params_t  params,
GError **  err 
)

get the destination spacetoken for SRM transfers

gboolean gfalt_get_local_transfer_perm ( gfalt_params_t  ,
GError **  err 
)

get the current authorisation for the non-third party transfer execution

guint gfalt_get_nbstreams ( gfalt_params_t  params,
GError **  err 
)

get the maximum number of parallels streams to use for the transfer

gboolean gfalt_get_replace_existing_file ( gfalt_params_t  ,
GError **  err 
)

get the policy in case of destination file already existing ( replace or cancel ) default : cancel

gchar* gfalt_get_src_spacetoken ( gfalt_params_t  params,
GError **  err 
)

get the source spacetoken for SRM transfers

gboolean gfalt_get_strict_copy_mode ( gfalt_params_t  ,
GError **  err 
)

get the strict copy mode value

guint64 gfalt_get_tcp_buffer_size ( gfalt_params_t  params,
GError **  err 
)

get the size of the tcp buffer size for network transfer

guint64 gfalt_get_timeout ( gfalt_params_t  handle,
GError **  err 
)

get the maximum connexion timeout

gpointer gfalt_get_user_data ( gfalt_params_t  ,
GError **  err 
)

get the user_data pointer for the monitoring callback

gint gfalt_get_user_defined_checksum ( gfalt_params_t  params,
gchar *  chktype_buff,
size_t  chk_type_len,
gchar *  checksum_buff,
size_t  checksum_len,
GError **  err 
)

get the current user-defined checksum for file content verification if current user-defined checksum is NULL, both of the buffer are set to empty string

gfalt_params_t gfalt_params_handle_copy ( gfalt_params_t  params,
GError **  err 
)

create a copy of a parameter handle

void gfalt_params_handle_delete ( gfalt_params_t  params,
GError **  err 
)

delete a created parameters handle

gfalt_params_t gfalt_params_handle_new ( GError **  err  ) 

initiate a new parameter handle

gint gfalt_set_checksum_check ( gfalt_params_t  ,
gboolean  value,
GError **  err 
)

force additional checksum verification between source and destination an Error is return by the copy function is case of checksum failure.

Warning:
for safety reason, even in case of checksum failure the destination file is not removed.
gint gfalt_set_create_parent_dir ( gfalt_params_t  ,
gboolean  value,
GError **  err 
)

enable or disable the destination parent directory creation

gint gfalt_set_dst_spacetoken ( gfalt_params_t  params,
const char *  srm_spacetoken,
GError **  err 
)

set the destination spacetoken for SRM transfers

gint gfalt_set_local_transfer_perm ( gfalt_params_t  ,
gboolean  local_transfer_status,
GError **  err 
)

enable or disable the non-third party transfer execution ( default : true )

gint gfalt_set_nbstreams ( gfalt_params_t  ,
guint  nbstreams,
GError **  err 
)

define the maximum number of parallels connexion to use for the file tranfer

gint gfalt_set_replace_existing_file ( gfalt_params_t  ,
gboolean  replace,
GError **  err 
)

set the replace/overwritte option. default : false when True, if a destination file already exist, it is deleted before the copy.

gint gfalt_set_src_spacetoken ( gfalt_params_t  params,
const char *  srm_spacetoken,
GError **  err 
)

set the source spacetoken for SRM transfers

gint gfalt_set_strict_copy_mode ( gfalt_params_t  ,
gboolean  strict_mode,
GError **  err 
)

set the strict copy mode default : false In the strict copy mode, the destination/source checks are skipped. only the minimum of the operations are done This option can leads to undefined behavior depending of the underlying protocol

gint gfalt_set_tcp_buffer_size ( gfalt_params_t  ,
guint64  tcp_buffer_size,
GError **  err 
)

define the size of the tcp buffer size for network transfer

gint gfalt_set_timeout ( gfalt_params_t  ,
guint64  timeout,
GError **  err 
)

define the maximum time acceptable for the file tranfer

gint gfalt_set_user_data ( gfalt_params_t  ,
gpointer  user_data,
GError **  err 
)

set the user_data pointer for the monitoring callback

gint gfalt_set_user_defined_checksum ( gfalt_params_t  param,
const gchar *  chktype,
const gchar *  checksum,
GError **  err 
)

set an user-defined checksum for file content verification set NULL & NULL clear the current one. This function requires to enable global checksum verification with gfalt_set_checksum_check

Parameters:
param : parameter handle
chktype : checksum type string ( MD5, ADLER32, CRC32, etc... )
checksum : value of checksum in string format
err : GError error report

Generated on 28 Nov 2013 for GFAL2 by  doxygen 1.6.1