Automated Message Retrieval
The Usage Intelligence V5 SDK provides a default, automated ReachOut handler that works on Windows and macOS. Developers can override this handler by implementing the ReachOut handler functions with their own code and providing these handler functions to the the ruiSetReachOutHandler() function. See the ruiSDKC.h file for details on the functions required to support custom ReachOut. The three functions include:
Function |
Description |
||||||||||||
void (*RUIReachOutHandler)(void* arg, const char* width, const char* height, int32_t position, const char* message) |
Handles the ReachOut message. The parameters are:
|
||||||||||||
int (*RUIReachOutGetReadyForNext)(void* arg) |
To handle getting the status of whether the handler is ready for the next ReachOut message. Returns 0 for not ready, non-zero for ready. |
||||||||||||
void (RUI_CALLBACK_LINKAGE *RUIReachOutCloser)(void* arg) |
Called when the SDK is stopping or shutting down. |
The ruiSetReachOutHandler() function sets a custom ReachOut handler. Any previously registered handler, including the default graphical ReachOut handler that may have been registered (ruiCreateInstance()). If handler is NULL, then all parameters are considered to be NULL. Setting a handler to NULL effectively removes the current handler, if any, without setting a new handler.
ruiSetReachOutHandler() can be called more than once.
ruiSetReachOutHandler() is a synchronous function, returning when all functionality is completed.
RUIRESULT ruiSetReachOutHandler(RUIINSTANCE* ruiInstance, RUIREACHOUTHANDLER handler, RUIREACHOUTCLOSER closer, RUIREACHOUTREADYFORNEXT getReadyForNext, void* arg)
Parameters
The ruiSetReachOutHandler() function has the following parameters.
Parameter |
Description |
ruiInstance (RUIINSTANCE*) |
Pointer to the Usage Intelligence instance created via ruiCreateInstance(). |
handler (RUIREACHOUTHANDLER) |
The function to be called when a ReachOut is received from the Server. |
closer (RUIREACHOUTCLOSER) |
The function to be called when the SDK is shutting down. |
getReadyForNext (RUIREACHOUTREADYFORNEXT) |
The function to be called when the SDK is checking to see if the handler is ready for a new ReachOut message. |
arg (void*) |
Data to be passed to handler function and closer function; provides the client a self-managed handle. |
Returns
The ruiSetReachOutHandler() function returns one of the return status constants below.
Parameter |
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_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_SDK_ALREADY_STARTED |
The SDK has already been successfully started. |
RUI_SDK_ALREADY_STOPPED |
SDK has already been successfully stopped. |