[Adapt] Implement simultaneous Audio profile connection logic 89/88089/1
authorAnupam Roy <anupam.r@samsung.com>
Tue, 13 Sep 2016 08:42:18 +0000 (14:12 +0530)
committerAnupam Roy <anupam.r@samsung.com>
Tue, 13 Sep 2016 08:42:18 +0000 (14:12 +0530)
commit393c5ee5e88bce0a84140069e32b05998a69429b
treee19eca5b00ac9e841fd808d32e9906e0c60286df
parent5cee62df5106f09199c466db9c1c0e17fd43d466
[Adapt] Implement simultaneous Audio profile connection logic

This patch handles following:-
 a/ Add "Audio Connect All" request to wait state if one connection
    is under progress.
 b/ Issue get bonded device info to find out whether remote device supports
    A2DP Sink and HFP HF roles or not.
 c/ If user wants to connect second audio device, while another is in progress
    then internally disconnect the connected profile (HFP or A2DP) of the
    first device (if already connected) and and put connection type of
    second device to wait list. Once connection is terminated for first device,
    connection of waiting device is triggered.
 d/ Implements pending audio connection request logic for A2DP profile.
    If remote device supports both HFP and A2DP, then HFP connection is
    initiated first and A2DP connection is put to pending connection state.
    Once AG is connected, A2DP connection is triggered.

Change-Id: I19b71c5639c724ecf7b693ddfba56fe1e815223b
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
bt-service-adaptation/services/adapter/bt-service-core-adapter.c
bt-service-adaptation/services/audio/a2dp_src/bt-service-a2dp-src.c
bt-service-adaptation/services/audio/bt-service-audio.c
bt-service-adaptation/services/audio/hf/bt-service-hf.c
bt-service-adaptation/services/bt-service-common.c
bt-service-adaptation/services/bt-service-event-receiver.c
bt-service-adaptation/services/include/bt-service-audio-common.h
bt-service-adaptation/services/include/bt-service-common.h