/* Send detection started */
if (uas_cbs && uas_cbs->detection_state_cb)
- uas_cbs->detection_state_cb(1);
+ uas_cbs->detection_state_cb(PLUGIN_ID, 1);
FUNC_EXIT;
return TRUE;
/* Save current time */
dev_info->last_seen = _wifi_plugin_util_get_curr_time();
- uas_cbs->device_detected_cb(UAS_PRESENCE, dev_info);
- UA_WIFI_INFO("Called uas_cbs->device_detected_cb(UAS_PRESENCE)");
+ uas_cbs->device_detected_cb(PLUGIN_ID, UAS_PRESENCE, dev_info);
+ UA_WIFI_INFO("Called uas_cbs->device_detected_cb(PLUGIN_ID, UAS_PRESENCE)");
_wifi_plugin_util_uas_device_info_free(dev_info);
break;
}
break;
}
- uas_cbs->device_detected_cb(UAS_ABSENCE, dev_info);
- UA_WIFI_INFO("Called uas_cbs->device_detected_cb(UAS_ABSENCE)");
+ uas_cbs->device_detected_cb(PLUGIN_ID, UAS_ABSENCE, dev_info);
+ UA_WIFI_INFO("Called uas_cbs->device_detected_cb(PLUGIN_ID, UAS_ABSENCE)");
_wifi_plugin_util_uas_device_info_free(dev_info);
}
/* Send detection stopped */
if (uas_cbs && uas_cbs->detection_state_cb)
- uas_cbs->detection_state_cb(0);
+ uas_cbs->detection_state_cb(PLUGIN_ID, 0);
/* Reset detection flags */
wifi_detection_type = 0;
GSList *l;
uas_device_info_t *dev_info = NULL;
- initial_bursts = true;
+ initial_bursts = true;
for (l = dev_list; NULL != l; l = g_slist_next(l)) {
uas_wifi_info_t *wifi_info = l->data;
}
/* Save current time */
dev_info->last_seen = _wifi_plugin_util_get_curr_time();
- uas_cbs->device_added_cb(UAS_STATUS_SUCCESS, dev_info);
+ uas_cbs->device_added_cb(PLUGIN_ID, UAS_STATUS_SUCCESS, dev_info);
_wifi_plugin_util_uas_device_info_free(dev_info);
break;
}
switch (curr_state) {
case UAS_STATE_NOT_READY:
if (dev_list) {
- uas_cbs->state_changed_cb(UAS_STATE_READY);
+ uas_cbs->state_changed_cb(PLUGIN_ID, UAS_STATE_READY);
curr_state = UAS_STATE_READY;
}
break;
case UAS_STATE_READY:
if (!dev_list) {
- uas_cbs->state_changed_cb(UAS_STATE_NOT_READY);
+ uas_cbs->state_changed_cb(PLUGIN_ID, UAS_STATE_NOT_READY);
curr_state = UAS_STATE_NOT_READY;
}
break;
return UAS_STATUS_ALREADY_DONE;;
}
-static int start_detection(unsigned int detection_type)
+static int start_detection(unsigned int detection_type, int scan_mode)
{
FUNC_ENTER;
if (!uas_cbs || !uas_cbs->device_active_scan_cb)
return G_SOURCE_REMOVE;
- uas_cbs->device_active_scan_cb(UAS_ACTIVE_SCAN_COMPLETED, NULL);
+ uas_cbs->device_active_scan_cb(PLUGIN_ID, UAS_ACTIVE_SCAN_COMPLETED, NULL);
FUNC_EXIT;
return G_SOURCE_REMOVE;
}