コード例 #1
0
static bt_status_t btsock_connect(const bt_bdaddr_t *bd_addr, btsock_type_t type,
        const uint8_t* uuid, int channel, int* sock_fd, int flags)
{
    if((uuid == NULL && channel <= 0) || bd_addr == NULL || sock_fd == NULL)
    {
    	bt_ext_log("[BTSOCK]btsock_listen invalid param");
        return BT_STATUS_PARM_INVALID;
    }
    *sock_fd = -1;
    bt_status_t status = BT_STATUS_FAIL;
    BT_BOOL ret;
	kal_uint8 *addr = (kal_uint8 *)bd_addr;
	kal_uint8 *uuid_128 = (kal_uint8 *)uuid;
	ret = btmtk_jsr82_session_connect_req(
								            0,
								            addr,
								            uuid_128,
								            convert_socket_type(type),
								            channel,
								            JSR82_SESSION_PS_RFCOMM_MTU,
								            convert_security(flags),
								            (kal_int32 *)sock_fd);
	if (ret)
	{
		status = BT_STATUS_SUCCESS;
	}
	bt_ext_log("[BTSOCK]btsock_connect ret[%d], fd[%d]", ret, *sock_fd);
    return status;
}
コード例 #2
0
bt_status_t btif_av_execute_service(bool b_enable)
{
    bt_ext_log("[A2DP] bt interface enable run, b_enable: %d\n", b_enable);
	
    if (b_enable)
    {
        if (!a2dp_registerSocket()) 
        {
            bt_ext_log("[A2DP] bt interface register socket fail");
			return BT_STATUS_FAIL;
        }

		bt_ext_log("[AVRCP] := bt interface try to active avrcp.\n");
		btmtk_avrcp_send_activate_req(0, 0, 0, 0x13, 0);

		bt_ext_log("[A2DP] bt interface try to active a2dp.\n");
		btmtk_a2dp_send_activate_req(a2dpsock, a2dpsock);
    }
	else
	{
		btmtk_avrcp_send_deactivate_req(0, 0);
		
		btmtk_a2dp_deactive_req();

		close(a2dpsock);
		a2dpsock = -1;
	}

	return BT_STATUS_SUCCESS;
}
コード例 #3
0
/*****************************************************************************
 * FUNCTION
 *  jbt_session_service_deregistration
 * DESCRIPTION
 *  
 * PARAMETERS
 *  ps_type             [IN]        
 *  transaction_id      [IN]        
 *  con_id              [IN]        
 * RETURNS
 *  
 *****************************************************************************/
BT_BOOL btmtk_jsr82_session_service_deregistration(kal_uint8 ps_type, kal_uint32 transaction_id, kal_uint8 con_id)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    ilm_struct ilm;
    ilm_struct *ilmptr;
    jbt_list *existing_entry = NULL;
    jbt_session_info *session_entry = NULL;

	BT_BOOL jret = FALSE;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    bt_ext_log("[JSR82][JBT] JBT jbt_session_service_deregistration");

	//lock context
	if (FALSE == btmtk_jbt_check_context_active())
	{
	 	bt_ext_err("[JSR82][JBT] JSR82 does not init");
		return FALSE;
	}
	session_mutex_lock(jbt_jsr82.mutex);
	//lock context again
	if (FALSE == btmtk_jbt_check_context_active())
	{
	 	bt_ext_err("[JSR82][JBT] JSR82 does not init");
		jret = FALSE;
		goto exit;
	}

	session_entry = jbt_search_existing_session_entry(ps_type, JBT_LIST_SEARCH_TYPE_BY_INX, con_id);

    if (session_entry == NULL)
    {
		bt_ext_log("[JSR82][JBT] JBT can not find an existing entry with type=%d and value=%d", JBT_LIST_SEARCH_TYPE_BY_INX, con_id);
        jret = FALSE;
		goto exit;
    }

    session_entry->transaction_id = transaction_id;

    jret = jbt_session_general_service_deregistration(session_entry);	

