00001 #pragma once
00002 #ifndef _GRIDFTP_IFCE_INCLUDE_h
00003 #define _GRIDFTP_IFCE_INCLUDE_h
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <globus_gass_copy.h>
00027 #include <globus_ftp_client.h>
00028 #include <globus_ftp_client_restart_marker_plugin.h>
00029 #include <globus_ftp_client_restart_plugin.h>
00030 #include <globus_ftp_client_debug_plugin.h>
00031
00032
00033 #ifdef __cplusplus
00034 extern "C"
00035 {
00036 #endif // __cplusplus
00037
00038 #ifndef LONG64LONG64
00039 #if defined(__ia64__) || defined(__x86_64)
00040 #define LONG64 long
00041 #elif defined(_WIN32)
00042 #define LONG64 __i64
00043 #else
00044 #define LONG64 long long
00045 #endif
00046 #endif
00047
00048 #define ERROR_BUFFER_SIZE 1024
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00068 inline int dmutils_gridftp_check_gsi_url(const char* url) {
00069 return strncmp(url, "gsiftp:", 7) == 0 ? 0 : -1;
00070 }
00071
00079 globus_result_t dmutils_gridftp_delete(
00080 const char* file,
00081 char* errbuf,
00082 int errbufsz,
00083 int timeout);
00084
00092 globus_result_t dmutils_gridftp_make_dir(
00093 char* dir,
00094 char *errbuf,
00095 int errbufsz,
00096 int timeout);
00097
00098
00106 globus_result_t dmutils_gridftp_get_filesize(
00107 char const* file,
00108 globus_off_t* size,
00109 char* errbuf,
00110 int errbufsz,
00111 int timeout);
00112
00120 globus_result_t dmutils_gridftp_checksum(
00121 char const* file,
00122 char* cksm,
00123 char const* cksm_alg,
00124 char* errbuf,
00125 int errbufsz,
00126 int timeout);
00127
00135 globus_result_t dmutils_gridftp_copy(
00136 const char* source_url,
00137 const char* dest_url,
00138 char *errbuf,
00139 int errbufsz,
00140 int timeout,
00141 int const nbstreams,
00142 int const tcp_bs,
00143 int const block_size,
00144 int verbose,
00145 globus_gass_copy_handle_t *ggc_handle,
00146 void (*ggc_callback)(void *callback_arg, globus_gass_copy_handle_t *handle, globus_object_t *error),
00147 void * monitor_external,
00148 void (*globus_gass_copy_performance_cb_t_etx)(void *user_arg,
00149 globus_gass_copy_handle_t *handle,
00150 globus_off_t total_bytes,
00151 float instantaneous_throughput,
00152 float avg_throughput),
00153 void * check_external,
00154 int (*gridftp_copy_wait)(void * monitor, void * check, globus_gass_copy_handle_t *gfhp, int const timeout, void * iupdater),
00155 void * iupdater);
00156
00157
00165 char* dmutils_gridftp_error_to_string(
00166 globus_object_t* errobj);
00167
00168
00169
00170
00171
00172 #ifdef __cplusplus
00173 }
00174 #endif // __cplusplus
00175
00176
00177
00178
00179
00180 #endif //_GRIDFTP_IFCE_INCLUDE_h
00181