Loading...
Searching...
No Matches
globus_i_gass_copy.h
/*
* Copyright 1999-2006 University of Chicago
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef GLOBUS_I_GASS_COPY_H
#define GLOBUS_I_GASS_COPY_H
#ifndef GLOBUS_DONT_DOCUMENT_INTERNAL
#include "globus_gass_copy.h"
#include "globus_common.h"
#include "globus_error_string.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum
{
GLOBUS_I_GASS_COPY_TARGET_INITIAL,
GLOBUS_I_GASS_COPY_TARGET_READY,
GLOBUS_I_GASS_COPY_TARGET_DONE,
GLOBUS_I_GASS_COPY_TARGET_FAILED
} globus_i_gass_copy_target_status_t;
typedef enum
{
GLOBUS_I_GASS_COPY_CANCEL_FALSE,
GLOBUS_I_GASS_COPY_CANCEL_TRUE,
GLOBUS_I_GASS_COPY_CANCEL_CALLED
} globus_i_gass_copy_cancel_status_t;
typedef struct
{
globus_byte_t * bytes;
globus_size_t nbytes;
globus_off_t offset;
globus_bool_t last_data;
} globus_i_gass_copy_buffer_t;
typedef struct
{
globus_mutex_t mutex;
globus_cond_t cond;
volatile globus_bool_t done;
globus_bool_t use_err;
globus_object_t * err;
} globus_i_gass_copy_monitor_t;
typedef struct globus_i_gass_copy_cancel_s
{
/*
* the gass copy handle
*/
globus_gass_copy_handle_t * handle;
/*
* Indicates which side of the transfer to cancel
* If TRUE then cancelling the source otherwise the destination.
*/
globus_bool_t canceling_source;
} globus_i_gass_copy_cancel_t;
typedef struct globus_i_gass_copy_state_target_s
{
char * url;
globus_gass_copy_attr_t * attr;
/* If the attr was passed as an argument then FALSE
* If the attr was created internally then TRUE
*/
globus_bool_t free_attr;
globus_bool_t free_ftp_attr;
globus_mutex_t mutex;
globus_fifo_t queue;
int n_pending;
int n_simultaneous;
int n_complete;
globus_i_gass_copy_target_status_t status;
globus_gass_copy_url_mode_t mode;
union
{
struct /* GLOBUS_I_GASS_COPY_TARGET_MODE_FTP */
{
/* FIXX - not sure that any of this is needed
* same as n_simultaneous and n_pending, and there's
* already an ftp_handle in the copy_handle
*/
globus_ftp_client_handle_t * handle;
globus_bool_t completed;
int n_channels;
int n_reads_posted;
globus_object_t * data_err;
} ftp;
struct /* GLOBUS_I_GASS_COPY_TARGET_MODE_GASS */
{
globus_gass_transfer_request_t request;
} gass;
struct /* GLOBUS_I_GASS_COPY_TARGET_MODE_IO */
{
globus_io_handle_t * handle;
globus_bool_t free_handle;
globus_bool_t seekable;
} io;
} data;
} globus_i_gass_copy_target_t;
struct globus_gass_copy_state_s
{
globus_i_gass_copy_target_t source;
globus_i_gass_copy_target_t dest;
globus_bool_t active;
globus_i_gass_copy_monitor_t monitor;
/*
* total number of read/write buffers that can be used at a time
*/
int max_buffers;
/*
* number of buffers that have been allocated for reading/writing
*/
int n_buffers;
globus_mutex_t mutex;
globus_i_gass_copy_cancel_status_t cancel;
struct globus_gass_copy_handle_s *cksm_handle;
char *checksum;
char *algorithm;
};
globus_result_t
globus_i_gass_copy_state_new(
globus_gass_copy_handle_t *handle);
#ifdef __cplusplus
}
#endif
#endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */
#endif /* GLOBUS_I_GASS_COPY_H */
globus_gass_copy.h
GASS Copy Library.
globus_gass_copy_url_mode_t
globus_gass_copy_url_mode_t
URL Modes.
Definition globus_gass_copy.h:188
globus_gass_copy_attr_t
struct globus_gass_copy_attr_s globus_gass_copy_attr_t
Attributes.