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
00037 #include "globus_ftp_client.h"
00038 #include "globus_ftp_client_plugin.h"
00039
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043
00047 #define GLOBUS_FTP_CLIENT_THROUGHPUT_PLUGIN_MODULE (&globus_i_ftp_client_throughput_plugin_module)
00048
00049 extern
00050 globus_module_descriptor_t globus_i_ftp_client_throughput_plugin_module;
00051
00074 typedef void (*globus_ftp_client_throughput_plugin_begin_cb_t)(
00075 void * user_specific,
00076 globus_ftp_client_handle_t * handle,
00077 const char * source_url,
00078 const char * dest_url);
00079
00109 typedef void (*globus_ftp_client_throughput_plugin_stripe_cb_t)(
00110 void * user_specific,
00111 globus_ftp_client_handle_t * handle,
00112 int stripe_ndx,
00113 globus_off_t bytes,
00114 float instantaneous_throughput,
00115 float avg_throughput);
00116
00143 typedef void (*globus_ftp_client_throughput_plugin_total_cb_t)(
00144 void * user_specific,
00145 globus_ftp_client_handle_t * handle,
00146 globus_off_t bytes,
00147 float instantaneous_throughput,
00148 float avg_throughput);
00149
00171 typedef void (*globus_ftp_client_throughput_plugin_complete_cb_t)(
00172 void * user_specific,
00173 globus_ftp_client_handle_t * handle,
00174 globus_bool_t success);
00175
00176
00193 typedef void * (*globus_ftp_client_throughput_plugin_user_copy_cb_t)(
00194 void * user_specific);
00195
00211 typedef void (*globus_ftp_client_throughput_plugin_user_destroy_cb_t)(
00212 void * user_specific);
00213
00214 globus_result_t
00215 globus_ftp_client_throughput_plugin_init(
00216 globus_ftp_client_plugin_t * plugin,
00217 globus_ftp_client_throughput_plugin_begin_cb_t begin_cb,
00218 globus_ftp_client_throughput_plugin_stripe_cb_t per_stripe_cb,
00219 globus_ftp_client_throughput_plugin_total_cb_t total_cb,
00220 globus_ftp_client_throughput_plugin_complete_cb_t complete_cb,
00221 void * user_specific);
00222
00223 globus_result_t
00224 globus_ftp_client_throughput_plugin_set_copy_destroy(
00225 globus_ftp_client_plugin_t * plugin,
00226 globus_ftp_client_throughput_plugin_user_copy_cb_t copy_cb,
00227 globus_ftp_client_throughput_plugin_user_destroy_cb_t destroy_cb);
00228
00229 globus_result_t
00230 globus_ftp_client_throughput_plugin_destroy(
00231 globus_ftp_client_plugin_t * plugin);
00232
00233 globus_result_t
00234 globus_ftp_client_throughput_plugin_get_user_specific(
00235 globus_ftp_client_plugin_t * plugin,
00236 void ** user_specific);
00237
00238 #ifdef __cplusplus
00239 }
00240 #endif
00241
00242 #endif