Name
prt_api_load_item_hold
Purpose
Load serialized item hold data.
Description
This PRT_API routine is used to load the answer for a PRT request for Serialized Item Hold Data into a response buffer. The calling routine receives back a status indicating the success or failure of the request. This function can be called multiple times to load multiple responses into the response buffer. If the buffer becomes full the return status will be unsuccessful and additional error information will be found in the COR_STATUS structure. The PRT_API routine prt_api_send_resp must be called to send the response buffer to the appropriate PRT process.
Syntax
int prt_api_load_item_hold (data_valid_flag, item_id, reference_id,
ext_hold_active, group_id, retstat)
COR_BOOLEAN
char item_id[PRT_ITEM_ID_LEN + 1];
char reference_id[PRT_ITEM_ID_LEN + 1];
COR_BOOLEAN ext_hold_active;
char group_id[PRT_REGION_ID_LEN + 1];
COR_STATUS *retstat;
Data Structures
See Static Information Requirements
Arguments
Argument |
Description |
Input |
|
data_valid_flag |
If TRUE, data requested is being returned (is valid). FALSE indicates the request could not be satisfied. (required) |
item_id |
Unique identifier of a Serialized Item. (optional if reference id specified) |
reference_id |
Secondary identifier of a Serialized Item. (optional if item id specified) |
ext_hold_active |
If TRUE, Serialized Item held due to external hold. |
group_id |
Tracking Group applying the hold. (required if ext_hold_active = TRUE) |
Output |
|
*retstat |
Pointer to COR_STATUS structure |
Return Value
Either COR_SUCCESS, COR_FAILURE, or COR_WARNING.
If the function returns COR_WARNING or COR_FAILURE, additional error information can be found in the COR_STATUS structure. If no more item information will fit in the datagram buffer, the function returns COR_WARNING with the COR_STATUS err_code set to PRTI_DG_BUF_FULL.
Error Codes
PRTI_DG_BUF_FULL |
Datagram buffer full (Warning) |
PRTI_API_CANT_RCV |
PRT Application not initialized to receive asynch messages (Warning) |
PRTI_NON_SER_ID |
Non-serialized item has item id or reference id (Warning) |
PRTI_SER_NO_ID |
Serialized item missing both item id and reference id (Warning) |
PRTI_GRP_ID_NULL |
Group identifier NULL (Warning) |
PRTI_GRP_ID_NDEF |
Group identifier not valid (Warning) |
PRTI_EXT_HOLD_NO_GRP |
External hold specified without Group ID (Warning) |
PRTI_CRESEG_ERR |
Error creating segment (Failure) |
Application subroutines. |