daemon/net_nfc_server_common.c
static void controller_target_detected_cb(void *info,
		void *user_context)
{
	net_nfc_request_target_detected_t *req = (net_nfc_request_target_detected_t *)info;

	g_assert(info != NULL);

	if (req->request_type == NET_NFC_MESSAGE_SERVICE_RESTART_POLLING_LOOP)
	{
		net_nfc_server_restart_polling_loop();
	}
	else
	{
		net_nfc_server_set_target_info(info);

		if (req->devType != NET_NFC_UNKNOWN_TARGET)
		{
			if (req->devType == NET_NFC_NFCIP1_TARGET ||
					req->devType == NET_NFC_NFCIP1_INITIATOR)
			{
				/* llcp target detected */
				net_nfc_server_llcp_target_detected(info);
			}
			else
			{
				/* tag target detected */
				net_nfc_server_tag_target_detected(info);
			}
		}

		/* If target detected, sound should be played. */
		net_nfc_manager_util_play_sound(NET_NFC_TASK_START);
	}

	/* FIXME : should be removed when plugins would be fixed*/
	_net_nfc_util_free_mem(info);
}
/* FIXME: it works as broadcast only now */
it works as broadcast only now
it works as broadcast only now
static void controller_target_detected_cb(void *info,
		void *user_context)
{
	net_nfc_request_target_detected_t *req = (net_nfc_request_target_detected_t *)info;
	g_assert(info != NULL);
	if (req->request_type == NET_NFC_MESSAGE_SERVICE_RESTART_POLLING_LOOP)
	{
		net_nfc_server_restart_polling_loop();
	}
	else
	{
		net_nfc_server_set_target_info(info);
		if (req->devType != NET_NFC_UNKNOWN_TARGET)
		{
			if (req->devType == NET_NFC_NFCIP1_TARGET ||
					req->devType == NET_NFC_NFCIP1_INITIATOR)
			{
				net_nfc_server_llcp_target_detected(info);
			}
			else
			{
				net_nfc_server_tag_target_detected(info);
			}
		}
		net_nfc_manager_util_play_sound(NET_NFC_TASK_START);
	}
	_net_nfc_util_free_mem(info);
}
static void controller_target_detected_cb ( void * info , void * user_context ) { net_nfc_request_target_detected_t * req = ( net_nfc_request_target_detected_t * ) info ; g_assert ( info != NULL ) ; if ( req -> request_type == NET_NFC_MESSAGE_SERVICE_RESTART_POLLING_LOOP ) { net_nfc_server_restart_polling_loop ( ) ; } else { net_nfc_server_set_target_info ( info ) ; if ( req -> devType != NET_NFC_UNKNOWN_TARGET ) { if ( req -> devType == NET_NFC_NFCIP1_TARGET || req -> devType == NET_NFC_NFCIP1_INITIATOR ) { net_nfc_server_llcp_target_detected ( info ) ; } else { net_nfc_server_tag_target_detected ( info ) ; } } net_nfc_manager_util_play_sound ( NET_NFC_TASK_START ) ; } _net_nfc_util_free_mem ( info ) ; }
FIXME: it works as broadcast only now
FIXME : it works as broadcast only now
/* llcp target detected */ /* tag target detected */ /* If target detected, sound should be played. */ /* FIXME : should be removed when plugins would be fixed*/