guint passkey);
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 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.confirm_func = __bt_hal_confirm_request;
func_cb.authorize_func = __bt_hal_authorize_request;
func_cb.pairing_cancel_func = NULL;
- func_cb.authorization_cancel_func = NULL;
+ func_cb.authorization_cancel_func = __bt_hal_authorize_cancel_request;
/* Allocate memory*/
agent = g_new0(GapAgentPrivate, 1);
return TRUE;
}
+static gboolean __bt_hal_authorize_cancel_request(GapAgentPrivate *agent,
+ const char *address)
+{
+ DBG("On Going Authorization is cancelled by remote [%s]", address);
+ gap_agent_reply_authorize(agent, GAP_AGENT_CANCEL, NULL);
+#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,
*/
if (priv->cb.authorization_cancel_func &&
priv->exec_type == GAP_AGENT_EXEC_AUTHORZATION) {
+ DBG("Call GAP agent cancel Authorization method.");
priv->cb.authorization_cancel_func(priv,
priv->authorize_addr);
memset(priv->authorize_addr, 0x00,