Developer Zone

SDK Status Checks

TBRESULT tbStartStatus()

This function returns an integer value which contains the status of tbStart().

Return type: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_START_RESPONSE_ERROR (-5)
* TB_START_GENERIC_ERROR (-6)
TBRESULT tbConnectionCheck(const wchar_t* szUrl, [const wchar_t* szProductID = NULL])

This function allows you to test your application’s connectivity with the Trackerbird 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 which requires server communication does its own connection status check and returns any 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 webfilter 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:
  • szUrl (wchar_t*) – The URL against which to test connectivity (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)
Return type:

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)

TBRESULT tbConfigCheck()

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 Trackerbird data files and when calling tbCreateConfig(). This function can be used to test connectivity to the Trackerbird server and can also be used to test proxy configuration.

Return type:One of the return status constants below.
* TB_OK (1)
* TB_CONN_ERROR (-2)
* TB_AUTH_FAILURE (-3)
* TB_SERVER_ERROR (-4)
* TB_CONFIG_NOT_CREATED (-5)
TBRESULT tbGetPrivacyMode()

This function takes no parameters and will return the current privacy level for the Trackerbird SDK. For more information about Privacy Mode please check out tbSetPrivacyMode().

Return type:One of the return status constants below.
* TB_PRIVACYMODE_OFF (0)
* TB_PRIVACYMODE_LOW (1)
* TB_PRIVACYMODE_HIGH (2)
* TB_CONFIG_NOT_CREATED (-5)