The callback prototype to indicate the service has been disconnected.
Synopsis:
#include <btapi/bthid.h>
typedef void(* bt_hid_service_disconnected_cb)(int reason);
Arguments:
- reason
-
EOK indicates a successful service connection; otherwise an error code indicates the reason for the connection failure. The following error codes can be returned:
- EACCES: An authentication or pairing failure has occurred.
- ENOTCONN: There is no connection.
- ECONNREFUSED: The connection was refused because the connection parameters provided are invalid.
- ECONNRESET: The remote party has terminated the connection.
- ENETUNREACH: A page timeout has occurred.
- EPROTO: The operation has failed because the response from the remote Bluetooth-enabled device had a protocol error.
- ETIMEOUT: The connection attempt has timed out.
Library:
libbtapi (For the qcc command, use the -l btapi option to link against this library)