This adds get characteristic client command handling. If characteristic
id is given, then next characteristic after given is returned. In case of
no initial characteristic, first characteristic in given service is
returned. Characteristics are cached on first get characteristic command
call for service.
Android has its own ScanQueue which is used for tracking scanning
clients which means we do not have to have this logic internally.
Android will call Scan Off only when his scanQueue is empty.
Disconnect scenarios:
1. If there is more then one client for a given gatt_device then
client id is removed from dev->clients, success response is sent
together with success disconnect event.
2. If there is only one client for a given remote device then we
do what is decribed above plus clean of gattrib stuff
3. In case client_if or conn_id is incorrect, response failed is sent
This patch introduce connect LE device functionality.
There is gatt_device representing remote le device. Each gatt device
has a list own list of clients as it is possible that more apps
would like to use same remote device.
Possible connect scenarios:
1. There is no ACL connection to device:
Then new dev is put on conn_wait_queue and le scan is enabled.
Once device is found we do connect it.
Once device is connected then device is moved form conn_wait_queue to
conn_list and success event is sent to client(s) with conn_id
2. Device is already connected:
Then we update client list, reply with success and do send connect event.
3. For unregisterd clients or uknown conn_id, failed response is sent.