Functions | |
| int | jsGetScannerStatusFromScanner (JCONNECTION const jc) |
Reads status from the scanner into a data structure inside the opaque JCONNECTION. More... | |
| int | jsGetScannerStatusValue (JCONNECTION const jc, size_t i, int *value) |
Gets the specified status value from the data structure inside the JCONNECTION. More... | |
| int | jsGetStatusDescriptionFromScanner (JCONNECTION const jc, UINT32 i, char *const description, UINT32 description_length) |
| Reads a descriptive text string from the scanner for the particular status index. More... | |
The order of operations here is important.
Here are the valid indexes:
| int jsGetScannerStatusFromScanner | ( | JCONNECTION const | jc | ) |
Reads status from the scanner into a data structure inside the opaque JCONNECTION.
| jc | The connection to the scanner. |
INVALID_PARAMETER if jc is NULL. SCANNER_FAILURE if the connection closes. | int jsGetScannerStatusValue | ( | JCONNECTION const | jc, |
| size_t | i, | ||
| int * | value | ||
| ) |
Gets the specified status value from the data structure inside the JCONNECTION.
| jc | The connection to the scanner. |
| i | The index of the status value to retrieve. |
| value | Pointer to an int that will hold the value. |
INVALID_PARAMETER if jc or value is NULL, or if i is out of range. | int jsGetStatusDescriptionFromScanner | ( | JCONNECTION const | jc, |
| UINT32 | i, | ||
| char *const | description, | ||
| UINT32 | description_length | ||
| ) |
Reads a descriptive text string from the scanner for the particular status index.
The description length should be a minimum of 128 characters. After this call, description will be properly null-terminated. If description isn't long enough, the result will be truncated, but still properly null-terminated. The first valid index is 0, the last valid index is 12.
Invalid indexes will return the string "ERROR unsuported status type".
| jc | The connection to the scanner. |
| i | The index of the status name to retrieve. |
| description | The character buffer that will contain the status name. |
| description_length | The number of characters that description points to. |
INVALID_PARAMETER if jc or description is NULL, or if i is out of range. SCANNER_FAILURE if the connection closes.