globus_connect_gridftp_server
15.86
|
Typedefs | |
typedef globus_result_t(* | globus_dsi_rest_response_t) (void *response_callback_arg, int response_code, const char *response_status, const globus_dsi_rest_key_array_t *response_headers) |
Response Callback Signature. More... | |
typedef globus_result_t(* | globus_dsi_rest_write_t) (void *write_callback_arg, void *buffer, size_t buffer_length, size_t *amount_copied) |
Data Write Callback Signature. More... | |
typedef globus_result_t(* | globus_dsi_rest_read_t) (void *read_callback_arg, void *buffer, size_t buffer_length) |
Data Read Callback Signature. More... | |
typedef void(* | globus_dsi_rest_complete_t) (void *complete_callback_arg, globus_result_t result) |
Request Complete Callback Signature. More... | |
typedef globus_result_t(* | globus_dsi_rest_progress_t) (void *progress_callback_arg, uint64_t total_read, uint64_t amt_read, uint64_t total_written, uint64_t amt_written) |
Request Progress Callback Signature. More... | |
typedef void(* globus_dsi_rest_complete_t) (void *complete_callback_arg, globus_result_t result) |
Request Complete Callback Signature.
This is the type signature for the callback to be called upon completion of processing an entire REST request.
This function is called once after all other callbacks related to the request have returned and includes the final status of the request.
[in] | complete_callback_arg | DSI-specific data passed to the request operation. |
[in] | result | The final status of the request. |
typedef globus_result_t(* globus_dsi_rest_progress_t) (void *progress_callback_arg, uint64_t total_read, uint64_t amt_read, uint64_t total_written, uint64_t amt_written) |
Request Progress Callback Signature.
This is the type signature for the callback to be called periodically during processing a REST request.
This function is called regularly to provide progress information for a request. This may be useful for providing application feedback, or for checking for idle timeouts.
Below is one specialized implementation of this function to cover the common case of an idle timeout.
[in] | progress_callback_arg | DSI-specific data passed to the request operation. |
[in] | total_read | Total amount of data expected to be read during processing this request if known, otherwise 0. |
[in] | amt_read | Amount of data read so far processing this request. |
[in] | total_written | Total amount of data expected to be writte during processing this request if known, otherwise 0. |
[in] | amt_written | Amount of data written so far processing this request. |
typedef globus_result_t(* globus_dsi_rest_read_t) (void *read_callback_arg, void *buffer, size_t buffer_length) |
Data Read Callback Signature.
This is the type signature for the callback to read data FROM the REST server (i.e., to read the body of a reply from a server). This is typically needed for GET, POST, or PATCH requests.
This function is called repeatedly by the DSI REST Helper API to send a part of the data from the REST server, until the function returns an error or there is no more data. In a non-error situation, the final call to this function will be with a buffer_length of 0.
Below are some specialized implementations of this function to cover some common cases for clients (such as receiving a json response, and pushing data from a REST response to a GridFTP control channel for a DSI operation).
[in] | read_callback_arg | DSI-specific data passed to the request operation. |
[in,out] | buffer | A buffer provided by the DSI REST API. The DSI processes the REST payload data from this buffer. |
[in] | buffer_length | The amount of the array pointed to by the buffer parameter. The final time this is called for a particular operation, the value is 0. |
typedef globus_result_t(* globus_dsi_rest_response_t) (void *response_callback_arg, int response_code, const char *response_status, const globus_dsi_rest_key_array_t *response_headers) |
Response Callback Signature.
This is the type signature for the response callback. The response callback is called called by the request processor when it receives the HTTP response code, status, and headers. This is called after the request body is sent in the write callbacks, and before the response body is received and parsed in the read callbacks.
[in] | response_callback_arg | DSI-specific callback argument. |
[in] | response_code | HTTP response code. This is typically a 3 digit number (200, 404, etc), but may be the special value 0 in the case of a protocol error. |
[in] | response_status | HTTP response status. This is typically a short string like ("Ok", "Continue", "Not Found", etc). |
[in] | response_headers | The set of headers included in the response. |
typedef globus_result_t(* globus_dsi_rest_write_t) (void *write_callback_arg, void *buffer, size_t buffer_length, size_t *amount_copied) |
Data Write Callback Signature.
This is the type signature for the callback to write data TO the REST server (i.e., to send the body of a request to a server). This is typically needed for POST, PATCH, or PUT requests.
This function is called repeatedly by the DSI REST Helper API to send a part of the data to the REST server, until the function returns an error or sets the value pointed to by amount_copied to 0.
Below are some specialized implementations of this function to cover some common cases for clients (such as sending data from a GridFTP control channel for a DSI operation).
[in] | write_callback_arg | DSI-specific data passed to the request operation. |
[in,out] | buffer | A buffer provided by the DSI REST API. The DSI copies REST payload data into this buffer. |
[in] | buffer_length | The length of the array pointed to by the buffer parameter. |
[out] | amount_copied | The amount of data copied into buffer by this call. The DSI may set this to 0 to signal end of file. |