Add function to check whether PBAP profile is connected 37/306737/1
authorWootak Jung <wootak.jung@samsung.com>
Tue, 27 Feb 2024 01:31:54 +0000 (10:31 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Tue, 27 Feb 2024 01:36:28 +0000 (10:36 +0900)
Change-Id: I85ac7a4e666e694917afad0583758e62eeeb7e63
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
bt-service/services/device/bt-service-core-device.c
bt-service/services/include/bt-service-common.h

index 9ee1128..10a667e 100644 (file)
@@ -49,6 +49,7 @@
 #endif
 #ifdef TIZEN_FEATURE_BT_OBEX
 #include "bt-service-obex-server.h"
+#include "bt-service-pbap.h"
 #endif
 #include "bt-service-util.h"
 
@@ -2085,6 +2086,11 @@ gboolean _bt_is_device_connected(bluetooth_device_address_t *device_address, int
                break;
        case BT_PROFILE_CONN_GATT:
                return _bt_is_remote_gatt_device_connected(device_address); /* Remote is GATT client or Server */
+#ifdef TIZEN_FEATURE_BT_OBEX
+       case BT_PROFILE_CONN_PBAP:
+               _bt_pbap_is_connected(device_address, &is_connected); /* Remote is PBAP Server */
+               return is_connected;
+#endif
        default:
                BT_DBG("Unknown svc_type: %d", svc_type);
                return FALSE;
index 0060f84..5721a57 100644 (file)
@@ -290,6 +290,7 @@ typedef enum {
        BT_PROFILE_CONN_GATT = 0x40,
        BT_PROGILE_CONN_NAP = 0x80,
        BT_PROFILE_CONN_A2DP_SINK = 0x100,
+       BT_PROFILE_CONN_PBAP = 0x200,
        BT_PROFILE_CONN_ALL = 0xffffffff,
 } bt_profile_type_t;