.TH "globus_gram_protocol_unpack" 3 "Fri Nov 11 2016" "Version 12.15" "globus_gram_protocol" \" -*- nroff -*- .ad l .nh .SH NAME globus_gram_protocol_unpack \- Message Unpacking .SS "Functions" .in +1c .ti -1c .RI "int \fBglobus_gram_protocol_unpack_job_request\fP (const globus_byte_t *query, globus_size_t querysize, int *job_state_mask, char **callback_url, char **description)" .br .RI "Unpack a GRAM Job Request\&. " .ti -1c .RI "int \fBglobus_gram_protocol_unpack_job_request_reply\fP (const globus_byte_t *reply, globus_size_t replysize, int *status, char **job_contact)" .br .RI "Unpack a GRAM reply message\&. " .ti -1c .RI "int \fBglobus_gram_protocol_unpack_job_request_reply_with_extensions\fP (const globus_byte_t *reply, globus_size_t replysize, int *status, char **job_contact, globus_hashtable_t *extensions)" .br .RI "Unpack a GRAM reply message, parsing all extensions\&. " .ti -1c .RI "int \fBglobus_gram_protocol_unpack_status_request\fP (const globus_byte_t *query, globus_size_t querysize, char **status_request)" .br .RI "Unpack a GRAM query message\&. " .ti -1c .RI "int \fBglobus_gram_protocol_unpack_status_reply\fP (const globus_byte_t *reply, globus_size_t replysize, int *job_status, int *failure_code, int *job_failure_code)" .br .RI "Unpack a GRAM query reply\&. " .ti -1c .RI "int \fBglobus_gram_protocol_unpack_status_reply_with_extensions\fP (const globus_byte_t *reply, globus_size_t replysize, globus_hashtable_t *extensions)" .br .RI "Unpack a GRAM query reply with extensions\&. " .ti -1c .RI "int \fBglobus_gram_protocol_unpack_status_update_message\fP (const globus_byte_t *reply, globus_size_t replysize, char **job_contact, int *status, int *failure_code)" .br .RI "Unpack a GRAM status update message\&. " .ti -1c .RI "int \fBglobus_gram_protocol_unpack_status_update_message_with_extensions\fP (const globus_byte_t *reply, globus_size_t replysize, globus_hashtable_t *extensions)" .br .RI "Unpack a GRAM status update message with extensions\&. " .ti -1c .RI "void \fBglobus_gram_protocol_hash_destroy\fP (globus_hashtable_t *message_hash)" .br .in -1c .SH "Detailed Description" .PP .SH "Function Documentation" .PP .SS "void globus_gram_protocol_hash_destroy (globus_hashtable_t * message_hash)" Destroy message attribute hash .PP \fBParameters:\fP .RS 4 \fImessage_hash\fP Hashtable of globus_gram_protocol_extension_t * values to destroy .RE .PP .SS "int globus_gram_protocol_unpack_job_request (const globus_byte_t * query, globus_size_t querysize, int * job_state_mask, char ** callback_url, char ** description)" .PP Unpack a GRAM Job Request\&. The \fBglobus_gram_protocol_unpack_job_request()\fP function parses the job request message packed in the \fIquery\fP message and returns copies of the standard message attributes in the \fIjob_state_mask\fP, \fIcallback_url\fP, and \fIdescription\fP parameters\&. .PP \fBParameters:\fP .RS 4 \fIquery\fP The unframed job request message to parse\&. .br \fIquerysize\fP The length of the job request message string\&. .br \fIjob_state_mask\fP A pointer to an integer to be set to the job state mask from the job request\&. .br \fIcallback_url\fP A pointer to be set with a copy of the URL of the callback contact to be registered for this job request\&. The caller must free this memory by calling free()\&. .br \fIdescription\fP A pointer to be set to a copy of the job description RSL string for this job request\&. The caller must free this memory by calling free()\&. .RE .PP \fBReturns:\fP .RS 4 Upon success, \fBglobus_gram_protocol_unpack_job_request()\fP will return \fIGLOBUS_SUCCESS\fP and modify the \fIjob_state_mask\fP, \fIcallback_url\fP, and \fIdescription\fP parameters to values extracted from the message in \fIquery\fP\&. If an error occurs, an integer error code will be returned and the values of \fIjob_state_mask\fP, \fIcallback_url\fP, and \fIdescription\fP will be undefined\&. .RE .PP \fBReturn values:\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETER\fP Null parameter .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED\fP Unpack failed .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH\fP Version mismatch .RE .PP .SS "int globus_gram_protocol_unpack_job_request_reply (const globus_byte_t * reply, globus_size_t replysize, int * status, char ** job_contact)" .PP Unpack a GRAM reply message\&. The \fBglobus_gram_protocol_unpack_job_request_reply()\fP function parses the reply message packed in the \fIreply\fP message and returns copies of the standard message attributes in the \fIstatus\fP and \fIjob_contact\fP parameters\&. .PP \fBParameters:\fP .RS 4 \fIreply\fP The unframed job reply message to parse\&. .br \fIreplysize\fP The length of the reply string\&. .br \fIstatus\fP A pointer to an integer to be set to the failure code associated with the job request\&. This may be GLOBUS_SUCCESS, if the job request was successful\&. .br \fIjob_contact\fP A pointer to a string to be set to the job contact string\&. This may set to NULL if the job request failed\&. If \fBglobus_gram_protocol_unpack_job_request_reply()\fP returns GLOBUS_SUCCESS, then the caller must free this string using free()\&. .RE .PP \fBReturns:\fP .RS 4 Upon success, \fBglobus_gram_protocol_unpack_job_request_reply()\fP returns \fIGLOBUS_SUCCESS\fP and modifies the \fIstatus\fP and \fIjob_contact\fP parameters to point to the values described above\&. If an error occurs, an integer error code is returned and the values pointed to by \fIstatus\fP and \fIjob_contact\fP are undefined\&. .RE .PP \fBReturn values:\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAN_PROTOCOL_ERROR_NULL_PARAMETER\fP Null parameter .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED\fP Unpack failed .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH\fP Version mismatch .RE .PP .SS "int globus_gram_protocol_unpack_job_request_reply_with_extensions (const globus_byte_t * reply, globus_size_t replysize, int * status, char ** job_contact, globus_hashtable_t * extensions)" .PP Unpack a GRAM reply message, parsing all extensions\&. The \fBglobus_gram_protocol_unpack_job_request_reply_with_extensions()\fP function parses the reply message packed in the \fIreply\fP message parameter and returns copies of the standard message attributes in the \fIstatus\fP and \fIjob_contact\fP parameters, and all other extension attributes in the hashtable pointed to by \fIextensions\fP\&. Each entry in the hashtable will be keyed by the attribute name and the value will be a pointer to a \fIglobus_gram_protocol_extension_t\fP structure\&. .PP \fBParameters:\fP .RS 4 \fIstatus\fP A pointer to an integer to be set to the failure code associated with the job request\&. This may be GLOBUS_SUCCESS, if the job request was successful\&. .br \fIjob_contact\fP A pointer to a string to be set to the job contact string\&. This may set to NULL if the job request failed\&. If \fBglobus_gram_protocol_unpack_job_request_reply_with_extensions()\fP returns GLOBUS_SUCCESS, then the caller must free this string using free()\&. .br \fIextensions\fP A pointer to be set to a hash table containing the names and values of all protocol extensions present in the response message\&. If \fBglobus_gram_protocol_unpack_job_request_reply_with_extensions()\fP returns GLOBUS_SUCCESS, the caller must free this hash table and its values by calling \fBglobus_gram_protocol_hash_destroy()\fP\&. .br \fIreply\fP The unframed job reply message to parse\&. .br \fIreplysize\fP The length of the reply string\&. .RE .PP \fBReturns:\fP .RS 4 Upon success, \fBglobus_gram_protocol_unpack_job_request_reply_with_extensions()\fP returns \fIGLOBUS_SUCCESS\fP and modifies the \fIstatus\fP, \fIjob_contact\fP, and \fIextensions\fP to point to the values described above\&. If an error occurs, an integer error code is returned and the values pointed to by \fIstatus\fP, \fIjob_contact\fP, and \fIextensions\fP are undefined\&. .RE .PP \fBReturn values:\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAN_PROTOCOL_ERROR_NULL_PARAMETER\fP Null parameter .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED\fP Unpack failed .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH\fP Version mismatch .RE .PP .SS "int globus_gram_protocol_unpack_status_reply (const globus_byte_t * reply, globus_size_t replysize, int * job_status, int * failure_code, int * job_failure_code)" .PP Unpack a GRAM query reply\&. The \fBglobus_gram_protocol_unpack_status_reply()\fP function parses the message packed in the \fIreply\fP parameter and sets the current job state, protocol failure code, and job failure code values in its output parameters\&. .PP \fBParameters:\fP .RS 4 \fIreply\fP The unframed reply message to parse\&. .br \fIreplysize\fP The length of the reply message\&. .br \fIjob_status\fP A pointer to an integer to be set to the job's current \fBjob state\fP\&. .br \fIfailure_code\fP A pointer to an integer to be set to the failure code associated with the query request\&. This may be GLOBUS_SUCCESS, if the request was successful\&. .br \fIjob_failure_code\fP A pointer to an integer to be set to the failure code for the job, if the \fIjob_status\fP is GLOBUS_GRAM_PROTOCOL_JOB_STATE_FAILED\&. .RE .PP \fBReturns:\fP .RS 4 Upon success, \fBglobus_gram_protocol_unpack_status_reply()\fP returns \fIGLOBUS_SUCCESS\fP and modifies the \fIjob_status\fP, \fIfailure_code\fP, and \fIjob_failure_code\fP parameters to point to the value described above\&. If an error occurs, an integer error code is returned and the values pointed to by \fIjob_status\fP, \fIfailure_code\fP, and \fIjob_failure_code\fP are undefined\&. .RE .PP \fBReturn values:\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED\fP Unpack failed .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH\fP Version mismatch .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETER\fP Null parameter .RE .PP .SS "int globus_gram_protocol_unpack_status_reply_with_extensions (const globus_byte_t * reply, globus_size_t replysize, globus_hashtable_t * extensions)" .PP Unpack a GRAM query reply with extensions\&. The \fBglobus_gram_protocol_unpack_status_reply_with_extensions()\fP function parses the message packed in the \fIreply\fP parameter, storing all attributes and values in a hash table\&. The \fIextensions\fP parameter is modified to point to that hash table\&. The caller of \fBglobus_gram_protocol_unpack_status_reply_with_extensions()\fP must free that hash table by calling \fBglobus_gram_protocol_hash_destroy()\fP\&. .PP \fBParameters:\fP .RS 4 \fIreply\fP The unframed reply message to parse\&. .br \fIreplysize\fP The length of the reply message\&. .br \fIextensions\fP A pointer to be set to a hash table containing the names and values of all protocol attributes present in the reply message\&. If \fBglobus_gram_protocol_unpack_status_reply_with_extensions()\fP returns GLOBUS_SUCCESS, the caller must free this hash table and its values by calling \fBglobus_gram_protocol_hash_destroy()\fP\&. .RE .PP \fBReturns:\fP .RS 4 Upon success, \fBglobus_gram_protocol_unpack_status_reply_with_extensions()\fP returns \fIGLOBUS_SUCCESS\fP and modifies the \fIextensions\fP parameter to point to the value described above\&. If an error occurs, an integer error code is returned and the value pointed to by \fIextensions\fP is undefined\&. .RE .PP \fBReturn values:\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED\fP Unpack failed .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH\fP Version mismatch .RE .PP .SS "int globus_gram_protocol_unpack_status_request (const globus_byte_t * query, globus_size_t querysize, char ** status_request)" .PP Unpack a GRAM query message\&. The \fBglobus_gram_protocol_unpack_status_request()\fP function parses the message packed in the \fIquery\fP parameter and returns a copy of the message in the \fIstatus_request\fP parameter\&. .PP \fBParameters:\fP .RS 4 \fIquery\fP The unframed query message to parse\&. .br \fIquerysize\fP The length of the query string\&. .br \fIstatus_request\fP A pointer to a string to be set to the query value\&. The caller must free this string using free()\&. .RE .PP \fBReturns:\fP .RS 4 Upon success, \fBglobus_gram_protocol_unpack_status_request()\fP returns \fIGLOBUS_SUCCESS\fP and modifies the \fIstatus_request\fP parameter to point to the value described above\&. If an error occurs, an integer error code is returned and the value pointed to by \fIstatus_request\fP is undefined\&. .RE .PP \fBReturn values:\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETER\fP Null parameter .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED\fP Unpack failed .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH\fP Version mismatch .RE .PP .SS "int globus_gram_protocol_unpack_status_update_message (const globus_byte_t * reply, globus_size_t replysize, char ** job_contact, int * status, int * failure_code)" .PP Unpack a GRAM status update message\&. The \fBglobus_gram_protocol_unpack_status_update_message()\fP function parses the message packed in the \fIreply\fP parameter, storing the standard message attribute values in its return parameters \fIjob_contact\fP, \fIstatus\fP, and \fIfailure_code\fP\&. The caller is responsible for freeing the \fIjob_contact\fP value\&. .PP \fBParameters:\fP .RS 4 \fIreply\fP The unframed reply message to parse\&. .br \fIreplysize\fP The length of the reply message\&. .br \fIjob_contact\fP An output parameter to be set to the job contact string\&. If \fBglobus_gram_protocol_unpack_status_update_message()\fP returns GLOBUS_SUCCESS, then the caller must free this string using free()\&. .br \fIstatus\fP An output parameter to be set to the integer value of the job's current \fBjob state\fP\&. .br \fIfailure_code\fP An output parameter to be set to the integer failure code for the job if the \fIjob_status\fP is GLOBUS_GRAM_PROTOCOL_JOB_STATE_FAILED\&. .RE .PP \fBReturns:\fP .RS 4 Upon success, \fBglobus_gram_protocol_unpack_status_update_message()\fP returns \fIGLOBUS_SUCCESS\fP and modifies the \fIjob_contact\fP, \fIstatus\fP, and \fIfailure_code\fP parameters as described above\&. If an error occurs, an integer error code is returned and the values pointed to by the \fIjob_contact\fP, \fIstatus\fP, and \fIfailure_code\fP parameters are undefined\&. .RE .PP \fBReturn values:\fP .RS 4 \fIGLOBUS_SUCCESS\fP Sucess .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETER\fP Null parameter .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED\fP Unpack failed .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH\fP Version mismatch .RE .PP .SS "int globus_gram_protocol_unpack_status_update_message_with_extensions (const globus_byte_t * reply, globus_size_t replysize, globus_hashtable_t * extensions)" .PP Unpack a GRAM status update message with extensions\&. The \fBglobus_gram_protocol_unpack_status_update_message_with_extensions()\fP function parses the message packed in the \fIreply\fP parameter, storing the message attribute values in its return parameter \fIextensions\fP\&. The caller is responsible for freeing the \fIextensions\fP hash table by calling \fBglobus_gram_protocol_hash_destroy()\fP\&. .PP \fBParameters:\fP .RS 4 \fIreply\fP The unframed reply message to parse\&. .br \fIreplysize\fP The length of the reply message\&. .br \fIextensions\fP An output parameter which will be initialized to a hashtable containing the message attributes\&. The caller must destroy this hashtable calling \fBglobus_gram_protocol_hash_destroy()\fP\&. .RE .PP \fBReturns:\fP .RS 4 Upon success, \fBglobus_gram_protocol_unpack_status_update_message_with_extensions()\fP returns \fIGLOBUS_SUCCESS\fP and modifies the \fIextensions\fP parameter as described above\&. If an error occurs, an integer error code is returned and the value pointed to by the \fIextensions\fP parameters is undefined\&. .RE .PP \fBReturn values:\fP .RS 4 \fIGLOBUS_SUCCESS\fP Sucess .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED\fP Unpack failed .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Malloc failed .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH\fP Version mismatch .RE .PP .SH "Author" .PP Generated automatically by Doxygen for globus_gram_protocol from the source code\&.