Register for incoming connections.
Synopsis:
#include <btapi/bthid.h>
int bt_hid_register()
Arguments:
Library:
libbtapi (For the qcc command, use the -l btapi option to link against this library)
Description:
An application calls this function to register for incoming HID device connection notification. If the application successfully registers and an incoming connection from a remote Bluetooth device (HID Host) occurs, the application will be notified by the bt_hid_service_connected_cb callback.
Returns:
0 if the registration is successful, or
-1 with the
errno set otherwise. The error codes that can be returned are as follows:
- EPERM: The bt_hid_init() function was not called or did not complete successfully.
- EBUSY: The requested service is already in use.
- EAGAIN: The link to the Bluetooth stack is unavailable. You can try again.
- EINVAL: Invalid stack parameters.
- ENOMEM: Insufficient memory is available to perform the request.
- ESRVRFAULT: An internal error has occurred.