Developer Zone

SDK Status Checks

RUISTATE ruiGetState(RUIINSTANCE* ruiInstance)

This function returns a RUISTATE value that contains the state of the RUI instance. The RUI SDK state can change asynchronously.

This function can be called more than once.

This function is a synchronous function.

Parameters:

ruiInstance (RUIINSTANCE*) - Pointer to the RUI instance created via ruiCreateInstance()
Returns:One of the RUISTATE values below:
* RUI_SDK_STATE_FATAL_ERROR - irrecoverable internal fatal error. No further API calls should be made
* RUI_SDK_STATE_UNINITIALIZED - Instance successfully created (ruiCreateInstance()) but not yet successfully configured createConfig.
* RUI_SDK_STATE_CONFIG_INITIALIZED_NOT_STARTED - Successfully configured and not yet started via ruiStartSDK
* RUI_SDK_STATE_STARTED_NEW_REG_RUNNING - Running ruiStartSDK with a New Registration in progress but not yet completed
* RUI_SDK_STATE_RUNNING - Running ruiStartSDK with no need for New Registration or with successfully completed New Registration.
* RUI_SDK_STATE_ABORTED_NEW_REG_PROXY_AUTH_FAILURE - Aborted run ruiStartSDK due to failed New Registration.
* RUI_SDK_STATE_ABORTED_NEW_REG_NETWORK_FAILURE - Aborted run ruiStartSDK due to failed New Registration.
* RUI_SDK_STATE_ABORTED_NEW_REG_FAILED - Aborted run ruiStartSDK due to failed New Registration.
* RUI_SDK_STATE_SUSPENDED - Instance has been instructed by RUI Server to back-off. Will return to running once back-off cleared.
* RUI_SDK_STATE_PERMANENTLY_DISABLED - Instance has been instructed by RUI Server to disable. This is a permanent, irrecoverable state.
* RUI_SDK_STATE_STOPPING_NON_SYNC - Stop in progress ruiStopSDK. Stopping non-Sync-related threads.
* RUI_SDK_STATE_STOPPING_ALL - Stop in progress ruiStopSDK  Stopping Sync-related threads.
* RUI_SDK_STATE_STOPPED - Stop completed ruiStopSDK
* RUI_SDK_STATE_OPTED_OUT - Instance has been instructed by the application to opt-out.

RUIRESULT ruiTestConnection(RUIINSTANCE* ruiInstance)

This function tests the connection between the RUI SDK and the RUI Server. If a valid configuration file exists from ruiCreateConfig(), the URL used for the test will be the one in that file, set by the RUI Server. Otherwise, the URL used for the test will be the one set by the client in the call to ruiCreateConfig() . The proxy is used during the test if set by calling ruiSetProxy() .

This function can be called between ruiCreateConfig() and ruiStopSDK() and can be called zero or more times.

This function is a synchronous function and only returns with all functionality is completed.

Parameters:

ruiInstance (RUIINSTANCE*) - Pointer to the RUI instance created via ruiCreateInstance()
Returns:One of the RUIRESULT values below:
* RUI_OK - Function successful.
* RUI_INVALID_SDK_OBJECT - SDK Instance parameter is NULL or invalid.
* RUI_SDK_INTERNAL_ERROR_FATAL - Irrecoverable internal fatal error. No further API calls should be made.
* RUI_SDK_ABORTED - A required New Registration has failed, and hence the SDK is aborted.  ruiStopSDK and ruiDestroyInstance are possible.
* RUI_SDK_PERMANENTLY_DISABLED - The RUI Server has instructed a permanent disable.
* RUI_SDK_OPTED_OUT - Instance has been instructed by the application to opt-out.
* RUI_CONFIG_NOT_CREATED - Configuration from createConfig has not been successfully created.
* RUI_SDK_ALREADY_STOPPED - SDK has already been stopped.
* RUI_NETWORK_COMMUNICATION_ERROR - Not able to reach the RUI Server.
* RUI_NETWORK_SERVER_ERROR - Error while communicating with the RUI Server.
* RUI_NETWORK_RESPONSE_INVALID - Message format error while communicating with the RUI Server.
* RUI_TEST_CONNECTION_INVALID_PRODUCT_ID - Invalid Product ID.
* RUI_TEST_CONNECTION_MISMATCH - Mismatch between Product ID and URL.