Setting Custom Property Data

The ruiSetCustomProperty() function sets or clears the custom property data.

Note:The custom property data must be set every time the SDK instance is run. This is different than V4 of the Usage Intelligence SDK where the supplied product data was stored in the SDK configuration file and if it was not supplied, the values in the configuration file were used.

ruiSetCustomProperty() can be called between ruiCreateConfig() and ruiStopSDK(), and can be called zero or more times.

ruiSetCustomProperty() is a synchronous function, returning when all functionality is completed.

ruiSetCustomProperty()

RUIRESULT ruiSetCustomProperty(RUIINSTANCE* ruiInstance, uint32_t customPropertyID, const char* customValue)

Parameters

The ruiSetCustomProperty() function has the following parameters.

ruiSetCustomProperty() Parameters

Parameter

Description

ruiInstance (RUIINSTANCE*)

Pointer to the RUI instance created via ruiCreateInstance().

customPropertyID (uint32_t)

This is a numeric index between 1 and 20. On the Usage Intelligence dashboard, custom values are given an ID ranging from C01 to C20. This ID is used to identify which of the 20 possible custom value is being set.

customValue (const char*)

The custom property value to use in Server reports; empty value clears the value.

Returns

The ruiSetCustomProperty() function returns one of the return status constants below.

ruiSetCustomProperty() Returns

Return

Description

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_SUSPENDED

The Server has instructed a temporary back-off.

RUI_SDK_PERMANENTLY_DISABLED

The 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 has not been successfully created.

RUI_SDK_ALREADY_STOPPED

SDK has already been successfully stopped.

RUI_INVALID_CUSTOM_PROPERTY_ID

The customPropertyID violates its allowable range.