#include "bt-service-gap-agent.h"
#include "bt-service-pbap.h"
+#ifdef TIZEN_FEATURE_BT_DPM
+#include "bt-service-dpm.h"
+#endif
+
#define BT_SYSPOPUP_IPC_RESPONSE_OBJECT "/org/projectx/bt_syspopup_res"
#define BT_SYSPOPUP_INTERFACE "User.Bluetooth.syspopup"
#define BT_SYSPOPUP_METHOD_RESPONSE "Response"
BT_CHECK_PARAMETER(device_address, return);
+#ifdef TIZEN_FEATURE_BT_DPM
+ int pairing_state = DPM_STATUS_ERROR;
+
+ _bt_dpm_get_bluetooth_pairing_state(&pairing_state);
+ if (pairing_state == DPM_RESTRICTED) {
+ BT_ERR("Not allow to pair the device");
+ return BLUETOOTH_ERROR_DEVICE_POLICY_RESTRICTION;
+ }
+#endif
+
if (bonding_info) {
BT_ERR("Bonding in progress");