Status Request APIs are used to retrieve the status of an API requested to the server, and in case of request failure, to get the error number and a string containing the error details.
This page contains information about the Status Request APIs for C and C++, including the description and syntax, and the input, input types, input description, and input return values.
Prototype
int na_results_status(na_elem_t* elt);
Description
Gets the result status of an API invoked either by na_server_invoke() or na_server_invoke_elem().
|
Input |
Type |
Description |
|
elt |
na_elem_t * |
The pointer to the input output element, which is returned by either na_server_invoke() or na_server_invoke_elem(). |
Return value
NA_OK on success
NA_FAILED on failure
Prototype
int na_results_errno(na_elem_t* elt);
Description
Gets the error number if an API invocation using either na_server_invoke() or na_server_invoke_elem() has failed.
This API is used to determine the error number when the status of API invocation is NA_FAILED.
|
Input |
Type |
Description |
|
elt |
na_elem_t * |
The pointer to the input output element, which is returned by either na_server_invoke() or na_server_invoke_elem(). |
Return value
-1 if an API invocation using either na_server_invoke() or na_server_invoke_elem() is successful
The error number of the failure if an API invocation has failed
Prototype
const char* na_results_reason(na_elem_t* elt);
Description
Gets the error number if an API invocation using either na_server_invoke() or na_server_invoke_elem() has failed.
This API is used to determine the error number when the status of API invocation is NA_FAILED.
|
Input |
Type |
Description |
|
elt |
na_elem_t * |
The pointer to the input output element. |
Return value
NULL if an API invocation using either na_server_invoke() or na_server_invoke_elem() is successful
The error string of the failure if an API invocation has failed
"Unknown" if an API invocation has failed but the error string is not set