.TH "globus_gass_transfer_request" 3 "Tue Jul 5 2022" "Version 9.4" "globus_gass_transfer" \" -*- nroff -*- .ad l .nh .SH NAME globus_gass_transfer_request \- Request Handles .PP \- Request Handles\&. .SH SYNOPSIS .br .PP .SS "Data Structures" .in +1c .ti -1c .RI "struct \fBglobus_gass_transfer_request_t\fP" .br .RI "Request handle\&. " .in -1c .SS "Enumerations" .in +1c .ti -1c .RI "enum \fBglobus_gass_transfer_request_type_t\fP { \fBGLOBUS_GASS_TRANSFER_REQUEST_TYPE_INVALID\fP, \fBGLOBUS_GASS_TRANSFER_REQUEST_TYPE_GET\fP, \fBGLOBUS_GASS_TRANSFER_REQUEST_TYPE_PUT\fP, \fBGLOBUS_GASS_TRANSFER_REQUEST_TYPE_APPEND\fP }" .br .ti -1c .RI "enum \fBglobus_gass_transfer_request_status_t\fP { \fBGLOBUS_GASS_TRANSFER_REQUEST_INVALID\fP, \fBGLOBUS_GASS_TRANSFER_REQUEST_STARTING\fP, \fBGLOBUS_GASS_TRANSFER_REQUEST_PENDING\fP, \fBGLOBUS_GASS_TRANSFER_REQUEST_FAILED\fP, \fBGLOBUS_GASS_TRANSFER_REQUEST_REFERRED\fP, \fBGLOBUS_GASS_TRANSFER_REQUEST_DENIED\fP, \fBGLOBUS_GASS_TRANSFER_REQUEST_DONE\fP }" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBglobus_gass_transfer_request_type_t\fP \fBglobus_gass_transfer_request_get_type\fP (\fBglobus_gass_transfer_request_t\fP request)" .br .ti -1c .RI "void * \fBglobus_gass_transfer_request_get_user_pointer\fP (\fBglobus_gass_transfer_request_t\fP request)" .br .ti -1c .RI "int \fBglobus_gass_transfer_request_set_user_pointer\fP (\fBglobus_gass_transfer_request_t\fP request, void *user_pointer)" .br .ti -1c .RI "\fBglobus_gass_transfer_request_status_t\fP \fBglobus_gass_transfer_request_get_status\fP (\fBglobus_gass_transfer_request_t\fP request)" .br .ti -1c .RI "int \fBglobus_gass_transfer_request_get_referral\fP (\fBglobus_gass_transfer_request_t\fP request, globus_gass_transfer_referral_t *referral)" .br .ti -1c .RI "char * \fBglobus_gass_transfer_request_get_url\fP (\fBglobus_gass_transfer_request_t\fP request)" .br .ti -1c .RI "globus_size_t \fBglobus_gass_transfer_request_get_length\fP (\fBglobus_gass_transfer_request_t\fP request)" .br .ti -1c .RI "int \fBglobus_gass_transfer_request_set_type\fP (\fBglobus_gass_transfer_request_t\fP request, \fBglobus_gass_transfer_request_type_t\fP type)" .br .ti -1c .RI "int \fBglobus_gass_transfer_request_set_url\fP (\fBglobus_gass_transfer_request_t\fP request, char *url)" .br .ti -1c .RI "void \fBglobus_gass_transfer_request_set_length\fP (\fBglobus_gass_transfer_request_t\fP request, globus_size_t length)" .br .ti -1c .RI "int \fBglobus_gass_transfer_request_get_denial_reason\fP (\fBglobus_gass_transfer_request_t\fP request)" .br .ti -1c .RI "char * \fBglobus_gass_transfer_request_get_denial_message\fP (\fBglobus_gass_transfer_request_t\fP request)" .br .ti -1c .RI "char * \fBglobus_gass_transfer_request_get_subject\fP (\fBglobus_gass_transfer_request_t\fP request)" .br .ti -1c .RI "int \fBglobus_gass_transfer_request_destroy\fP (\fBglobus_gass_transfer_request_t\fP request)" .br .in -1c .SH "Detailed Description" .PP Request Handles\&. Request Handles .PP Request handles are used by the GASS Transfer API to associate operations with a single file transfer request\&. Specifically, they are used to register multiple byte range buffers with a file transfer request, and to query the state of a transfer in-progress\&. .PP To implement a server, the request handle is populated by the protocol module implementation\&. The server may use the functions in this section to determine information about what the client is requesting\&. .PP To implement a client, the request handle should be queried after the blocking call or initial callback has been invoked to determine if the request has been authorized or referred, and after EOF, to determine whether the request has completed successfully\&. .PP A request handle contains a pointer which may be used by the handler of the request to store a pointer to arbitrary application-specific data\&. .SH "Enumeration Type Documentation" .PP .SS "enum \fBglobus_gass_transfer_request_status_t\fP" Request Status .PP \fBEnumerator\fP .in +1c .TP \fB\fIGLOBUS_GASS_TRANSFER_REQUEST_INVALID \fP\fP Handle is no longer valid .TP \fB\fIGLOBUS_GASS_TRANSFER_REQUEST_STARTING \fP\fP Initial connection and authorization is not yet completed .TP \fB\fIGLOBUS_GASS_TRANSFER_REQUEST_PENDING \fP\fP Request is authorized\&. .TP \fB\fIGLOBUS_GASS_TRANSFER_REQUEST_FAILED \fP\fP Request failed due to protocol error or client or server aborting the request .TP \fB\fIGLOBUS_GASS_TRANSFER_REQUEST_REFERRED \fP\fP Request can not be processed by this server, referred to another URL or URLs .TP \fB\fIGLOBUS_GASS_TRANSFER_REQUEST_DENIED \fP\fP The server denied this request .TP \fB\fIGLOBUS_GASS_TRANSFER_REQUEST_DONE \fP\fP All callbacks have completed .SS "enum \fBglobus_gass_transfer_request_type_t\fP" Type of operation associated with a request handle\&. .PP \fBEnumerator\fP .in +1c .TP \fB\fIGLOBUS_GASS_TRANSFER_REQUEST_TYPE_INVALID \fP\fP Handle no longer valid .TP \fB\fIGLOBUS_GASS_TRANSFER_REQUEST_TYPE_GET \fP\fP A get request .TP \fB\fIGLOBUS_GASS_TRANSFER_REQUEST_TYPE_PUT \fP\fP A put request .TP \fB\fIGLOBUS_GASS_TRANSFER_REQUEST_TYPE_APPEND \fP\fP An append request .SH "Function Documentation" .PP .SS "int globus_gass_transfer_request_destroy (\fBglobus_gass_transfer_request_t\fP request)" Destroy a request handle\&. .PP This function destroys the caller's reference to a request handle\&. It must be called for all request handles which are created by calling functions in the '@ref globus_gass_transfer_client' or '@ref globus_gass_transfer_server' sections of this manual\&. After calling the function, the caller must not attempt to use the request handle for any purpose\&. .PP \fBParameters\fP .RS 4 \fIrequest\fP The request to destroy\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP The request handle reference was successfully destroyed\&. .br \fIGLOBUS_GASS_TRANSFER_ERROR_INVALID_USE\fP Either an invalid request handle or one which is actively being used was passed to this function as the \fIrequest\fP parameter\&. .RE .PP .SS "char* globus_gass_transfer_request_get_denial_message (\fBglobus_gass_transfer_request_t\fP request)" Get an string describing why a request was denied\&. .PP This function queries a request which was denied by a server to determine why it was denied\&. The denial reason will be expressed as a response string\&. The string must be freed by the caller\&. .PP \fBParameters\fP .RS 4 \fIrequest\fP A handle to the request to query\&. .RE .PP \fBReturns\fP .RS 4 A string indicating why the request was denied\&. If the request handle is invalid or the request was not denied, then this function returns GLOBUS_NULL\&. .RE .PP \fBSee also\fP .RS 4 \fBglobus_gass_transfer_request_get_denial_reason()\fP .RE .PP .SS "int globus_gass_transfer_request_get_denial_reason (\fBglobus_gass_transfer_request_t\fP request)" Get an integer code describing why the request was denied\&. .PP This function queries a request which was denied by a server to determine why it was denied\&. The denial reason will be expressed in a protocol-specific response code\&. Knowledge of the protocol is needed to understand this response\&. .PP \fBParameters\fP .RS 4 \fIrequest\fP A handle to the request to query\&. .RE .PP \fBReturns\fP .RS 4 A protocol-specific integer indicating why the request was denied\&. If the request handle is invalid or the request was not denied, then this function returns 0\&. .RE .PP \fBSee also\fP .RS 4 \fBglobus_gass_transfer_request_get_denial_message()\fP .RE .PP .SS "globus_size_t globus_gass_transfer_request_get_length (\fBglobus_gass_transfer_request_t\fP request)" Get the length of a file to be transferred using GASS\&. .PP This function queries the request handle to determine the amount of data that will be transferred to copy the URL\&. The length may be \fIGLOBUS_GASS_TRANSFER_LENGTH_UNKNOWN\fP if the sender can not determine the length before making or authorizing the request\&. .PP \fBParameters\fP .RS 4 \fIrequest\fP The request to query\&. .RE .PP \fBReturns\fP .RS 4 The length of the file located at the request's URL, or \fIGLOBUS_GASS_TRANSFER_LENGTH_UNKNOWN\fP if that cannot be determined\&. .RE .PP .SS "int globus_gass_transfer_request_get_referral (\fBglobus_gass_transfer_request_t\fP request, globus_gass_transfer_referral_t * referral)" Extract referral information from a request handle\&. .PP This function queries the request handle to determine any referral information that it contains\&. This function should only be called on request handles in the GLOBUS_GASS_TRANSFER_REQUEST_REFERRED state\&. If no referral information is stored in the request handle, then the referral will be initialized to an empty referral\&. The referral must be destroyed by calling \fBglobus_gass_transfer_referral_destroy()\fP by the caller\&. .PP \fBParameters\fP .RS 4 \fIrequest\fP The request handle to query\&. .br \fIreferral\fP A pointer to an uninitialized referral structure\&. It will be populated by calling this function\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP The referral was successfully extracted from the request handle\&. .br \fIGLOBUS_GASS_TRANSFER_ERROR_NULL_POINTER\fP The referral pointer was GLOBUS_NULL; .RE .PP .SS "\fBglobus_gass_transfer_request_status_t\fP globus_gass_transfer_request_get_status (\fBglobus_gass_transfer_request_t\fP request)" Check the status of a request\&. .PP This function queries a request to determine the status of the request\&. This function should be called after EOF has been reached, or after the initial get, put, or append has returned or had it's callback function called to determine if it is possible to proceed, or whether the file transfer was successfully processed\&. .PP \fBParameters\fP .RS 4 \fIrequest\fP The request handle to query\&. .RE .PP \fBReturns\fP .RS 4 A \fBglobus_gass_transfer_request_status_t\fP indicating the current status of the request\&. .RE .PP .SS "char* globus_gass_transfer_request_get_subject (\fBglobus_gass_transfer_request_t\fP request)" Get the subject string associated with a request\&. .PP This function queries a request handle to determine the subject identity of the client who initiated the request\&. The string must not be freed by the caller\&. .PP \fBParameters\fP .RS 4 \fIrequest\fP A handle to the request to query\&. .RE .PP \fBReturns\fP .RS 4 A string containing the request initiator's subject identity\&. If the request handle is invalid or a credential was not used to initiate the request, this value will be GLOBUS_NULL\&. .RE .PP .SS "\fBglobus_gass_transfer_request_type_t\fP globus_gass_transfer_request_get_type (\fBglobus_gass_transfer_request_t\fP request)" Determine the type of a request\&. .PP This function is used by GASS server implementations to discover what type of operation the client is requesting for an URL\&. .PP \fBParameters\fP .RS 4 \fIrequest\fP The request to query\&. .RE .PP \fBReturns\fP .RS 4 The \fBtype\fP of the request\&. .RE .PP .SS "char* globus_gass_transfer_request_get_url (\fBglobus_gass_transfer_request_t\fP request)" Get the URL from a request handle\&. .PP This function queries the request handle to determine the URL associated with the request\&. This function is intended to be useful to GASS server implementors\&. .PP \fBParameters\fP .RS 4 \fIrequest\fP The request handle to query\&. .RE .PP \fBReturns\fP .RS 4 A pointer to the URL, or GLOBUS_NULL if the request handle is invalid\&. The string which is returned must not be freed by the caller\&. It may not be accessed after the request has been destroyed\&. .RE .PP .SS "void* globus_gass_transfer_request_get_user_pointer (\fBglobus_gass_transfer_request_t\fP request)" Get the user pointer associated with a request .PP This function extracts the user pointer from a request handle\&. The user-pointer may be used by the application which is generating or servicing the request to store a pointer to any application-specific piece of data\&. .PP \fBParameters\fP .RS 4 \fIrequest\fP The request to query\&. .RE .PP \fBReturns\fP .RS 4 The user pointer's value\&. .RE .PP .SS "void globus_gass_transfer_request_set_length (\fBglobus_gass_transfer_request_t\fP request, globus_size_t length)" Set the length of a transfer associated request handle\&. .PP This function modifies the given request handle so that it's length field is set to give length parameter\&. .PP This function must only be called by protocol modules when constructing a request handle when receiving the response to a get request\&. This function can only be called once per request handle\&. .PP \fBParameters\fP .RS 4 \fIrequest\fP A handle to the request to modify\&. .br \fIlength\fP The length of the file request\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP The URL was set for the request handle\&. .br \fIGLOBUS_GASS_TRANSFER_ERROR_INVALID_USE\fP The request handle was invalid, or the URL had already been set\&. .RE .PP .SS "int globus_gass_transfer_request_set_type (\fBglobus_gass_transfer_request_t\fP request, \fBglobus_gass_transfer_request_type_t\fP type)" Set the type of a request\&. .PP This function modifies a request handle by setting the type of operation that it is being used for\&. This function may only be called once per handle, and only from a GASS protocol module implementation\&. .PP \fBParameters\fP .RS 4 \fIrequest\fP The request handle to modify\&. .br \fItype\fP The type of operation that this request handle will be used for\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP The request handle's type has been set\&. .br \fIGLOBUS_GASS_TRANSFER_ERROR_INVALID_USE\fP The request handle was invalid or it's type was already set\&. The request handle was not modified\&. .RE .PP \fBNote\fP .RS 4 Only GASS Protocol modules may call this function\&. .RE .PP .SS "int globus_gass_transfer_request_set_url (\fBglobus_gass_transfer_request_t\fP request, char * url)" Set the URL to which a request handle refers\&. .PP This function modifies the given request handle so that it's URL field is set to string pointed to by \fIurl\fP\&. .PP No copy is made of the string, so the caller must not free it\&. It must be allocated by calling one of the memory allocators in globus_libc, as it will be freed when the request handle is destroyed\&. .PP This function must only be called by protocol modules when constructing a request handle when accepting a new request\&. This function can only be called once per request handle\&. .PP \fBParameters\fP .RS 4 \fIrequest\fP A handle to the request to modify\&. .br \fIurl\fP A string containing the URL that this request will be associated with\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP The URL was set for the request handle\&. .br \fIGLOBUS_GASS_TRANSFER_ERROR_INVALID_USE\fP The request handle was invalid, or the URL had already been set\&. .RE .PP .SS "int globus_gass_transfer_request_set_user_pointer (\fBglobus_gass_transfer_request_t\fP request, void * user_pointer)" Set the user pointer associated with a request handle\&. .PP This function sets the user pointer from a request handle\&. The user-pointer may be used by the application which is generating or servicing the request to store a pointer to any application-specific piece of data\&. .PP \fBParameters\fP .RS 4 \fIrequest\fP The request to modify\&. .br \fIuser_pointer\fP The new value of the user pointer for the request\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCES\fP The user pointer's value was set\&. .br \fIGLOBUS_GASS_TRANSFER_ERROR_INVALID_USE\fP An invalid request handle was passed to this function .RE .PP .SH "Author" .PP Generated automatically by Doxygen for globus_gass_transfer from the source code\&.