.TH "globus_gram_protocol_pack" 3 "Mon Dec 14 2020" "Version 13.4" "globus_gram_protocol" \" -*- nroff -*- .ad l .nh .SH NAME globus_gram_protocol_pack \- Message Packing .PP \- Message Packing\&. .SH SYNOPSIS .br .PP .SS "Functions" .in +1c .ti -1c .RI "int \fBglobus_gram_protocol_pack_job_request\fP (int job_state_mask, const char *callback_url, const char *rsl, globus_byte_t **query, globus_size_t *querysize)" .br .RI "Pack a GRAM Job Request\&. " .ti -1c .RI "int \fBglobus_gram_protocol_pack_job_request_reply\fP (int status, const char *job_contact, globus_byte_t **reply, globus_size_t *replysize)" .br .RI "Pack a GRAM reply message\&. " .ti -1c .RI "int \fBglobus_gram_protocol_pack_job_request_reply_with_extensions\fP (int status, const char *job_contact, globus_hashtable_t *extensions, globus_byte_t **reply, globus_size_t *replysize)" .br .RI "Pack a GRAM reply message with extension attributes\&. " .ti -1c .RI "int \fBglobus_gram_protocol_pack_status_request\fP (const char *status_request, globus_byte_t **query, globus_size_t *querysize)" .br .RI "Pack a GRAM query message\&. " .ti -1c .RI "int \fBglobus_gram_protocol_pack_status_reply\fP (int job_status, int failure_code, int job_failure_code, globus_byte_t **reply, globus_size_t *replysize)" .br .RI "Pack a GRAM query reply message\&. " .ti -1c .RI "int \fBglobus_gram_protocol_pack_status_reply_with_extensions\fP (int job_status, int failure_code, int job_failure_code, globus_hashtable_t *extensions, globus_byte_t **reply, globus_size_t *replysize)" .br .RI "Pack a GRAM query reply message with extensions\&. " .ti -1c .RI "int \fBglobus_gram_protocol_pack_status_update_message\fP (char *job_contact, int status, int failure_code, globus_byte_t **reply, globus_size_t *replysize)" .br .RI "Pack a GRAM status update message\&. " .ti -1c .RI "int \fBglobus_gram_protocol_pack_status_update_message_with_extensions\fP (char *job_contact, int status, int failure_code, globus_hashtable_t *extensions, globus_byte_t **reply, globus_size_t *replysize)" .br .RI "Pack a GRAM status update message with extensions\&. " .ti -1c .RI "int \fBglobus_gram_protocol_pack_version_request\fP (char **request, size_t *requestsize)" .br .RI "Pack a GRAM version request message\&. " .in -1c .SH "Detailed Description" .PP Message Packing\&. .SH "Function Documentation" .PP .SS "int globus_gram_protocol_pack_job_request (int job_state_mask, const char * callback_url, const char * rsl, globus_byte_t ** query, globus_size_t * querysize)" .PP Pack a GRAM Job Request\&. The \fBglobus_gram_protocol_pack_job_request()\fP function combines its parameters into a GRAM job request message body\&. The caller may frame and send the resulting message by calling \fBglobus_gram_protocol_post()\fP or just frame it by calling \fBglobus_gram_protocol_frame_request()\fP and send it by some other mechanism\&. The \fBglobus_gram_protocol_pack_job_request()\fP function returns the packed message by modifying the \fIquery\fP parameter to point to a new string containing the message\&. The caller is responsible for freeing that string\&. .PP \fBParameters\fP .RS 4 \fIjob_state_mask\fP The bitwise-or of the GRAM job states which the client would like to register for job state change callbacks\&. .br \fIcallback_url\fP A callback contact string which will be contacted when a job state change which matches the \fIjob_state_mask\fP occurs\&. This may be NULL, if the client does not wish to register a callback contact with this job request\&. Typically, this value is returned in the \fIurl\fP parameter to \fBglobus_gram_protocol_allow_attach()\fP\&. .br \fIrsl\fP An RSL string which contains the job request\&. This will be processed on the server side\&. .br \fIquery\fP An output parameter which will be set to a new string containing the packed job request message\&. The caller must free this memory by calling free() .br \fIquerysize\fP An output parameter which will be populated with the length of the job request message returned in \fIquery\fP\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_protocol_pack_job_request()\fP returns GLOBUS_SUCCESS and modifies the \fIquery\fP and \fIquerysize\fP parameters to point to the values described above\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETER\fP Null parameter .RE .PP .SS "int globus_gram_protocol_pack_job_request_reply (int status, const char * job_contact, globus_byte_t ** reply, globus_size_t * replysize)" .PP Pack a GRAM reply message\&. The \fBglobus_gram_protocol_pack_job_request_reply()\fP function combines its parameters into a GRAM reply message body\&. The caller may frame and send the resulting message by calling \fBglobus_gram_protocol_reply()\fP or just frame it by calling \fBglobus_gram_protocol_frame_reply()\fP and send it by some other mechanism\&. The \fBglobus_gram_protocol_pack_job_request_reply()\fP function returns the packed message by modifying the \fIreply\fP parameter to point to a new string containing the message\&. The caller is responsible for freeing that string\&. .PP \fBParameters\fP .RS 4 \fIstatus\fP The job's failure code if the job failed, or 0, if the job request was processed successfully\&. .br \fIjob_contact\fP A string containing the job contact string\&. This may be NULL, if the job request was not successful\&. .br \fIreply\fP A pointer which will be set to the packed reply string The caller must free this string by calling free()\&. .br \fIreplysize\fP A pointer which will be set to the length of the reply string\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_protocol_pack_job_request_reply()\fP returns \fIGLOBUS_SUCCESS\fP and modifies the \fIreply\fP and \fIreplysize\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 \fIreply\fP and \fIreplysize\fP are undefined\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_MALLOC_FAILED\fP Out of memory .RE .PP .SS "int globus_gram_protocol_pack_job_request_reply_with_extensions (int status, const char * job_contact, globus_hashtable_t * extensions, globus_byte_t ** reply, globus_size_t * replysize)" .PP Pack a GRAM reply message with extension attributes\&. The \fBglobus_gram_protocol_pack_job_request_reply_with_extensions()\fP function combines its parameters into a GRAM reply message body\&. The caller may frame and send the resulting message by calling \fBglobus_gram_protocol_reply()\fP or just frame it by calling \fBglobus_gram_protocol_frame_reply()\fP and send it by some other mechanism\&. The \fBglobus_gram_protocol_pack_job_request_reply_with_extensions()\fP function returns the packed message by modifying the \fIreply\fP parameter to point to a new string containing the message\&. The caller is responsible for freeing that string\&. .PP \fBParameters\fP .RS 4 \fIstatus\fP The job's failure code if the job failed, or 0, if the job request was processed successfully\&. .br \fIjob_contact\fP A string containing the job contact string\&. This may be NULL, if the job request was not successful\&. .br \fIextensions\fP A pointer to a hash table keyed on a string attribute name with the hash values being pointers to \fIglobus_gram_protocol_extension_t\fP structures\&. These will be encoded in the reply message after the standard attributes\&. .br \fIreply\fP A pointer which will be set to the packed reply string The caller must free this string by calling free()\&. .br \fIreplysize\fP A pointer which will be set to the length of the reply string\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_protocol_pack_job_request_reply_with_extensions()\fP returns \fIGLOBUS_SUCCESS\fP and modifies the \fIreply\fP and \fIreplysize\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 \fIreply\fP and \fIreplysize\fP are undefined\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_MALLOC_FAILED\fP Out of memory .RE .PP .SS "int globus_gram_protocol_pack_status_reply (int job_status, int failure_code, int job_failure_code, globus_byte_t ** reply, globus_size_t * replysize)" .PP Pack a GRAM query reply message\&. The \fBglobus_gram_protocol_pack_status_reply()\fP function combines its parameters into a GRAM status reply message body\&. The caller may frame and send the resulting message by calling \fBglobus_gram_protocol_reply()\fP or just frame it by calling \fBglobus_gram_protocol_frame_reply()\fP and send it by some other mechanism\&. The \fBglobus_gram_protocol_pack_status_reply()\fP function returns the packed message by modifying the \fIreply\fP parameter to point to a new string containing the message\&. The caller is responsible for freeing that string\&. .PP \fBParameters\fP .RS 4 \fIjob_status\fP The job's current \fBjob state\fP\&. .br \fIfailure_code\fP The error code generated by the query\&. This may be GLOBUS_SUCCESS if the query succeeded\&. .br \fIjob_failure_code\fP The error code associated with the job if it has failed\&. This may be GLOBUS_SUCCESS if the job has not failed\&. .br \fIreply\fP An output parameter which will be set to a new string containing the packed reply message\&. .br \fIreplysize\fP An output parameter which will be set to the length of the reply message returned in \fIreply\fP\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_protocol_pack_status_reply()\fP returns \fIGLOBUS_SUCCESS\fP and modifies the \fIreply\fP and \fIreplysize\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 \fIreply\fP and \fIreplysize\fP are undefined\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_MALLOC_FAILED\fP Out of memory .RE .PP .SS "int globus_gram_protocol_pack_status_reply_with_extensions (int job_status, int failure_code, int job_failure_code, globus_hashtable_t * extensions, globus_byte_t ** reply, globus_size_t * replysize)" .PP Pack a GRAM query reply message with extensions\&. The \fBglobus_gram_protocol_pack_status_reply_with_extensions()\fP function combines its parameters into a GRAM status reply message body\&. The caller may frame and send the resulting message by calling \fBglobus_gram_protocol_reply()\fP or just frame it by calling \fBglobus_gram_protocol_frame_reply()\fP and send it by some other mechanism\&. The \fBglobus_gram_protocol_pack_status_reply_with_extensions()\fP function returns the packed message by modifying the \fIreply\fP parameter to point to a new string containing the message\&. The caller is responsible for freeing that string\&. .PP \fBParameters\fP .RS 4 \fIjob_status\fP The job's current \fBjob state\fP\&. .br \fIfailure_code\fP The error code generated by the query\&. This may be GLOBUS_SUCCESS if the query succeeded\&. .br \fIjob_failure_code\fP The error code associated with the job if it has failed\&. This may be GLOBUS_SUCCESS if the job has not failed\&. .br \fIextensions\fP A pointer to a hash table containing the names and values of the protocol extensions to add to this message\&. .br \fIreply\fP An output parameter which will be set to a new string containing the packed reply message\&. .br \fIreplysize\fP An output parameter which will be set to the length of the reply message returned in \fIreply\fP\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_protocol_pack_status_reply_with_extensions()\fP returns \fIGLOBUS_SUCCESS\fP and modifies the \fIreply\fP and \fIreplysize\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 \fIreply\fP and \fIreplysize\fP are undefined\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_MALLOC_FAILED\fP Out of memory .RE .PP .SS "int globus_gram_protocol_pack_status_request (const char * status_request, globus_byte_t ** query, globus_size_t * querysize)" .PP Pack a GRAM query message\&. The \fBglobus_gram_protocol_pack_status_request()\fP function combines its parameters into a GRAM status query message body\&. The caller may frame and send the resulting message by calling \fBglobus_gram_protocol_post()\fP or just frame it by calling \fBglobus_gram_protocol_frame_request()\fP and send it by some other mechanism\&. The \fBglobus_gram_protocol_pack_status_request()\fP function returns the packed message by modifying the \fIquery\fP parameter to point to a new string containing the message\&. The caller is responsible for freeing that string\&. .PP \fBParameters\fP .RS 4 \fIstatus_request\fP A string containing the type of query message to send, including any query parameters\&. The valid strings supported by GRAM in GT5 are: .IP "\(bu" 2 status .IP "\(bu" 2 register .IP "\(bu" 2 unregister .IP "\(bu" 2 signal .IP "\(bu" 2 renew .IP "\(bu" 2 cancel .PP .br \fIquery\fP An output parameter which will be set to a new string containing the packed job query message\&. .br \fIquerysize\fP An output parameter which will be set to the length of the job query message returned in \fIquery\fP\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_protocol_pack_status_request()\fP returns \fIGLOBUS_SUCCESS\fP and modifies the \fIquery\fP and \fIquerysize\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 \fIquery\fP and \fIquerysize\fP are undefined\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_MALLOC_FAILED\fP Out of memory .RE .PP .SS "int globus_gram_protocol_pack_status_update_message (char * job_contact, int status, int failure_code, globus_byte_t ** reply, globus_size_t * replysize)" .PP Pack a GRAM status update message\&. The \fBglobus_gram_protocol_pack_status_update_message()\fP function combines its parameters into a GRAM status update message body\&. The caller may frame and send the resulting message by calling \fBglobus_gram_protocol_post()\fP or just frame it by calling \fBglobus_gram_protocol_frame_request()\fP and send it by some other mechanism\&. The \fBglobus_gram_protocol_pack_status_update_message()\fP function returns the packed message by modifying the \fIreply\fP parameter to point to a new string containing the message\&. The caller is responsible for freeing that string\&. .PP \fBParameters\fP .RS 4 \fIjob_contact\fP The job contact string associated with the job\&. .br \fIstatus\fP The job's current \fBjob state\fP\&. .br \fIfailure_code\fP The error associated with this job request if the \fIstatus\fP value is GLOBUS_GRAM_PROTOCOL_JOB_STATE_FAILED\&. .br \fIreply\fP An output parameter which will be set to a new string containing the packed status message\&. The caller must free this memory by calling free() .br \fIreplysize\fP An output parameter which will be set to the length of the status message returned in \fIreply\fP\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_protocol_pack_status_update_message()\fP returns \fIGLOBUS_SUCCESS\fP and modifies the \fIreply\fP and \fIreplysize\fP parameters as described above\&. If an error occurs, an integer error code is returned and the values pointed to by \fIreply\fP and \fIreplysize\fP are undefined\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .RE .PP .SS "int globus_gram_protocol_pack_status_update_message_with_extensions (char * job_contact, int status, int failure_code, globus_hashtable_t * extensions, globus_byte_t ** reply, globus_size_t * replysize)" .PP Pack a GRAM status update message with extensions\&. The \fBglobus_gram_protocol_pack_status_update_message_with_extensions()\fP function combines its parameters into a GRAM status update message body\&. The caller may frame and send the resulting message by calling \fBglobus_gram_protocol_post()\fP or just frame it by calling \fBglobus_gram_protocol_frame_request()\fP and send it by some other mechanism\&. The \fBglobus_gram_protocol_pack_status_update_message_with_extensions()\fP function returns the packed message by modifying the \fIreply\fP parameter to point to a new string containing the message\&. The caller is responsible for freeing that string\&. .PP \fBParameters\fP .RS 4 \fIjob_contact\fP The job contact string associated with the job\&. .br \fIstatus\fP The job's current \fBjob state\fP\&. .br \fIfailure_code\fP The error associated with this job request if the \fIstatus\fP value is GLOBUS_GRAM_PROTOCOL_JOB_STATE_FAILED\&. .br \fIextensions\fP A pointer to a hash table keyed by extension attribute names with the values being pointers to globus_gram_protocol_extension_t structures\&. .br \fIreply\fP An output parameter which will be set to a new string containing the packed status message\&. The caller must free this memory by calling free() .br \fIreplysize\fP An output parameter which will be set to the length of the status message returned in \fIreply\fP\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_protocol_pack_status_update_message_with_extensions()\fP returns \fIGLOBUS_SUCCESS\fP and modifies the \fIreply\fP and \fIreplysize\fP parameters as described above\&. If an error occurs, an integer error code is returned and the values pointed to by \fIreply\fP and \fIreplysize\fP are undefined\&. .RE .PP \fBReturn values\fP .RS 4 \fIGLOBUS_SUCCESS\fP Success .br \fIGLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED\fP Out of memory .RE .PP .SS "int globus_gram_protocol_pack_version_request (char ** request, size_t * requestsize)" .PP Pack a GRAM version request message\&. The \fBglobus_gram_protocol_pack_job_request()\fP function creates a copy of the GRAM version request\&. The caller may frame and send the resulting message by calling \fBglobus_gram_protocol_post()\fP or just frame it by calling \fBglobus_gram_protocol_frame_request()\fP and send it by some other mechanism\&. The \fBglobus_gram_protocol_pack_version_request()\fP function returns the packed message by modifying the \fIrequest\fP parameter to point to a new string containing the message\&. The caller is responsible for freeing that string\&. .PP \fBParameters\fP .RS 4 \fIrequest\fP An output parameter which will be set to a new string containing the packed version request message\&. The caller must free this memory by calling free()\&. .br \fIrequestsize\fP An output parameter which will be populated with the length of the version request message returned in \fIquery\fP\&. .RE .PP \fBReturns\fP .RS 4 Upon success, \fBglobus_gram_protocol_pack_job_request()\fP returns GLOBUS_SUCCESS and modifies the \fIrequest\fP and \fIrequestsize\fP parameters to point to the values described above\&. If an error occurs, \fBglobus_gram_protocol_pack_version_request()\fP returns an integer error code and the values pointed to by \fIrequest\fP and \fIrequestsize\fP are 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 .RE .PP .SH "Author" .PP Generated automatically by Doxygen for globus_gram_protocol from the source code\&.