#include "src/shared/timeout.h"
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+#include "../profile.h"
+#endif
+
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
#define CONTROL_CONNECT_TIMEOUT 4
#define TARGET_CONNECT_TIMEOUT 1
#else
HSP_AG_UUID, HFP_AG_UUID, A2DP_SOURCE_UUID
A2DP_SINK_UUID, NULL };
#endif
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+static const char *fhub_default_reconnect[] = {
+ HSP_AG_UUID, HFP_AG_UUID, A2DP_SOURCE_UUID
+ A2DP_SINK_UUID, NULL };
+#endif
+
static char **reconnect_uuids = NULL;
static const size_t default_attempts = 7;
conf = btd_get_main_conf();
if (!conf) {
- reconnect_uuids = g_strdupv((char **) default_reconnect);
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ if (TIZEN_FEATURE_BLUEZ_FHUB)
+ reconnect_uuids = g_strdupv((char **) fhub_default_reconnect);
+ else
+#endif
+ reconnect_uuids = g_strdupv((char **) default_reconnect);
reconnect_attempts = default_attempts;
reconnect_intervals_len = sizeof(default_intervals) /
sizeof(*reconnect_intervals);
NULL, &gerr);
if (gerr) {
g_clear_error(&gerr);
- reconnect_uuids = g_strdupv((char **) default_reconnect);
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ if (TIZEN_FEATURE_BLUEZ_FHUB)
+ reconnect_uuids = g_strdupv((char **) fhub_default_reconnect);
+ else
+#endif
+ reconnect_uuids = g_strdupv((char **) default_reconnect);
}
reconnect_attempts = g_key_file_get_integer(conf, "Policy",
struct avdtp_local_sep *sep = stream->lsep;
#if defined(TIZEN_FEATURE_BLUEZ_MODIFY) && defined(TIZEN_FEATURE_BLUEZ_A2DP_MULTISTREAM)
- /* Connection lost */
- avdtp_remove_source_devce(session->device);
+ if (!TIZEN_FEATURE_BLUEZ_FHUB) {
+ /* Connection lost */
+ avdtp_remove_source_devce(session->device);
+ }
#endif
if (sep->cfm && sep->cfm->abort &&
avdtp_check_collision(session, AVDTP_START, stream);
#if defined(TIZEN_FEATURE_BLUEZ_MODIFY) && defined(TIZEN_FEATURE_BLUEZ_A2DP_MULTISTREAM)
- avdtp_add_source_device(session->device);
+ if (!TIZEN_FEATURE_BLUEZ_FHUB)
+ avdtp_add_source_device(session->device);
#endif
avdtp_sep_set_state(session, sep, AVDTP_STATE_STREAMING);
uint8_t err;
#if defined(TIZEN_FEATURE_BLUEZ_MODIFY) && defined(TIZEN_FEATURE_BLUEZ_A2DP_MULTISTREAM)
- avdtp_remove_source_devce(session->device);
+ if (!TIZEN_FEATURE_BLUEZ_FHUB)
+ avdtp_remove_source_devce(session->device);
#endif
if (size < sizeof(struct seid_req)) {
#if defined(TIZEN_FEATURE_BLUEZ_MODIFY) && defined(TIZEN_FEATURE_BLUEZ_A2DP_MULTISTREAM)
if (sep->state != AVDTP_STATE_STREAMING) {
DBG("Not streaming state: %d", sep->state);
- return avdtp_send(session, transaction, AVDTP_MSG_TYPE_ACCEPT,
- AVDTP_SUSPEND, NULL, 0);
+ if (!TIZEN_FEATURE_BLUEZ_FHUB) {
+ return avdtp_send(session, transaction, AVDTP_MSG_TYPE_ACCEPT,
+ AVDTP_SUSPEND, NULL, 0);
+ } else {
+ err = AVDTP_BAD_STATE;
+ goto failed;
+ }
}
#else
if (sep->state != AVDTP_STATE_STREAMING) {
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
#define AVRCP_CT_VERSION 0x0104
#define AVRCP_TG_VERSION 0x0103
+#define FHUB_AVRCP_CT_VERSION 0x0103
#else
#define AVRCP_CT_VERSION 0x0106
#define AVRCP_TG_VERSION 0x0105
sdp_data_t *psm[2], *version, *features;
uint16_t lp = AVCTP_CONTROL_PSM;
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ uint16_t avrcp_ct_ver;
uint16_t avctp_ver = 0x0104;
uint16_t feat = 0;
#ifdef ENABLE_AVRCP_CATEGORY1
/* Bluetooth Profile Descriptor List */
sdp_uuid16_create(&profile[0].uuid, AV_REMOTE_PROFILE_ID);
- profile[0].version = AVRCP_CT_VERSION;
#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
- adapter_avrcp_ct_ver = AVRCP_CT_VERSION;
+ avrcp_ct_ver = TIZEN_FEATURE_BLUEZ_FHUB ? FHUB_AVRCP_CT_VERSION : AVRCP_CT_VERSION;
+ profile[0].version = avrcp_ct_ver;
+ adapter_avrcp_ct_ver = avrcp_ct_ver;
+#else
+ profile[0].version = AVRCP_CT_VERSION;
#endif
pfseq = sdp_list_append(NULL, &profile[0]);
sdp_set_profile_descs(record, pfseq);
strval = status_to_string(value);
#if defined(TIZEN_FEATURE_BLUEZ_MODIFY) && defined(TIZEN_FEATURE_BLUEZ_A2DP_MULTISTREAM)
- DBG("AVRCP status changed to : %s", strval);
+ if (!TIZEN_FEATURE_BLUEZ_FHUB) {
+ DBG("AVRCP status changed to : %s", strval);
- if (value == AVRCP_PLAY_STATUS_PAUSED)
- media_transport_set_stream_status(session->dev, true);
- else if ( value == AVRCP_PLAY_STATUS_PLAYING)
- media_transport_set_stream_status(session->dev, false);
+ if (value == AVRCP_PLAY_STATUS_PAUSED)
+ media_transport_set_stream_status(session->dev, true);
+ else if ( value == AVRCP_PLAY_STATUS_PLAYING)
+ media_transport_set_stream_status(session->dev, false);
+ }
#endif
if (g_strcmp0(curval, strval) == 0)