Data Structures | |
struct | _gfalt_event |
Event message. More... | |
Typedefs | |
typedef struct _gfalt_params_t * | gfalt_params_t |
container for transfer related parameters | |
typedef struct _gfalt_transfer_status * | gfalt_transfer_status_t |
internal status of a copy file action | |
typedef void(* | gfalt_monitor_func )(gfalt_transfer_status_t h, const char *src, const char *dst, gpointer user_data) |
copy gfalt_monitor_transfer This function is called callback_mperiod milli-seconds in order to provide informations and a control on the tranfers. | |
typedef struct _gfalt_event * | gfalt_event_t |
typedef void(* | gfalt_event_func )(const gfalt_event_t e, gpointer user_data) |
Enumerations | |
enum | gfal_event_side_t { GFAL_EVENT_SOURCE = 0, GFAL_EVENT_DESTINATION, GFAL_EVENT_NONE } |
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) |
const 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) |
const 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) |
GFAL2_DEPRECATED_NOALT gint | gfalt_set_user_data (gfalt_params_t, gpointer user_data, GError **err) |
GFAL2_DEPRECATED_NOALT gpointer | gfalt_get_user_data (gfalt_params_t, GError **err) |
GFAL2_DEPRECATED (gfalt_add_monitor_callback) gint gfalt_set_monitor_callback(gfalt_params_t params | |
define a callback for monitoring the current transfer The default value is NULL and no monitoring will occur | |
GFAL2_DEPRECATED (plugin_trigger_monitor) gfalt_monitor_func gfalt_get_monitor_callback(gfalt_params_t params | |
get the current monitor callback | |
GFAL2_DEPRECATED (gfalt_add_event_callback) gint gfalt_set_event_callback(gfalt_params_t params | |
Define a callback for event monitoring The default value is NULL and no monitoring will occur. | |
GFAL2_DEPRECATED (plugin_trigger_event) gfalt_event_func gfalt_get_event_callback(gfalt_params_t params | |
Get the current event monitor callback. | |
gint | gfalt_add_monitor_callback (gfalt_params_t params, gfalt_monitor_func callback, gpointer udata, GDestroyNotify udata_free, GError **err) |
Add a new callback for monitoring the current transfer Adding the same callback with a different udata will just change the udata and the free method, but the callback will not be called twice. In this case, udata_free will be called with the old data. udata_free can be left to NULL. | |
gint | gfalt_remove_monitor_callback (gfalt_params_t params, gfalt_monitor_func callback, GError **err) |
Remove an installed monitor callback It will call the method registered to free the user data. | |
gint | gfalt_add_event_callback (gfalt_params_t params, gfalt_event_func callback, gpointer udata, GDestroyNotify udata_free, GError **err) |
Add a new callback for event monitoring Adding the same callback with a different udata will just change the udata, but the callback will not be called twice. In this case, udata_free will be called with the old data. udata_free can be left to NULL. | |
gint | gfalt_remove_event_callback (gfalt_params_t params, gfalt_event_func callback, GError **err) |
Remove an installed callback It will call the method registered to free the user data. | |
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 | |
int | gfalt_copy_bulk (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_erros) |
bulk copy operation If not provided by the plugin, it will fallback to a serialized implementation Note that file_erros will point to an array of nbfiles pointers to GError, where each one corresponds to the source and destination pair in the same position op_error will contain an error if something happened _before_ file transfering could be attempted | |
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) |
Variables | |
gfalt_monitor_func | callback |
gfalt_monitor_func GError ** | err |
GQuark | GFAL_EVENT_PREPARE_ENTER |
Predefined stages. | |
GQuark | GFAL_EVENT_PREPARE_EXIT |
GQuark | GFAL_EVENT_TRANSFER_ENTER |
GQuark | GFAL_EVENT_TRANSFER_EXIT |
GQuark | GFAL_EVENT_CLOSE_ENTER |
GQuark | GFAL_EVENT_CLOSE_EXIT |
GQuark | GFAL_EVENT_CHECKSUM_ENTER |
GQuark | GFAL_EVENT_CHECKSUM_EXIT |
GQuark | GFAL_EVENT_CANCEL_ENTER |
GQuark | GFAL_EVENT_CANCEL_EXIT |
GQuark | GFAL_EVENT_OVERWRITE_DESTINATION |
GQuark | GFAL_EVENT_LIST_ENTER |
GQuark | GFAL_EVENT_LIST_ITEM |
GQuark | GFAL_EVENT_LIST_EXIT |
typedef void(* gfalt_event_func)(const gfalt_event_t e, gpointer user_data) |
This function is called when a transfer changes its stage.
e | : Event message. | |
user_data | : external pointer provided before |
typedef struct _gfalt_event* gfalt_event_t |
Event message
typedef void(* gfalt_monitor_func)(gfalt_transfer_status_t h, const char *src, const char *dst, gpointer user_data) |
copy gfalt_monitor_transfer This function is called callback_mperiod milli-seconds in order to provide informations and a control on the tranfers.
src | : URL of the source file | |
dst | : URL of the dest file | |
user_data | : external pointer provided before |
enum gfal_event_side_t |
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
context | : gfal2 context | |
params | parameter handle ( gfalt_parameters_new ) | |
src | source URL supported by GFAL | |
dst | destination URL supported by GFAL | |
err | the error is put here |
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
const 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 authorization 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
const 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
GFAL2_DEPRECATED_NOALT 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 | ) |
Create 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.
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
GFAL2_DEPRECATED_NOALT 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 Setting NULL & NULL clear the current one. This function requires to enable global checksum verification with gfalt_set_checksum_check
param | : parameter handle | |
chktype | : checksum type string ( MD5, ADLER32, CRC32, etc... ) | |
checksum | : value of checksum in string format | |
err | : GError error report |
GQuark GFAL_EVENT_CANCEL_ENTER |
Triggered before the cancellation logic
GQuark GFAL_EVENT_CANCEL_EXIT |
Triggered after the cancellation logic
GQuark GFAL_EVENT_CHECKSUM_ENTER |
Triggered before entering checksum validation
GQuark GFAL_EVENT_CHECKSUM_EXIT |
Triggered after exiting checksum validation
GQuark GFAL_EVENT_CLOSE_ENTER |
Triggered before entering the closing (putdone)
GQuark GFAL_EVENT_CLOSE_EXIT |
Triggered after exiting the closing (putdone)
GQuark GFAL_EVENT_LIST_ENTER |
Triggered before listing the urls to be transferred
GQuark GFAL_EVENT_LIST_EXIT |
Triggered after listing the urls to be transferred
GQuark GFAL_EVENT_LIST_ITEM |
Triggered once per url pair to be transferred
Triggered before overwriting
GQuark GFAL_EVENT_PREPARE_ENTER |
Predefined stages.
Triggered before entering preparation
GQuark GFAL_EVENT_PREPARE_EXIT |
Triggered after exiting the preparation
GQuark GFAL_EVENT_TRANSFER_ENTER |
Triggered before entering the transfer
GQuark GFAL_EVENT_TRANSFER_EXIT |
Triggered after exiting the transfer