Loading...
Searching...
No Matches
globus_gass_transfer_proto.h
Go to the documentation of this file.
/*
* 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_GASS_PROTO_H
#define GLOBUS_GASS_PROTO_H
#include "globus_common.h"
#include "globus_gass_transfer.h"
#ifdef __cplusplus
"C" {
#endif
/* Module-specific types */
typedef struct globus_gass_transfer_request_proto_s
globus_gass_transfer_request_proto_t;
typedef struct globus_gass_transfer_listener_proto_s
globus_gass_transfer_listener_proto_t;
typedef void
(* globus_gass_transfer_proto_send_t)(
globus_gass_transfer_request_proto_t * proto,
globus_gass_transfer_request_t request,
globus_byte_t * bytes,
globus_size_t bytes_length,
globus_bool_t last_data);
typedef void
(* globus_gass_transfer_proto_receive_t)(
globus_gass_transfer_request_proto_t * proto,
globus_gass_transfer_request_t request,
globus_byte_t * bytes,
globus_size_t bytes_length,
globus_size_t wait_for_length);
typedef void
(* globus_gass_transfer_proto_func_t)(
globus_gass_transfer_request_proto_t * proto,
globus_gass_transfer_request_t request);
typedef void
(* globus_gass_transfer_proto_new_request_t)(
globus_gass_transfer_request_t request,
globus_gass_transfer_requestattr_t * attr);
typedef int
(* globus_gass_transfer_proto_create_listener_t)(
globus_gass_transfer_listener_t listener,
globus_gass_transfer_listenerattr_t * attr,
char * scheme,
char ** base_url,
globus_gass_transfer_listener_proto_t ** proto);
typedef void
(* globus_gass_transfer_proto_listener_t)(
globus_gass_transfer_listener_proto_t * proto,
globus_gass_transfer_listener_t listener);
typedef globus_object_t *
(* globus_gass_transfer_proto_new_attr_t)(
char * url_scheme);
typedef void
(* globus_gass_transfer_proto_accept_t)(
globus_gass_transfer_listener_proto_t * proto,
globus_gass_transfer_listener_t listener,
globus_gass_transfer_request_t request,
globus_gass_transfer_requestattr_t * attr);
struct globus_gass_transfer_request_proto_s
{
globus_gass_transfer_proto_send_t send_buffer;
globus_gass_transfer_proto_receive_t recv_buffer;
globus_gass_transfer_proto_func_t fail;
globus_gass_transfer_proto_func_t deny;
globus_gass_transfer_proto_func_t refer;
globus_gass_transfer_proto_func_t authorize;
globus_gass_transfer_proto_func_t destroy;
};
struct globus_gass_transfer_listener_proto_s
{
globus_gass_transfer_proto_listener_t close_listener;
globus_gass_transfer_proto_listener_t listen;
globus_gass_transfer_proto_accept_t accept;
globus_gass_transfer_proto_listener_t destroy;
};
typedef struct
{
char * url_scheme;
globus_gass_transfer_proto_new_attr_t new_requestattr;
globus_gass_transfer_proto_new_request_t new_request;
globus_gass_transfer_proto_new_attr_t new_listenerattr;
globus_gass_transfer_proto_create_listener_t new_listener;
} globus_gass_transfer_proto_descriptor_t;
#ifndef DOXYGEN
int
globus_gass_transfer_proto_register_protocol(
globus_gass_transfer_proto_descriptor_t * proto_desc);
int
globus_gass_transfer_proto_unregister_protocol(
globus_gass_transfer_proto_descriptor_t * proto_desc);
void
globus_gass_transfer_proto_request_ready(
globus_gass_transfer_request_t request,
globus_gass_transfer_request_proto_t * proto);
void
globus_gass_transfer_proto_request_denied(
globus_gass_transfer_request_t request,
int reason,
char * message);
void
globus_gass_transfer_proto_request_referred(
globus_gass_transfer_request_t request,
char ** url,
globus_size_t num_urls);
void
globus_gass_transfer_proto_new_listener_request(
globus_gass_transfer_listener_t listener,
globus_gass_transfer_request_t request,
globus_gass_transfer_request_proto_t * proto);
void
globus_gass_transfer_proto_send_complete(
globus_gass_transfer_request_t request,
globus_byte_t * bytes,
globus_size_t nbytes,
globus_bool_t failed,
globus_bool_t last_data);
void
globus_gass_transfer_proto_receive_complete(
globus_gass_transfer_request_t request,
globus_byte_t * bytes,
globus_size_t nbytes,
globus_bool_t failed,
globus_bool_t last_data);
void
globus_gass_transfer_proto_listener_ready(
globus_gass_transfer_listener_t listener);
/* Protocol Implementation Helper Functions */
/* implemented in globus_gass_transfer_text.c */
void
globus_gass_transfer_crlf_to_lf(
globus_byte_t * src,
globus_size_t src_len,
globus_byte_t ** dst,
globus_size_t * dst_len);
void
globus_gass_transfer_lf_to_crlf(
globus_byte_t * src,
globus_size_t src_len,
globus_byte_t ** dst,
globus_size_t * dst_len);
#endif
#ifdef __cplusplus
}
#endif
#endif /* GLOBUS_GASS_PROTO_H */
globus_gass_transfer.h
GASS transfer.
globus_gass_transfer_proto_send_t
void(* globus_gass_transfer_proto_send_t)(globus_gass_transfer_request_proto_t *proto, globus_gass_transfer_request_t request, globus_byte_t *bytes, globus_size_t bytes_length, globus_bool_t last_data)
Definition globus_gass_transfer_proto.h:123
globus_gass_transfer_proto_register_protocol
int globus_gass_transfer_proto_register_protocol(globus_gass_transfer_proto_descriptor_t *proto_desc)
Definition globus_gass_transfer_proto.c:261
globus_gass_transfer_proto_unregister_protocol
int globus_gass_transfer_proto_unregister_protocol(globus_gass_transfer_proto_descriptor_t *proto_desc)
Definition globus_gass_transfer_proto.c:309
globus_gass_transfer_proto_new_request_t
void(* globus_gass_transfer_proto_new_request_t)(globus_gass_transfer_request_t request, globus_gass_transfer_requestattr_t *attr)
Definition globus_gass_transfer_proto.h:223
globus_gass_transfer_proto_listener_ready
void globus_gass_transfer_proto_listener_ready(globus_gass_transfer_listener_t listener)
Definition globus_gass_transfer_proto.c:156
globus_gass_transfer_proto_listener_t
void(* globus_gass_transfer_proto_listener_t)(globus_gass_transfer_listener_proto_t *proto, globus_gass_transfer_listener_t listener)
Definition globus_gass_transfer_proto.h:290
globus_gass_transfer_proto_send_complete
void globus_gass_transfer_proto_send_complete(globus_gass_transfer_request_t request, globus_byte_t *bytes, globus_size_t nbytes, globus_bool_t failed, globus_bool_t last_data)
Definition globus_gass_transfer_proto.c:74
globus_gass_transfer_proto_new_listener_request
void globus_gass_transfer_proto_new_listener_request(globus_gass_transfer_listener_t listener, globus_gass_transfer_request_t request, globus_gass_transfer_request_proto_t *proto)
Definition globus_gass_transfer_proto.c:481
globus_gass_transfer_proto_request_ready
void globus_gass_transfer_proto_request_ready(globus_gass_transfer_request_t request, globus_gass_transfer_request_proto_t *proto)
Definition globus_gass_transfer_proto.c:354
globus_gass_transfer_proto_create_listener_t
int(* globus_gass_transfer_proto_create_listener_t)(globus_gass_transfer_listener_t listener, globus_gass_transfer_listenerattr_t *attr, char *scheme, char **base_url, globus_gass_transfer_listener_proto_t **proto)
Definition globus_gass_transfer_proto.h:265
globus_gass_transfer_proto_receive_complete
void globus_gass_transfer_proto_receive_complete(globus_gass_transfer_request_t request, globus_byte_t *bytes, globus_size_t nbytes, globus_bool_t failed, globus_bool_t last_data)
Definition globus_gass_transfer_proto.c:124
globus_gass_transfer_proto_request_referred
void globus_gass_transfer_proto_request_referred(globus_gass_transfer_request_t request, char **url, globus_size_t num_urls)
Definition globus_gass_transfer_proto.c:733
globus_gass_transfer_listener_proto_t
struct globus_gass_transfer_listener_proto_s globus_gass_transfer_listener_proto_t
Definition globus_gass_transfer_proto.h:88
globus_gass_transfer_proto_receive_t
void(* globus_gass_transfer_proto_receive_t)(globus_gass_transfer_request_proto_t *proto, globus_gass_transfer_request_t request, globus_byte_t *bytes, globus_size_t bytes_length, globus_size_t wait_for_length)
Definition globus_gass_transfer_proto.h:163
globus_gass_transfer_request_proto_t
struct globus_gass_transfer_request_proto_s globus_gass_transfer_request_proto_t
Definition globus_gass_transfer_proto.h:81
globus_gass_transfer_proto_func_t
void(* globus_gass_transfer_proto_func_t)(globus_gass_transfer_request_proto_t *proto, globus_gass_transfer_request_t request)
Definition globus_gass_transfer_proto.h:190
globus_gass_transfer_proto_new_attr_t
globus_object_t *(* globus_gass_transfer_proto_new_attr_t)(char *url_scheme)
Definition globus_gass_transfer_proto.h:321
globus_gass_transfer_proto_request_denied
void globus_gass_transfer_proto_request_denied(globus_gass_transfer_request_t request, int reason, char *message)
Definition globus_gass_transfer_proto.c:622
globus_gass_transfer_proto_accept_t
void(* globus_gass_transfer_proto_accept_t)(globus_gass_transfer_listener_proto_t *proto, globus_gass_transfer_listener_t listener, globus_gass_transfer_request_t request, globus_gass_transfer_requestattr_t *attr)
Definition globus_gass_transfer_proto.h:358
globus_gass_transfer_listener_proto_s
Protocol module listener handling structure.
Definition globus_gass_transfer_proto.h:433
globus_gass_transfer_listener_proto_s::destroy
globus_gass_transfer_proto_listener_t destroy
Definition globus_gass_transfer_proto.h:441
globus_gass_transfer_listener_proto_s::accept
globus_gass_transfer_proto_accept_t accept
Definition globus_gass_transfer_proto.h:439
globus_gass_transfer_listener_proto_s::close_listener
globus_gass_transfer_proto_listener_t close_listener
Definition globus_gass_transfer_proto.h:435
globus_gass_transfer_listener_proto_s::listen
globus_gass_transfer_proto_listener_t listen
Definition globus_gass_transfer_proto.h:437
globus_gass_transfer_proto_descriptor_t
Protocol module descriptor structure.
Definition globus_gass_transfer_proto.h:453
globus_gass_transfer_proto_descriptor_t::new_request
globus_gass_transfer_proto_new_request_t new_request
Definition globus_gass_transfer_proto.h:502
globus_gass_transfer_proto_descriptor_t::new_listenerattr
globus_gass_transfer_proto_new_attr_t new_listenerattr
Definition globus_gass_transfer_proto.h:515
globus_gass_transfer_proto_descriptor_t::url_scheme
char * url_scheme
Definition globus_gass_transfer_proto.h:469
globus_gass_transfer_proto_descriptor_t::new_requestattr
globus_gass_transfer_proto_new_attr_t new_requestattr
Definition globus_gass_transfer_proto.h:482
globus_gass_transfer_proto_descriptor_t::new_listener
globus_gass_transfer_proto_create_listener_t new_listener
Definition globus_gass_transfer_proto.h:535
globus_gass_transfer_request_proto_s
Protocol module request handling structure.
Definition globus_gass_transfer_proto.h:387
globus_gass_transfer_request_proto_s::recv_buffer
globus_gass_transfer_proto_receive_t recv_buffer
Definition globus_gass_transfer_proto.h:397
globus_gass_transfer_request_proto_s::deny
globus_gass_transfer_proto_func_t deny
Definition globus_gass_transfer_proto.h:411
globus_gass_transfer_request_proto_s::fail
globus_gass_transfer_proto_func_t fail
Definition globus_gass_transfer_proto.h:406
globus_gass_transfer_request_proto_s::destroy
globus_gass_transfer_proto_func_t destroy
Definition globus_gass_transfer_proto.h:424
globus_gass_transfer_request_proto_s::authorize
globus_gass_transfer_proto_func_t authorize
Definition globus_gass_transfer_proto.h:419
globus_gass_transfer_request_proto_s::refer
globus_gass_transfer_proto_func_t refer
Definition globus_gass_transfer_proto.h:415
globus_gass_transfer_request_proto_s::send_buffer
globus_gass_transfer_proto_send_t send_buffer
Definition globus_gass_transfer_proto.h:392
globus_gass_transfer_request_t
Request handle.