GDBusProxy *proxy;
GError *error = NULL;
GVariant *result;
+ struct hal_ev_discovery_state_changed ev;
DBG("+");
+ memset(&ev, 0, sizeof(ev));
+
proxy = _bt_hal_get_adapter_proxy();
if (!proxy) {
DBG("_bt_hal_dbus_stop_discovery: Adapter proxy get failed!!!");
return BT_STATUS_FAIL;
}
+ /* Stop success */
+ ev.state = HAL_DISCOVERY_STATE_STOPPED;
+
+ if (!event_cb)
+ event_cb = _bt_hal_get_stack_message_handler();
+ if (event_cb) {
+ DBG("Sending HAL_EV_DISCOVERY_STATE_CHANGED event");
+ event_cb(HAL_EV_DISCOVERY_STATE_CHANGED, (void*)&ev, sizeof(ev));
+ }
+
/* discovery status will be change in event */
DBG("-");
g_variant_unref(result);