Message Unpacking
[Functions]

Collaboration diagram for Message Unpacking:

Functions


Function Documentation

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 
)

Unpack a job requestExtracts the parameters of a job request from a GRAM message.

The parameters to this function mirror those of globus_gram_protocol_pack_job_request().

Parameters:
query The job request.
querysize The length of the job request string.
job_state_mask A pointer to an integer to be populated with the job state mask in the job request.
callback_url A pointer to be populated 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 globus_libc_free().
description A pointer to be populated with a copy of the job description RSL for this job request. The caller must free this memory by calling globus_libc_free().
int globus_gram_protocol_unpack_job_request_reply ( const globus_byte_t *  reply,
globus_size_t  replysize,
int *  status,
char **  job_contact 
)

Unpack a reply to a GRAM job requestExtracts the parameters of a reply to a job request from a GRAM message.

The parameters to this function mirror those of globus_gram_protocol_pack_job_request_reply().

Parameters:
reply The job request reply.
replysize The length of the reply string.
status A pointer to an integer to be populated with the failure code associated with the job request. This may be GLOBUS_SUCCESS, if the job request was successful.
job_contact A pointer to a string to be populated with the job's contact string. This may set to NULL if the job request failed. If non-NULL upon return, the caller must free this string using globus_libc_free().
Return values:
GLOBUS_SUCCESS The reply was successfully unpacked.
GLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED Memory for the job_contact string could not be allocated.
GLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED The reply message couldn't be parsed.
GLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH The reply message was in an incompatible version of the GRAM protocol.
int globus_gram_protocol_unpack_status_request ( const globus_byte_t *  query,
globus_size_t  querysize,
char **  status_request 
)

Unpack a GRAM queryExtracts the parameters of a query from a GRAM message.

The parameters to this function mirror those of globus_gram_protocol_pack_status_request().

Parameters:
query The GRAM query.
querysize The length of the query string.
status_request A pointer to a string to be populated with the query string. The caller must free this string using globus_libc_free().
Return values:
GLOBUS_SUCCESS The reply was successfully unpacked.
GLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED Memory for the job_contact string could not be allocated.
GLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED The reply message couldn't be parsed.
GLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH The reply message was in an incompatible version of the GRAM protocol.
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 
)

Unpack a reply to a GRAM status requestExtracts the parameters of a reply to a status request from a GRAM message.

The parameters to this function mirror those of globus_gram_protocol_pack_status_reply().

Parameters:
reply The job request reply.
replysize The length of the reply string.
job_status A pointer to an integer to be populated with thejob's current job state.
failure_code A pointer to an integer to be populated with the failure code associated with the status request. This may be GLOBUS_SUCCESS, if the job request was successful.
job_failure_code A pointer to an integer to be populated with the failure code for the job, if the job_status is GLOBUS_GRAM_PROTOCOL_JOB_STATE_FAILED.
Return values:
GLOBUS_SUCCESS The reply was successfully unpacked.
GLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED The reply message couldn't be parsed.
GLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH The reply message was in an incompatible version of the GRAM protocol.
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 
)

Unpack a status update messageExtracts the parameters of a status update from a GRAM message.

The parameters to this function mirror those of globus_gram_protocol_pack_status_update_message().

Parameters:
reply The status update message.
replysize The length of the message.
job_contact An output variable which will be populated with a new string containing the job contact string. The caller must free this memory by calling globus_libc_free().
status A pointer to an integer to be populated with the job's current job state.
failure_code A pointer to an integer to be populated with the failure code for the job, if the job_status is GLOBUS_GRAM_PROTOCOL_JOB_STATE_FAILED.
Return values:
GLOBUS_SUCCESS The message was successfully unpacked.
GLOBUS_GRAM_PROTOCOL_ERROR_HTTP_UNPACK_FAILED The message couldn't be parsed.
GLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED Memory for the job_contact string could not be allocated.
GLOBUS_GRAM_PROTOCOL_ERROR_VERSION_MISMATCH The status message was in an incompatible version of the GRAM protocol.

about globus | globus toolkit | dev.globus

Comments? webmaster@globus.org