Support hf functionality for IVI 95/87895/1 accepted/tizen/common/20160912.181432 accepted/tizen/ivi/20160913.041810 accepted/tizen/mobile/20160913.041716 accepted/tizen/tv/20160913.041728 accepted/tizen/wearable/20160913.041750 submit/tizen/20160912.055637
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 12 Sep 2016 05:19:43 +0000 (14:19 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 12 Sep 2016 05:19:43 +0000 (14:19 +0900)
Change-Id: I511f84f35ddd97eec2329f0872354b4877a6c31b
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-api/bt-telephony.c
packaging/bluetooth-frwk.spec

index fd5beb9..0e22c2e 100644 (file)
@@ -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
index 1bc6303..4de209a 100644 (file)
@@ -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