Initialize and open a connection to the BlackBerry Hub.
int uds_init(uds_context_t *pHandle, bool async)
The handle that's used to communicate with the BlackBerry Hub. Your app must allocate a uds_context_t and provide a valid pointer to it as this parameter. If uds_init() completes successfully (that is, it returns UDS_SUCCESS), the uds_context_t that you passed in is filled by the library with a valid handle.
If true the library runs in asynchronous mode, if false the library runs in synchronous mode.
Library:libunifieddatasourcec (For the qcc command, use the -l unifieddatasourcec option to link against this library)
This function initializes the UDS library and establishes a connection to the BlackBerry Hub so that your app can start adding and manipulating data. This function should be the first UDS function that your app calls.
You can use the library in either asynchronous mode or synchronous mode, which is specified by using the async parameter. In asynchronous mode, all function calls return immediately after sending their associated command to the server. The functions don't wait for a response after they send their commands. Your app must call uds_wait_for_response() on a separate thread, which blocks until there is a response from the server or a specified timeout period has elapsed. Then, when a response is received, your app can call uds_get_response() to retrieve the response.
In synchronous mode, function calls block until they receive a response from the server. The functions return either UDS_SUCCESS if the command was successful, or a non-zero error code if it was unsuccessful. The possible error codes are described in uds_error_code_t.
UDS_SUCCESS if the library was initialized successfully, or a non-zero error code on failure. See uds_error_code_t or errno.h for details.
Last modified: 2014-05-14