SDK Status Checks

TBRESULT tbStartStatus(TBINSTANCE *tbInstance)

This function returns an integer value which contains the status of tbStart(). Note: The function tbStart() executes asynchronously so the status returned by tbStartStatus() may change over time. This function must be called after calling function tbStart().

Parameters:

tbInstance (TBINSTANCE*) - The Revulytics Usage Intelligence SDK instance returned in call to tbCreateInstance()
Returns:One of the values below:
* TB_START_OK (2)
* TB_START_LOADING (1)
* TB_START_NOT_CALLED (0)
* TB_START_CONNECTION_ERROR (-2)
* TB_START_AUTH_FAILURE (-3)
* TB_START_SERVER_ERROR (-4)
* TB_INVALID_PARAMETER (-9)
* TB_INTERNAL_ERROR (-99)

TBRESULT tbConnectionCheck(TBINSTANCE *tbInstance, const wchar_t *szUrl, wchar_t *szProductID)

This function allows you to test your application’s connectivity with the Revulytics Usage Intelligence server and to confirm that your CallHome URL is active and operational (for debugging purposes when using a custom CallHome URL). You do NOT need to call this function before other API calls since this would cause unnecessary traffic on your clients’ machines. Instead, you should check the return types by each API call since every API call that requires server communication does its own connection status check and returns connection errors as part of its return type.

This function is typically used in conjunction with tbSetDefaultProxyCredentials() and tbSetProxy() in order to confirm whether proxy authentication is required before calling tbStart(). It is also used to test whether an Internet connection is available for the application or whether the Internet connection is down or possibly blocked by some firewall or web filter at the gateway. The SDK will attempt to use cached credentials from Internet Explorer to log onto the proxy, however in case this function reports an authentication failure, it means your application cannot make use of cached credentials so you will need to ask the user to enter credentials.

Parameters:

tbInstance (TBINSTANCE*) - The Revulytics Usage Intelligence SDK instance returned in call to tbCreateInstance()

szUrl (wchar_t*) - The URL used for connectivity testing (usually your CallHome URL)

szProductID (wchar_t*) - This optional parameter accepts the product ID of your product. If provided, it will be used to confirm that
you are using the correct URL for this specific product ID, and if not, it will return TB_CONNCHECK_MISMATCH (-1)
Returns:One of the return status constants below.
* TB_CONNCHECK_OK (1)
* TB_CONNCHECK_MISMATCH (-1)
* TB_CONN_ERROR (-2)
* TB_AUTH_FAILURE (-3)
* TB_SERVER_ERROR (-4)
* TB_INVALID_PARAMETER (-9)
* TB_INTERNAL_ERROR (-99)

TBRESULT tbConfigCheck(TBINSTANCE *tbInstance)

This function is similar to tbConnectionCheck() with the difference that instead of providing a URL and productID as parameters, it uses the configuration data provided via the Revulytics Usage Intelligence data files and when calling tbCreateConfig(). This function can be used to test connectivity to the Revulytics Usage Intelligence server and can also be used to test proxy configuration.

Parameters:

tbInstance (TBINSTANCE*) - The Revulytics Usage Intelligence SDK instance returned in call to tbCreateInstance()
Returns:One of the return status constants below.
* TB_OK (1)
* TB_CONNCHECK_MISMTACH (-1)
* TB_CONN_ERROR (-2)
* TB_AUTH_FAILURE (-3)
* TB_SERVER_ERROR (-4)
* TB_CONFIG_NOT_CREATED (-5)
* TB_INVALID_PARAMETER (-9)
* TB_INTERNAL_ERROR (-99)