From 9ed5457543a034d9b680dc012eed653a509d1213 Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Mon, 12 Sep 2016 14:19:43 +0900 Subject: [PATCH] Support hf functionality for IVI Change-Id: I511f84f35ddd97eec2329f0872354b4877a6c31b Signed-off-by: DoHyun Pyun --- bt-api/bt-telephony.c | 8 ++++---- packaging/bluetooth-frwk.spec | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/bt-api/bt-telephony.c b/bt-api/bt-telephony.c index fd5beb9..0e22c2e 100644 --- a/bt-api/bt-telephony.c +++ b/bt-api/bt-telephony.c @@ -308,7 +308,7 @@ static GVariant *__bluetooth_telephony_dbus_method_send(const char *path, const char *interface, const char *method, GError **err, GVariant *parameters) { -#ifdef TIZEN_PROFILE_WEARABLE +#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI) int timeout = 4000; #else int timeout = -1; @@ -800,7 +800,7 @@ static int __bluetooth_telephony_unregister(void) return BLUETOOTH_TELEPHONY_ERROR_NONE; } -#ifndef TIZEN_PROFILE_WEARABLE +#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI) static void __bluetooth_telephony_init_headset_state(void) { GVariant *reply; @@ -1406,7 +1406,7 @@ BT_EXPORT_API int bluetooth_telephony_init(bt_telephony_func_ptr cb, goto fail; } -#ifndef TIZEN_PROFILE_WEARABLE +#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI) __bluetooth_telephony_init_headset_state(); #endif @@ -1489,7 +1489,7 @@ BT_EXPORT_API gboolean bluetooth_telephony_is_sco_connected(void) g_variant_get(reply, "(b)", &status); g_variant_unref(reply); -#ifdef TIZEN_PROFILE_WEARABLE +#if defined(TIZEN_PROFILE_WEARABLE) || defined(TIZEN_PROFILE_IVI) if (status == TRUE && telephony_info.headset_state != BLUETOOTH_STATE_PLAYING) telephony_info.headset_state = BLUETOOTH_STATE_PLAYING; #endif diff --git a/packaging/bluetooth-frwk.spec b/packaging/bluetooth-frwk.spec index 1bc6303..4de209a 100644 --- a/packaging/bluetooth-frwk.spec +++ b/packaging/bluetooth-frwk.spec @@ -129,6 +129,12 @@ export CFLAGS="$CFLAGS -DUSB_BLUETOOTH -DTIZEN_TV -DAUTO_ACCEPT" %define _servicedir multi-user.target.wants %endif +%if "%{?profile}" == "ivi" +export CFLAGS="$CFLAGS -DTIZEN_PROFILE_IVI" +%define _servicefile packaging/bluetooth-frwk-wearable.service +%define _servicedir multi-user.target.wants +%endif + %ifarch x86_64 export CFLAGS="$CFLAGS -Wall -g -fvisibility=hidden -fPIC" %else -- 2.7.4