.TH "globus_ftp_client_restart_marker_plugin" 3 "Tue Jul 5 2022" "Version 9.8" "globus_ftp_client" \" -*- nroff -*- .ad l .nh .SH NAME globus_ftp_client_restart_marker_plugin \- Restart Marker Plugin .PP \- Restart Marker Plugin\&. .SH SYNOPSIS .br .PP .SS "Macros" .in +1c .ti -1c .RI "#define \fBGLOBUS_FTP_CLIENT_RESTART_MARKER_PLUGIN_MODULE\fP (&globus_i_ftp_client_restart_marker_plugin_module)" .br .in -1c .SS "Typedefs" .in +1c .ti -1c .RI "typedef globus_bool_t(* \fBglobus_ftp_client_restart_marker_plugin_begin_cb_t\fP) (void *user_arg, \fBglobus_ftp_client_handle_t\fP *handle, const char *source_url, const char *dest_url, \fBglobus_ftp_client_restart_marker_t\fP *user_saved_marker)" .br .RI "Transfer begin callback\&. " .ti -1c .RI "typedef void(* \fBglobus_ftp_client_restart_marker_plugin_marker_cb_t\fP) (void *user_arg, \fBglobus_ftp_client_handle_t\fP *handle, \fBglobus_ftp_client_restart_marker_t\fP *marker)" .br .ti -1c .RI "typedef void(* \fBglobus_ftp_client_restart_marker_plugin_complete_cb_t\fP) (void *user_arg, \fBglobus_ftp_client_handle_t\fP *handle, globus_object_t *error, const char *error_url)" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "globus_result_t \fBglobus_ftp_client_restart_marker_plugin_init\fP (\fBglobus_ftp_client_plugin_t\fP *plugin, \fBglobus_ftp_client_restart_marker_plugin_begin_cb_t\fP begin_cb, \fBglobus_ftp_client_restart_marker_plugin_marker_cb_t\fP marker_cb, \fBglobus_ftp_client_restart_marker_plugin_complete_cb_t\fP complete_cb, void *user_arg)" .br .ti -1c .RI "globus_result_t \fBglobus_ftp_client_restart_marker_plugin_destroy\fP (\fBglobus_ftp_client_plugin_t\fP *plugin)" .br .in -1c .SH "Detailed Description" .PP Restart Marker Plugin\&. This plugin is intended to allow users to make restart markers persistent\&. During a transfer, every marker received will result in the user's 'marker' callback being called with the new restart marker that can be stored\&. If the application were to prematurely terminate (while transferring), the user (after restarting the application) could pass this stored marker back to the plugin via the 'begin' callback to force the transfer to be restarted from the last marked point\&. .SH "Macro Definition Documentation" .PP .SS "#define GLOBUS_FTP_CLIENT_RESTART_MARKER_PLUGIN_MODULE (&globus_i_ftp_client_restart_marker_plugin_module)" Module descriptor .SH "Typedef Documentation" .PP .SS "typedef globus_bool_t(* globus_ftp_client_restart_marker_plugin_begin_cb_t) (void *user_arg, \fBglobus_ftp_client_handle_t\fP *handle, const char *source_url, const char *dest_url, \fBglobus_ftp_client_restart_marker_t\fP *user_saved_marker)" .PP Transfer begin callback\&. This callback is called when a get, put, or third party transfer is started\&. .PP The intended use for this callback is for the user to use the transfer urls to locate a restart marker in some persistent storage\&. If one is found, it should be copied into 'user_saved_marker' and the callback should return GLOBUS_TRUE\&. This will cause the transfer to be restarted using that restart marker\&. If one is not found, return GLOBUS_FALSE to indicate that the transfer should proceed from the beginning\&. .PP In any case, this is also an opportunity for the user to set up any storage in anticipation of restart markers for this transfer\&. .PP \fBParameters\fP .RS 4 \fIhandle\fP this the client handle that this transfer will be occurring on .br \fIuser_arg\fP this is the user_arg passed to the init func .br \fIsource_url\fP source of the transfer (GLOBUS_NULL if 'put') .br \fIdest_url\fP dest of the transfer (GLOBUS_NULL if 'get') .br \fIuser_saved_marker\fP pointer to an initialized restart marker .RE .PP \fBReturns\fP .RS 4 .IP "\(bu" 2 GLOBUS_TRUE to indicate that the plugin should use 'user_saved_marker' to restart the transfer (and subsequently, destroy the marker) .IP "\(bu" 2 GLOBUS_FALSE to indicate that 'user_saved_marker' has not been modified, and that the transfer should proceed normally .PP .RE .PP .SS "typedef void(* globus_ftp_client_restart_marker_plugin_complete_cb_t) (void *user_arg, \fBglobus_ftp_client_handle_t\fP *handle, globus_object_t *error, const char *error_url)" Transfer complete callback .PP This callback will be called upon transfer completion (successful or otherwise) .PP \fBParameters\fP .RS 4 \fIhandle\fP this the client handle that this transfer was occurring on .br \fIuser_arg\fP this is the user_arg passed to the init func .br \fIerror\fP the error object indicating what went wrong (GLOBUS_NULL on success) .br \fIerror_url\fP the url which is the source of the above error (GLOBUS_NULL on success) .RE .PP \fBReturns\fP .RS 4 .IP "\(bu" 2 n/a .PP .RE .PP .SS "typedef void(* globus_ftp_client_restart_marker_plugin_marker_cb_t) (void *user_arg, \fBglobus_ftp_client_handle_t\fP *handle, \fBglobus_ftp_client_restart_marker_t\fP *marker)" Restart marker received callback .PP This callback will be called every time a restart marker is available\&. .PP To receive restart markers in a 'put' or 'third_party_transfer', the transfer must be in Extended Block mode\&. 'get' transfers will have their markers generated internally\&. Markers generated internally will be 'sent' at most, once per second\&. .PP The intended use for this callback is to allow the user to store this marker (most likely in place of any previous marker) in a format that the 'begin_cb' can parse and pass back\&. .PP \fBParameters\fP .RS 4 \fIhandle\fP this the client handle that this transfer is occurring on .br \fIuser_arg\fP this is the user_arg passed to the init func .br \fImarker\fP the restart marker that has been received\&. This marker is owned by the caller\&. The user must use the copy method to keep it\&. Note: this restart marker currently contains all ranges received as of yet\&. Should I instead only pass a marker with the ranges just made available? If so, the user may need a way to combine restart markers (globus_ftp_client_restart_marker_combine) .RE .PP \fBReturns\fP .RS 4 .IP "\(bu" 2 n/a .PP .RE .PP .SH "Function Documentation" .PP .SS "globus_result_t globus_ftp_client_restart_marker_plugin_destroy (\fBglobus_ftp_client_plugin_t\fP * plugin)" Destroy restart marker plugin .PP Frees up memory associated with plugin .PP \fBParameters\fP .RS 4 \fIplugin\fP plugin previously initialized with init (above) .RE .PP \fBReturns\fP .RS 4 .IP "\(bu" 2 GLOBUS_SUCCESS .IP "\(bu" 2 Error on NULL plugin .PP .RE .PP .SS "globus_result_t globus_ftp_client_restart_marker_plugin_init (\fBglobus_ftp_client_plugin_t\fP * plugin, \fBglobus_ftp_client_restart_marker_plugin_begin_cb_t\fP begin_cb, \fBglobus_ftp_client_restart_marker_plugin_marker_cb_t\fP marker_cb, \fBglobus_ftp_client_restart_marker_plugin_complete_cb_t\fP complete_cb, void * user_arg)" Initialize a restart marker plugin .PP This function initializes a restart marker plugin\&. Any params except for the plugin may be GLOBUS_NULL .PP \fBParameters\fP .RS 4 \fIplugin\fP a pointer to a plugin type to be initialized .br \fIuser_arg\fP a pointer to some user specific data that will be provided to all callbacks .br \fIbegin_cb\fP the callback to be called upon the start of a transfer .br \fImarker_cb\fP the callback to be called with every restart marker received .br \fIcomplete_cb\fP the callback to be called to indicate transfer completion .RE .PP \fBReturns\fP .RS 4 .IP "\(bu" 2 GLOBUS_SUCCESS .IP "\(bu" 2 Error on NULL plugin .IP "\(bu" 2 Error on init internal plugin .PP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for globus_ftp_client from the source code\&.