exit:
	session_mutex_unlock(jbt_jsr82.mutex);
    return jret;
}
コード例 #4
0
static bool a2dp_registerSocket()
{
    bt_ext_log("[A2DP][if] a2dp_registerSocket.");
 
    a2dpsock = socket(PF_LOCAL, SOCK_DGRAM, 0);
	
    bt_ext_log("[A2DP] initNative a2dpsock = %d", a2dpsock);
	
    if (a2dpsock < 0)
    {
        ALOGE("[A2DP][ERR] create a2dp api socket failed : %s, errno=%d", strerror(errno), errno);
        return FALSE;
    }

    return TRUE;
}
コード例 #5
0
void btmtk_hdp_handle_connect_cnf(ilm_struct *ilm)
{
	bt_hdp_connect_cnf_struct *cnf = (bt_hdp_connect_cnf_struct *)ilm->ilm_data;
	btmtk_hdp_channel* channel = NULL;
	btmtk_hdp_config *config = NULL;

	bt_ext_log("[HDP] btmtk_hdp_handle_connect_cnf : result=%d", cnf->result);
	channel = hdp_ext_find_channel_by_id(cnf->index);
	if (NULL == channel)
	{
		bt_ext_err("[HDP] no channel context for index[%d]", cnf->index);
		return;
	}

	//
	config = hdp_ext_find_config_by_mdep_id(cnf->mdepId);
	if (NULL == config)
	{
		bt_ext_err("[HDP] no config context for mdepId[%d]", cnf->mdepId);
		return;
	}
	channel->config = config;

	channel->mdlId = cnf->mdlId;
	
    btmtk_hdp_mmi_cb(channel, BTMTK_HDP_EVENT_CONNECT_CNF, cnf->result);

	if (cnf->result != BT_HDP_SUCCESS)
	{
		hdp_ext_free_channel(channel);
	}

}
コード例 #6
0
static bt_status_t btsock_listen(btsock_type_t type, const char* service_name,
        const uint8_t* service_uuid, int channel, int* sock_fd, int flags)
{
	kal_uint8 jbt_type;
	BT_BOOL ret;
	kal_uint8 *name = (kal_uint8 *)service_name;
	kal_uint8 *uuid_128 = (kal_uint8 *)service_uuid;
	kal_uint16 mtu = JSR82_SESSION_PS_RFCOMM_MTU;
    bt_status_t status = BT_STATUS_FAIL;
	
	if((service_uuid == NULL && channel <= 0) || sock_fd == NULL)
    {
    	bt_ext_log("[BTSOCK]btsock_listen invalid param");
        return BT_STATUS_PARM_INVALID;
    }
    *sock_fd = -1;
	ret = btmtk_jsr82_session_service_registration(
										            convert_socket_type(type),
										            uuid_128,
										            name,            
										            0,
										            JSR82_SESSION_PS_RFCOMM_MTU,
										            convert_security(flags),
										            0,
										            (kal_int32 *)sock_fd);
	if (ret)
	{
		status = BT_STATUS_SUCCESS;
	}
    return status;
}
コード例 #7
0
/* This function is used for handling message send from internal */
void btmtk_avrcp_ext_msg_handler(void *pContext, ilm_struct *ilm)
{
    U8 iResult = 0;
	
	btmtk_avrcp_handle_message(ilm);
	
	bt_ext_log("avrcp:= ext hdl msg_id:%d", ilm->msg_id);
}
コード例 #8
0
/*******************************************************************************
**
** Function         btif_av_disconnect
**
** Description      call external API to really end a A2DP connection
**
** Returns          bt_status_t
**
*******************************************************************************/
bt_status_t btif_av_disconnect(bt_addr_struct *bd_addr)
{
    bt_ext_log("%s", __FUNCTION__);
    CHECK_BTAV_INIT();
    btmtk_a2dp_close_device(bd_addr);

	return BT_STATUS_SUCCESS;
}
コード例 #9
0
/*******************************************************************************
**
** Function         btif_av_connect
**
** Description      call external API to really establish a A2DP connection
**
** Returns          bt_status_t
**
*******************************************************************************/
bt_status_t btif_av_connect(bt_addr_struct *bd_addr)
{
    bt_ext_log("%s", __FUNCTION__);
    CHECK_BTAV_INIT();

    btmtk_a2dp_send_stream_open_req(MOD_MMI, bd_addr, 0);

	return BT_STATUS_SUCCESS;
}
コード例 #10
0
/*******************************************************************************
**
** Function         connect_int
**
** Description      Interface provide for JNI to initial a connection of A2DP
**
** Returns          bt_status_t
**
*******************************************************************************/
static bt_status_t connect_int(bt_bdaddr_t *bd_addr)
{
	bt_addr_struct addr;
	
	bt_ext_log("%s", __FUNCTION__);	
	
    btmtk_util_convert_array2bdaddr(&addr, bd_addr);
	connect_profile(&addr,PROFILE_A2DP);
	return BT_STATUS_SUCCESS;
}
コード例 #11
0
void btmtk_hdp_handle_channel_closed_ind(ilm_struct *ilm)
{
	bt_hdp_channel_closed_ind_struct *ind = (bt_hdp_channel_closed_ind_struct *)ilm->ilm_data;
	btmtk_hdp_channel* channel = NULL;

	bt_ext_log("[HDP] btmtk_hdp_handle_channel_closed_ind");
	channel = hdp_ext_find_channel_by_addr_and_mdl(&ind->bdaddr, ind->mdlId);
	if(channel == NULL)
	{
		bt_ext_log("[HDP] btmtk_hdp_find_channel_by_addr_and_mdl return NULL");
		return;
	}

	//close fd
	hdp_ext_channel_detach(channel->session_id);
	
	btmtk_hdp_mmi_cb(channel, BTMTK_HDP_EVENT_CLOSE_IND, 0);

	hdp_ext_free_channel(channel);
}
コード例 #12
0
static void BTCMD_SendMessage(msg_type msg_id, module_type dest_mod, void *ptr, U16 size)
{
    int ret = -1;
    ilm_struct ilm;
    U16 *field;

    bt_ext_log("[SPP][ADP] BTCMD_SendMessage: %d", msg_id);

    memset(&ilm, 0, sizeof(ilm_struct));
    ilm.msg_id = msg_id;
    ilm.src_mod_id = MOD_EXTERNAL;
    ilm.dest_mod_id = dest_mod;

    assert (size <= MAX_ILM_BUFFER_SIZE);

    if(ptr != NULL)
        memcpy(ilm.ilm_data, ptr, size);

    /* LOCAL_PARA_HDR */
    field = (U16 *)ilm.ilm_data;
    *field = 1;
    field = (U16 *)&ilm.ilm_data[2];
    *field = size;

    // cal whole ilm size
    size = sizeof(ilm_struct) - MAX_ILM_BUFFER_SIZE + size;

    if(g_panSockfd > 0)
    {
        ret = send(g_panSockfd, (void *)&ilm, size, 0);
        if(ret < 0)
        {
            bt_ext_err("[SPP][ADP] BTCMD_SendMessage: send fail: %s, %d", strerror(errno), errno);
        }
        bt_ext_log("[SPP][ADP] send done: %d", ret);
    }
    else
    {
        bt_ext_err("[SPP][ADP] BTCMD_SendMessage: socket not initialized");
    }
}
コード例 #13
0
void btmtk_a2dp_disconnect_CbHdl(void)
{
    BT_A2DP_APP_STATE state = btmtk_a2dp_global_state();

    if (state == BT_A2DP_APP_STATE_OPENED ||
        state == BT_A2DP_APP_STATE_STREAMING)
    {
        bt_ext_log("[A2DP] disconnect a2dp before ACL...\n");

        btmtk_a2dp_send_stream_close_req(MOD_MMI, 0);
    }
}
コード例 #14
0
void btmtk_simap_handle_connect_ind(ilm_struct *message)
{
	bt_simap_connect_ind_struct *msg;
	
#ifdef BTMTK_ON_WISE 
    msg = (bt_simap_connect_ind_struct *)message->local_para_ptr;
#else   /* BTMTK_ON_WISE */
    msg = (bt_simap_connect_ind_struct *)message->ilm_data;
#endif  /* BTMTK_ON_WISE */

    bt_ext_log("SIMAP CONNECT_IND: cid=%d; lap=%08x, uap=%02x, nap=%04x\n", msg->cid, (int)msg->lap, msg->uap, msg->nap);
    g_SIMAP_MMI_Callback(NULL, EVENT_SIMAP_MMI_CONNECT_IND, msg, sizeof(bt_simap_connect_ind_struct));
}
コード例 #15
0
void btmtk_simap_handle_disconnect_cnf(ilm_struct *message)
{
	bt_simap_disconnect_cnf_struct *msg;
	
#ifdef BTMTK_ON_WISE 
    msg = (bt_simap_disconnect_cnf_struct *)message->local_para_ptr;
#else   /* BTMTK_ON_WISE */
    msg = (bt_simap_disconnect_cnf_struct *)message->ilm_data;
#endif  /* BTMTK_ON_WISE */

    bt_ext_log("SIMAP DISCONNECT_CNF: result=%d, cid=%d\n", msg->result, msg->cid);
    g_SIMAP_MMI_Callback(NULL, EVENT_SIMAP_MMI_DISCONNECT_CNF, msg, sizeof(bt_simap_disconnect_cnf_struct));
}
コード例 #16
0
void btmtk_simap_handle_card_status_ind_sent_ind(ilm_struct *message)
{
	bt_simap_card_status_ind_sent_ind_struct *msg;
	
#ifdef BTMTK_ON_WISE 
    msg = (bt_simap_card_status_ind_sent_ind_struct *)message->local_para_ptr;
#else   /* BTMTK_ON_WISE */
    msg = (bt_simap_card_status_ind_sent_ind_struct *)message->ilm_data;
#endif  /* BTMTK_ON_WISE */

    bt_ext_log("SIMAP CARD_STATUS_IND_SENT: status=%d\n", msg->status);
    g_SIMAP_MMI_Callback(NULL, EVENT_SIMAP_MMI_CARD_STATUS_IND_SENT_IND, msg, sizeof(bt_simap_card_status_ind_sent_ind_struct));
}
コード例 #17
0
void btmtk_simap_handle_auth_req_timeout_rfclose_ind(ilm_struct *message)
{
	bt_simap_auth_req_timeout_rfclose_ind_struct *msg;
	
#ifdef BTMTK_ON_WISE 
    msg = (bt_simap_auth_req_timeout_rfclose_ind_struct *)message->local_para_ptr;
#else   /* BTMTK_ON_WISE */
    msg = (bt_simap_auth_req_timeout_rfclose_ind_struct *)message->ilm_data;
#endif  /* BTMTK_ON_WISE */

    bt_ext_log("SIMAP AUTH_REQ_TIMEOUT_RFCLOSE_IND: lap=%08x, uap=%02x, nap=%04x\n", (int)msg->lap, msg->uap, msg->nap);
    g_SIMAP_MMI_Callback(NULL, EVENT_SIMAP_MMI_AUTH_REQ_TIMEOUT_RFCLOSE_IND, msg, sizeof(bt_simap_auth_req_timeout_rfclose_ind_struct));
}
コード例 #18
0
static bt_status_t init(btav_callbacks_t* callbacks )
{
    int status;

    bt_ext_log("%s", __FUNCTION__);

    if (bt_av_callbacks)
        return BT_STATUS_DONE;

    bt_av_callbacks = callbacks;

    return btif_av_init();
}
コード例 #19
0
void btmtk_sim_handle_reset_req(ilm_struct *message)
{
	bt_sim_reset_req_struct *msg;
	
#ifdef BTMTK_ON_WISE 
    msg = (bt_sim_reset_req_struct *)message->local_para_ptr;
#else   /* BTMTK_ON_WISE */
    msg = (bt_sim_reset_req_struct *)message->ilm_data;
#endif  /* BTMTK_ON_WISE */

    bt_ext_log("SIMAP RESET_REQ: transport_protocol_type=%d\n", msg->transport_protocol_type);
    g_SIMAP_MMI_Callback(NULL, EVENT_SIM_MMI_RESET_REQ, msg, sizeof(bt_sim_reset_req_struct));
}
コード例 #20
0
void btmtk_simap_handle_deactivate_cnf(ilm_struct *message)
{
	bt_simap_deactivate_cnf_struct *msg;
	
#ifdef BTMTK_ON_WISE 
    msg = (bt_simap_deactivate_cnf_struct *)message->local_para_ptr;
#else   /* BTMTK_ON_WISE */
    msg = (bt_simap_deactivate_cnf_struct *)message->ilm_data;
#endif  /* BTMTK_ON_WISE */

    bt_ext_log("SIMAP DEACTIVATE_CNF: result=%d\n", msg->result);
    g_SIMAP_MMI_Callback(NULL, EVENT_SIMAP_MMI_DEACTIVATE_CNF, msg, sizeof(bt_simap_deactivate_cnf_struct));
}
コード例 #21
0
void btmtk_hdp_handle_disconnect_cnf(ilm_struct *ilm)
{
	bt_hdp_disconnect_cnf_struct *cnf = (bt_hdp_disconnect_cnf_struct *)ilm->ilm_data;
	btmtk_hdp_channel* channel = NULL;

	bt_ext_log("[HDP] btmtk_hdp_handle_connect_cnf : result=%d", cnf->result);
	channel = hdp_ext_find_channel_by_id(cnf->index);
	if (NULL == channel)
	{
		bt_ext_err("[HDP] no channel context for index[%d]", cnf->index);
		return;
	}

    btmtk_hdp_mmi_cb(channel, BTMTK_HDP_EVENT_DISCONNECT_CNF, cnf->result);
}
コード例 #22
0
void btmtk_spp_handle_uart_assign_buffer_cnf(ilm_struct *message)
{
    btmtk_spp_uart_assign_buffer_cnf_struct *msg;

#ifdef BTMTK_ON_WISE 
    msg = (btmtk_spp_uart_assign_buffer_cnf_struct *)message->local_para_ptr;
#else   /* BTMTK_ON_WISE */
    msg = (btmtk_spp_uart_assign_buffer_cnf_struct *)message->ilm_data;
#endif  /* BTMTK_ON_WISE */          
    printf("SPP UART ASSIGN_BUFFER_CNF port=%d\n", msg->port);

#ifdef BTMTK_ON_LINUX
    bt_ext_log("[SPP][ADP] assign buffer cnf");
    g_SPP_MMI_Callback(NULL, EVENT_SPP_MMI_ASSIGN_BUFFER_CNF, msg, sizeof(btmtk_spp_uart_assign_buffer_cnf_struct));
#endif
}
コード例 #23
0
/*******************************************************************************
**
** Function         cleanup
**
** Description      Shuts down the AV interface and does the cleanup
**
** Returns          None
**
*******************************************************************************/
static void cleanup(void)
{
    bt_ext_log("%s", __FUNCTION__);

    if (bt_av_callbacks)
    {
	    btif_disable_service(BTMTK_AVRCP_SERVICE_ID);

	    btmtk_profile_unregister(PROFILE_AVRCP);

	    btif_disable_service(BTMTK_A2DP_SERVICE_ID);

	    btmtk_profile_unregister(PROFILE_A2DP);
	
        bt_av_callbacks = NULL;
    }
		
    return;
}
コード例 #24
0
void btmtk_hdp_handle_channel_opened_ind(ilm_struct *ilm)
{
	bt_hdp_channel_opened_ind_struct *ind = (bt_hdp_channel_opened_ind_struct *)ilm->ilm_data;
	SESSION_RESULT sret = SR_NOERROR;	
	btmtk_hdp_channel* channel = NULL;
	btmtk_hdp_config *config = NULL;

	bt_ext_log("[HDP] btmtk_hdp_handle_channel_opened_ind");
	channel = hdp_ext_find_channel_by_addr_and_mdl(&ind->bdaddr, ind->mdlId);
	if (NULL == channel)
	{
		channel = hdp_ext_allocate_channel();
		if (channel != NULL)
		{
			memcpy(&channel->bdaddr, &ind->bdaddr, sizeof(bt_addr_struct));
			channel->mdlId = ind->mdlId;
			channel->channel_id = hdp_get_channel_id();
		}
		else
		{
			bt_ext_err("[HDP] no available channel context for incoming connection");
			return;
		}
	}

	hdp_update_channel_config(channel, ind->mdepId);
	
	//fd needs to create
	sret = hdp_ext_channel_attach(&channel->session_id, &channel->fd);
	if (SR_NOERROR != sret)
	{
		//TODO: 1.need to disconnec the channel, 2, send disconnected state call back to MMI
		memset(channel, 0x0, sizeof(btmtk_hdp_channel));
		return;		
	}

	//send rsp to internal layer
	btmtk_hdp_connect_rsp(&ind->bdaddr, ind->mdlId, channel->session_id);
	
    btmtk_hdp_mmi_cb(channel, BTMTK_HDP_EVENT_OPEN_IND, 0);
}
コード例 #25
0
void btmtk_jsr82_sdp_register_callback(void *context, BT_BOOL result, int identify)
{
	jbt_session_info *session_entry = (jbt_session_info *)context;
	jbt_subsession *subsession_entry = NULL;

	bt_ext_log("[JSR82]btmtk_jsr82_sdp_register_callback, result[%d]", result);
	if (FALSE == result)
	{
		subsession_entry = jbt_search_existing_subsession_entry(session_entry, JBT_LIST_SEARCH_TYPE_BY_SESSION_ID, identify);
		if (JBT_SESSION_STATE_CONNECTED == subsession_entry->subsession_state)
		{
			jbt_session_general_disconnect(session_entry, subsession_entry);
		}
	
		jbt_session_general_service_deregistration(session_entry);
	}
	else
	{
		jbt_jsr82_session_registered(session_entry);
	}
}
コード例 #26
0
bt_status_t btif_av_init(void)
{
    bt_ext_log("[A2DP] btif init\n");
	
    //if (btif_av_cb.sm_handle == NULL)
    {
        //
        btif_enable_service(BTMTK_AVRCP_SERVICE_ID);
        
        btmtk_profile_register(PROFILE_AVRCP, btmtk_avrcp_ext_msg_handler, NULL);

        //if (btif_a2dp_start_media_task() != GKI_SUCCESS)
        //    return BT_STATUS_FAIL;

        // I am not sure whether we need to call this function or not, just mark
        btif_enable_service(BTMTK_A2DP_SERVICE_ID);

        /* Initialize the AVRC CB */
        //btif_rc_init();

        /* Also initialize the AV state machine */
        //btif_av_cb.sm_handle = btif_sm_init((const btif_sm_handler_t*)btif_av_state_handlers, BTIF_AV_STATE_IDLE);

		//a2dp_registerSocket();

		btmtk_profile_register(PROFILE_A2DP, btmtk_a2dp_ext_msg_handler, NULL);

        //btif_a2dp_on_init();
        
        

        return BT_STATUS_SUCCESS;
    }

    //return BT_STATUS_DONE;
}
コード例 #27
0
BtStatus JSR82_SendMessage(msg_type msg_id, module_type mod_id, void *buffer, U16 size)
{
	kal_bool ret = TRUE;
	int sockfd;
	U16 *field;

	ilm_struct ilm;

	bt_ext_log("[JSR82] msg=%u, ptr=0x%X, size=%d", msg_id, buffer, size);

	memset(&ilm, 0x0, sizeof(ilm_struct));

	/* Set src_mod to MOD_MMI */
	ilm.src_mod_id = MOD_MMI;
	ilm.dest_mod_id = mod_id;
	ilm.sap_id = 0;
	ilm.msg_id = msg_id;

	/* LOCAL_PARA_HDR */
	field = (U16 *)ilm.ilm_data;
	*field = 1;
	*(++field) = size;

	 if(buffer != NULL)
        memcpy(ilm.ilm_data, buffer, size);

	// Calculate total ilm size
	size = sizeof(ilm_struct) - MAX_ILM_BUFFER_SIZE + size;

	if(mod_id == MOD_BT)
	{
		ret = btmtk_sendmsg(PROFILE_JSR82, (void* )&ilm, size);
	}
	
	return (ret) ? BT_STATUS_SUCCESS : BT_STATUS_FAILED;
}
コード例 #28
0
void btmtk_simap_handle_message(ilm_struct *message)
{
	bt_ext_log("btmtk_simap_handle_message: msg_id= %d", (int)message->msg_id);

	switch (message->msg_id)
	{		
		/* SIMAP --> MMI */
		case MSG_ID_BT_SIMAP_ACTIVATE_CNF:
			btmtk_simap_handle_activate_cnf(message);
			break;
		case MSG_ID_BT_SIMAP_DEACTIVATE_CNF:
			btmtk_simap_handle_deactivate_cnf(message);
			break;
		case MSG_ID_BT_SIMAP_CONNECT_IND:
			btmtk_simap_handle_connect_ind(message);
			break;
		case MSG_ID_BT_SIMAP_DISCONNECT_IND:
			btmtk_simap_handle_disconnect_ind(message);
			break;
		case MSG_ID_BT_SIMAP_DISCONNECT_CNF:
			btmtk_simap_handle_disconnect_cnf(message);
			break;
		case MSG_ID_BT_SIMAP_AUTH_REQ:
			btmtk_simap_handle_auth_req(message);
			break;
		case MSG_ID_BT_SIMAP_ATR_RSP_SENT_IND:
			btmtk_simap_handle_atr_rsp_sent_ind(message);
			break;
		case MSG_ID_BT_SIMAP_APDU_RSP_SENT_IND:
			btmtk_simap_handle_apdu_rsp_sent_ind(message);
			break;
		case MSG_ID_BT_SIMAP_SIM_ON_RSP_SENT_IND:
			btmtk_simap_handle_sim_on_rsp_sent_ind(message);
			break;
		case MSG_ID_BT_SIMAP_SIM_OFF_RSP_SENT_IND:
			btmtk_simap_handle_sim_off_rsp_sent_ind(message);
			break;
		case MSG_ID_BT_SIMAP_SIM_RESET_RSP_SENT_IND:
			btmtk_simap_handle_sim_reset_rsp_sent_ind(message);
			break;
		case MSG_ID_BT_SIMAP_CARD_STATUS_IND_SENT_IND:
			btmtk_simap_handle_card_status_ind_sent_ind(message);
			break;
		case MSG_ID_BT_SIMAP_CARD_READER_STATUS_RSP_SENT_IND:
			btmtk_simap_handle_card_reader_status_rsp_sent_ind(message);
			break;
		case MSG_ID_BT_SIMAP_SET_TRANSPORT_PROTOCOL_RSP_SENT_IND:
			btmtk_simap_handle_set_transport_protocol_rsp_sent_ind(message);
			break;
		case MSG_ID_BT_SIMAP_AUTH_REQ_TIMEOUT_RFCLOSE_IND:
			btmtk_simap_handle_auth_req_timeout_rfclose_ind(message);
			break;

		case MSG_ID_BT_SIMAP_BT_RESET_IND:
			btmtk_simap_handle_bt_reset_ind(message);
			break;

		/* SIMAP --> SIM task */
		case MSG_ID_BT_SIM_CONNECT_REQ:
			btmtk_sim_handle_connect_req(message);
			break;
		case MSG_ID_BT_SIM_DISCONNECT_REQ:
			btmtk_sim_handle_disconnect_req(message);
			break;
		case MSG_ID_BT_SIM_APDU_REQ:
			btmtk_sim_handle_apdu_req(message);
			break;
		case MSG_ID_BT_SIM_POWER_OFF_REQ:
			btmtk_sim_handle_power_off_req(message);
			break;
		case MSG_ID_BT_SIM_RESET_REQ:
			btmtk_sim_handle_reset_req(message);
			break;

		default:
			break;
	}
}
コード例 #29
0
void btmtk_sim_handle_power_off_req(ilm_struct *message)
{
    bt_ext_log("SIM POWER_OFF_REQ\n");
    g_SIMAP_MMI_Callback(NULL, EVENT_SIM_MMI_POWER_OFF_REQ, NULL, 0);
}
コード例 #30
0
void btmtk_sim_handle_disconnect_req(ilm_struct *message)
{
    bt_ext_log("SIM DISCONNECT_REQ\n");
    g_SIMAP_MMI_Callback(NULL, EVENT_SIM_MMI_DISCONNECT_REQ, NULL, 0);
}