From 6d751350b5f1d3460c7be8e6524ccabb30ea6d39 Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Tue, 27 Feb 2024 10:31:54 +0900 Subject: [PATCH] Add function to check whether PBAP profile is connected Change-Id: I85ac7a4e666e694917afad0583758e62eeeb7e63 Signed-off-by: Wootak Jung --- bt-service/services/device/bt-service-core-device.c | 6 ++++++ bt-service/services/include/bt-service-common.h | 1 + 2 files changed, 7 insertions(+) diff --git a/bt-service/services/device/bt-service-core-device.c b/bt-service/services/device/bt-service-core-device.c index 9ee1128..10a667e 100644 --- a/bt-service/services/device/bt-service-core-device.c +++ b/bt-service/services/device/bt-service-core-device.c @@ -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; diff --git a/bt-service/services/include/bt-service-common.h b/bt-service/services/include/bt-service-common.h index 0060f84..5721a57 100644 --- a/bt-service/services/include/bt-service-common.h +++ b/bt-service/services/include/bt-service-common.h @@ -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; -- 2.7.4