static gboolean __bt_hal_authorize_request(GapAgentPrivate *agent, GDBusProxy *device,
const char *uuid);
static gboolean __bt_hal_authorize_cancel_request(GapAgentPrivate *agent, const char *address);
+static gboolean __bt_hal_pairing_cancel_request(GapAgentPrivate *agent, const char *address);
static GVariant *__bt_hal_service_getall(GDBusProxy *device, const char *interface);
static void __bt_hal_agent_release_memory(void);
static inline void stack_trim(void);
func_cb.passkey_func = __bt_hal_passkey_request;
func_cb.confirm_func = __bt_hal_confirm_request;
func_cb.authorize_func = __bt_hal_authorize_request;
- func_cb.pairing_cancel_func = NULL;
+ func_cb.pairing_cancel_func = __bt_hal_pairing_cancel_request;
func_cb.authorization_cancel_func = __bt_hal_authorize_cancel_request;
/* Allocate memory*/
return TRUE;
}
+static gboolean __bt_hal_pairing_cancel_request(GapAgentPrivate *agent, const char *address)
+{
+ DBG("On Going Pairing is cancelled by remote [%s]", address);
+#ifdef TIZEN_SYSPOPUP_SUPPORTED
+ syspopup_destroy_all();
+#endif
+ __bt_hal_agent_release_memory();
+ return TRUE;
+}
+
#ifdef TIZEN_SYSPOPUP_SUPPORTED
int _bt_hal_launch_system_popup(bt_hal_agent_event_type_t event_type,
const char *device_name,
sizeof(priv->authorize_addr));
} else if (priv->cb.pairing_cancel_func &&
priv->exec_type == GAP_AGENT_EXEC_PAIRING) {
+ DBG("Call GAP agent cancel Pairing method.");
priv->cb.pairing_cancel_func(priv,
priv->pairing_addr);
memset(priv->pairing_addr, 0x00, sizeof(priv->pairing_addr));