Exemplo n.º 1
0
static bt_status_t init(btmce_callbacks_t* callbacks)
{
    BTIF_TRACE_EVENT("%s", __FUNCTION__);

    bt_mce_callbacks = callbacks;

    btif_enable_service(BTA_MAP_SERVICE_ID);

    return BT_STATUS_SUCCESS;
}
/*******************************************************************************
**
** Function        init
**
** Description     Initializes BT-HD interface
**
** Returns         BT_STATUS_SUCCESS
**
*******************************************************************************/
static bt_status_t init(bthd_callbacks_t* callbacks )
{
    BTIF_TRACE_API("%s", __FUNCTION__);

    bt_hd_callbacks = callbacks;
    memset(&btif_hd_cb, 0, sizeof(btif_hd_cb));

    btif_enable_service(BTA_HIDD_SERVICE_ID);

    return BT_STATUS_SUCCESS;
}
Exemplo n.º 3
0
/*******************************************************************************
**
** Function         btif_hf_client_init
**
** Description     initializes the hf interface
**
** Returns         bt_status_t
**
*******************************************************************************/
static bt_status_t init( bthf_client_callbacks_t* callbacks )
{
    BTIF_TRACE_EVENT("%s", __FUNCTION__);

    bt_hf_client_callbacks = callbacks;

    btif_enable_service(BTA_HFP_HS_SERVICE_ID);

    clear_state();

    return BT_STATUS_SUCCESS;
}
Exemplo n.º 4
0
/*******************************************************************************
**
** Function         btif_hf_init
**
** Description     initializes the hf interface
**
** Returns         bt_status_t
**
*******************************************************************************/
static bt_status_t init( bthf_callbacks_t* callbacks )
{
    BTIF_TRACE_EVENT1("%s", __FUNCTION__);

    bt_hf_callbacks = callbacks;

    /* Invoke the enable service API to the core to set the appropriate service_id
     * Internally, the HSP_SERVICE_ID shall also be enabled if HFP is enabled (phone)
     * othwerwise only HSP is enabled (tablet)
    */
#if (defined(BTIF_HF_SERVICES) && (BTIF_HF_SERVICES & BTA_HFP_SERVICE_MASK))
    btif_enable_service(BTA_HFP_SERVICE_ID);
#else
    btif_enable_service(BTA_HSP_SERVICE_ID);
#endif

    memset(&btif_hf_cb, 0, sizeof(btif_hf_cb_t));
    clear_phone_state();

    return BT_STATUS_SUCCESS;
}
Exemplo n.º 5
0
/*******************************************************************************
**
** Function         btif_gatt_init
**
** Description      Initializes the GATT interface
**
** Returns    s      bt_status_t
**
*******************************************************************************/
static bt_status_t btif_gatt_init( const btgatt_callbacks_t* callbacks )
{
    bt_status_t status;

    GATT_IF_API();
    bt_gatt_callbacks = callbacks;

    status = btif_gattc_init(callbacks->client);
    status = btif_gatts_init(callbacks->server);

    btif_enable_service(BTMTK_BLE_SERVICE_ID);
    return BT_STATUS_SUCCESS;
}
Exemplo n.º 6
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;
}