00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef GLOBUS_FTP_CLIENT_THROUGHPUT_PLUGIN_H
00018 #define GLOBUS_FTP_CLIENT_THROUGHPUT_PLUGIN_H
00019
00038 #include "globus_ftp_client.h"
00039 #include "globus_ftp_client_plugin.h"
00040
00041 #ifdef __cplusplus
00042 extern "C" {
00043 #endif
00044
00048 #define GLOBUS_FTP_CLIENT_THROUGHPUT_PLUGIN_MODULE (&globus_i_ftp_client_throughput_plugin_module)
00049
00050 extern
00051 globus_module_descriptor_t globus_i_ftp_client_throughput_plugin_module;
00052
00075 typedef void (*globus_ftp_client_throughput_plugin_begin_cb_t)(
00076 void * user_specific,
00077 globus_ftp_client_handle_t * handle,
00078 const char * source_url,
00079 const char * dest_url);
00080
00110 typedef void (*globus_ftp_client_throughput_plugin_stripe_cb_t)(
00111 void * user_specific,
00112 globus_ftp_client_handle_t * handle,
00113 int stripe_ndx,
00114 globus_off_t bytes,
00115 float instantaneous_throughput,
00116 float avg_throughput);
00117
00144 typedef void (*globus_ftp_client_throughput_plugin_total_cb_t)(
00145 void * user_specific,
00146 globus_ftp_client_handle_t * handle,
00147 globus_off_t bytes,
00148 float instantaneous_throughput,
00149 float avg_throughput);
00150
00172 typedef void (*globus_ftp_client_throughput_plugin_complete_cb_t)(
00173 void * user_specific,
00174 globus_ftp_client_handle_t * handle,
00175 globus_bool_t success);
00176
00177
00194 typedef void * (*globus_ftp_client_throughput_plugin_user_copy_cb_t)(
00195 void * user_specific);
00196
00212 typedef void (*globus_ftp_client_throughput_plugin_user_destroy_cb_t)(
00213 void * user_specific);
00214
00215 globus_result_t
00216 globus_ftp_client_throughput_plugin_init(
00217 globus_ftp_client_plugin_t * plugin,
00218 globus_ftp_client_throughput_plugin_begin_cb_t begin_cb,
00219 globus_ftp_client_throughput_plugin_stripe_cb_t per_stripe_cb,
00220 globus_ftp_client_throughput_plugin_total_cb_t total_cb,
00221 globus_ftp_client_throughput_plugin_complete_cb_t complete_cb,
00222 void * user_specific);
00223
00224 globus_result_t
00225 globus_ftp_client_throughput_plugin_set_copy_destroy(
00226 globus_ftp_client_plugin_t * plugin,
00227 globus_ftp_client_throughput_plugin_user_copy_cb_t copy_cb,
00228 globus_ftp_client_throughput_plugin_user_destroy_cb_t destroy_cb);
00229
00230 globus_result_t
00231 globus_ftp_client_throughput_plugin_destroy(
00232 globus_ftp_client_plugin_t * plugin);
00233
00234 globus_result_t
00235 globus_ftp_client_throughput_plugin_get_user_specific(
00236 globus_ftp_client_plugin_t * plugin,
00237 void ** user_specific);
00238
00239 #ifdef __cplusplus
00240 }
00241 #endif
00242
00243 #endif